本文整理汇总了C#中Item.IsBlank方法的典型用法代码示例。如果您正苦于以下问题:C# Item.IsBlank方法的具体用法?C# Item.IsBlank怎么用?C# Item.IsBlank使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Item
的用法示例。
在下文中一共展示了Item.IsBlank方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AllowsItem
/// <summary>
/// Gets whether the <see cref="ItemSlot" /> allows the given <see cref="Item" /> or not.
/// </summary>
/// <param name="it">The <see cref="Item" /> to check.</param>
/// <returns>true if the <see cref="Item" /> can be placed in the <see cref="ItemSlot" />, false otherwise.</returns>
public override bool AllowsItem(Item it)
{
//TomeSkillAttribute attr = null;
//for (int i = 0; i < it.modEntities.Count; i++)
//if ((attr = it.modEntities[i].GetType().GetCustomAttributes(typeof(TomeSkillAttribute), true)
// .FirstOrDefault() /* there should be only one */ as TomeSkillAttribute) != null)
// break;
return base.AllowsItem(it) && ((SkillManager.FromItem(it) != null && it.CanEquip(Main.localPlayer, this)) || it.IsBlank());
}
示例2: AllowsItem
/// <summary>
/// Gets whether the <see cref="ItemSlot" /> allows the given <see cref="Item" /> or not.
/// </summary>
/// <param name="i">The <see cref="Item" /> to check.</param>
/// <returns>true if the <see cref="Item" /> can be placed in the <see cref="ItemSlot" />, false otherwise.</returns>
public override bool AllowsItem(Item i)
{
return base.AllowsItem(i) && ((i.accessory && i.CanEquip(Main.localPlayer, this)) || i.IsBlank());
}
示例3: MainEffects
//.........这里部分代码省略.........
{
player.meleeDamage += 0.08f;
player.meleeCrit += 8;
}
if (acc.type == 1318)
{
player.meleeCrit += 4;
}
if (acc.type == 2199 || acc.type == 2202)
{
player.aggro += 250;
}
if (acc.type == 2201)
{
player.aggro += 400;
}
if (acc.type == 2199)
{
player.meleeDamage += 0.06f;
}
if (acc.type == 2200)
{
player.meleeDamage += 0.08f;
player.meleeCrit += 8;
player.meleeSpeed += 0.06f;
player.moveSpeed += 0.06f;
}
if (acc.type == 2201)
{
player.meleeDamage += 0.05f;
player.meleeCrit += 5;
}
if (acc.type == 2202)
{
player.meleeSpeed += 0.06f;
player.moveSpeed += 0.06f;
}
if (acc.type == 684)
{
player.rangedDamage += 0.16f;
player.meleeDamage += 0.16f;
}
if (acc.type == 685)
{
player.meleeCrit += 11;
player.rangedCrit += 11;
}
if (acc.type == 686)
{
player.moveSpeed += 0.08f;
player.meleeSpeed += 0.07f;
}
if (acc.type == 2361)
{
player.maxMinions++;
player.minionDamage += 0.04f;
}
if (acc.type == 2362)
{
player.maxMinions++;
player.minionDamage += 0.04f;
}
if (acc.type == 2363)
{
player.minionDamage += 0.05f;
}
if (acc.type >= 1158 && acc.type <= 1161)
{
player.maxMinions++;
}
if (acc.type >= 1159 && acc.type <= 1161)
{
player.minionDamage += 0.1f;
}
if (acc.type >= 2370 && acc.type <= 2371)
{
player.minionDamage += 0.05f;
player.maxMinions++;
}
if (acc.type == 2372)
{
player.minionDamage += 0.06f;
player.maxMinions++;
}
if (acc.type >= 1832 && acc.type <= 1834)
{
player.maxMinions++;
}
if (acc.type >= 1832 && acc.type <= 1834)
{
player.minionDamage += 0.11f;
}
if (!acc.IsBlank())
{
acc.Effects(player);
}
if (acc.prefix != null && acc.prefix.id > 0 /*&& !acc.prefix.Equals(Prefix.None)*/ && acc.prefix.id < Defs.prefixes.Count)
acc.prefix.ApplyToPlayer(player);
}