本文整理汇总了C#中Stats.RemoveSpecialEffect方法的典型用法代码示例。如果您正苦于以下问题:C# Stats.RemoveSpecialEffect方法的具体用法?C# Stats.RemoveSpecialEffect怎么用?C# Stats.RemoveSpecialEffect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stats
的用法示例。
在下文中一共展示了Stats.RemoveSpecialEffect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RemoveDuplicateRunes
public static void RemoveDuplicateRunes(Stats statsBaseGear, Character character, bool bDW)
{
if (bDW // Check for DW.
&& (character.MainHandEnchant != null && character.OffHandEnchant != null) // Check that both weapons have enchants.
&& character.MainHandEnchant == character.OffHandEnchant) // check that we have duplicate enchants.
{
bool bEffect1Found = false;
bool bEffect2Found = false;
switch (character.MainHandEnchant.Id)
{
case 3368: // FC
foreach (SpecialEffect se1 in statsBaseGear.SpecialEffects())
{
// if we've already found them, and we're seeing them again, then remove these repeats.
if (bEffect1Found && se1.Equals(_SE_FC1))
statsBaseGear.RemoveSpecialEffect(se1);
else if (bEffect2Found && se1.Equals(_SE_FC2))
statsBaseGear.RemoveSpecialEffect(se1);
else if (se1.Equals(_SE_FC1))
bEffect1Found = true;
else if (se1.Equals(_SE_FC2))
bEffect2Found = true;
}
break;
case 3369: // Cinder
foreach (SpecialEffect se1 in statsBaseGear.SpecialEffects())
{
// if we've already found them, and we're seeing them again, then remove these repeats.
if (bEffect1Found && se1.Equals(_SE_CG))
statsBaseGear.RemoveSpecialEffect(se1);
else if (se1.Equals(_SE_CG))
bEffect1Found = true;
}
break;
case 3370: // RazorIce
foreach (SpecialEffect se1 in statsBaseGear.SpecialEffects())
{
// if we've already found them, and we're seeing them again, then remove these repeats.
if (bEffect1Found && se1.Equals(_SE_RI))
{
statsBaseGear.BonusFrostWeaponDamage -= .02f;
statsBaseGear.RemoveSpecialEffect(se1);
}
else if (se1.Equals(_SE_RI))
bEffect1Found = true;
}
break;
}
}
}