public Strength GetSkillStrength(Tolerance tolerance) { int num = 0; foreach (AffectEffectProperty affectEffectProperty in this.affectEffect) { if (affectEffectProperty != null) { Strength strength = Strength.None; if (affectEffectProperty.ThisSkillIsAttack && affectEffectProperty.powerType == PowerType.Percentage) { strength = tolerance.GetAttributeStrength(affectEffectProperty.attribute); } else if (Tolerance.OnInfluenceToleranceAffectEffect(affectEffectProperty.type)) { strength = tolerance.GetAffectEffectStrength(affectEffectProperty.type); } switch (strength) { case Strength.Strong: num--; break; case Strength.Weak: num++; break; case Strength.Drain: return(Strength.Drain); case Strength.Invalid: return(Strength.Weak); } } } if (num < 0) { return(Strength.Weak); } if (num > 0) { return(Strength.Strong); } return(Strength.None); }
public Strength[] GetSkillStrengthList(Tolerance tolerance) { List <Strength> list = new List <Strength>(); foreach (AffectEffectProperty affectEffectProperty in this.affectEffect) { if (affectEffectProperty != null) { if (affectEffectProperty.ThisSkillIsAttack && affectEffectProperty.canUseAttribute && affectEffectProperty.powerType == PowerType.Percentage) { Strength attributeStrength = tolerance.GetAttributeStrength(affectEffectProperty.attribute); if (!list.Contains(attributeStrength)) { list.Add(attributeStrength); } } } } if (list.Count == 0) { list.Add(Strength.None); } return(list.ToArray()); }