public static int GetAttributeBonus(Mobile m, AosAttribute attr) { int value = 0; SkillMasterySpell spell = null; switch (attr) { case AosAttribute.AttackChance: spell = SkillMasterySpell.GetSpellForParty(m, typeof(InspireSpell)); if (spell != null) { value += spell.PropertyBonus(); } spell = SkillMasterySpell.GetSpellForParty(m, typeof(TribulationSpell)); if (spell != null) { value += spell.PropertyBonus(); } value += FocusedEyeSpell.HitChanceBonus(m); value += PlayingTheOddsSpell.HitChanceBonus(m); value += CalledShotSpell.GetHitChanceBonus(m); value += CombatTrainingSpell.GetHitChanceBonus(m); value += MasteryInfo.SavingThrowChance(m, attr); break; case AosAttribute.DefendChance: spell = SkillMasterySpell.GetSpellForParty(m, typeof(PerseveranceSpell)); if (spell != null) { value += spell.PropertyBonus(); } if (Server.Spells.SkillMasteries.WhiteTigerFormSpell.IsActive(m)) { value += 20; } value += MasteryInfo.SavingThrowChance(m, attr); break; case AosAttribute.RegenHits: spell = SkillMasterySpell.GetSpellForParty(m, typeof(ResilienceSpell)); if (spell != null) { value += spell.PropertyBonus(); } break; case AosAttribute.RegenStam: spell = SkillMasterySpell.GetSpellForParty(m, typeof(ResilienceSpell)); if (spell != null) { value += spell.PropertyBonus(); } break; case AosAttribute.RegenMana: spell = SkillMasterySpell.GetSpellForParty(m, typeof(ResilienceSpell)); if (spell != null) { value += spell.PropertyBonus(); } break; case AosAttribute.BonusHits: spell = SkillMasterySpell.GetSpellForParty(m, typeof(InvigorateSpell)); if (spell != null) { value += spell.StatBonus(); } break; case AosAttribute.WeaponDamage: spell = SkillMasterySpell.GetSpellForParty(m, typeof(InspireSpell)); if (spell != null) { value += spell.DamageBonus(); } value += MasteryInfo.SavingThrowChance(m, attr); break; case AosAttribute.SpellDamage: spell = SkillMasterySpell.GetSpellForParty(m, typeof(InspireSpell)); if (spell != null) { value += spell.PropertyBonus(); } break; case AosAttribute.WeaponSpeed: value += RampageSpell.GetBonus(m, RampageSpell.BonusType.SwingSpeed); value += PlayingTheOddsSpell.SwingSpeedBonus(m); value -= StaggerSpell.GetStagger(m); break; case AosAttribute.BonusStr: value += MasteryInfo.SavingThrowChance(m, attr); break; } return(value); }