mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
*Handle aura SPELL_AURA_MECHANIC_IMMUNITY_MASK.
*Fix a typo in ap bonus from stat calculation-thanks to megamage for pointing this. --HG-- branch : trunk
This commit is contained in:
@@ -72,12 +72,25 @@ bool Player::UpdateStats(Stats stat)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// Need update (exist AP from stat auras)
|
||||
if (HasAuraTypeWithMiscvalue(SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT, stat))
|
||||
if (stat == STAT_STRENGTH)
|
||||
{
|
||||
UpdateAttackPowerAndDamage(false);
|
||||
if (HasAuraTypeWithMiscvalue(SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT, stat))
|
||||
UpdateAttackPowerAndDamage(true);
|
||||
}
|
||||
else if (stat == STAT_AGILITY)
|
||||
{
|
||||
UpdateAttackPowerAndDamage(false);
|
||||
if (HasAuraTypeWithMiscvalue(SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT, stat))
|
||||
UpdateAttackPowerAndDamage(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Need update (exist AP from stat auras)
|
||||
if (HasAuraTypeWithMiscvalue(SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT, stat))
|
||||
UpdateAttackPowerAndDamage(false);
|
||||
if (HasAuraTypeWithMiscvalue(SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT, stat))
|
||||
UpdateAttackPowerAndDamage(true);
|
||||
}
|
||||
|
||||
UpdateSpellDamageAndHealingBonus();
|
||||
UpdateManaRegen();
|
||||
|
||||
Reference in New Issue
Block a user