Core/Auras: Implemented SPELL_AURA_OVERRIDE_SPELL_POWER_BY_AP_PCT

This commit is contained in:
Shauren
2015-06-11 00:09:19 +02:00
parent 26961d8ae5
commit 5249be851f
4 changed files with 35 additions and 2 deletions
+6 -1
View File
@@ -154,6 +154,9 @@ bool Player::UpdateStats(Stats stat)
void Player::ApplySpellPowerBonus(int32 amount, bool apply)
{
if (HasAuraType(SPELL_AURA_OVERRIDE_SPELL_POWER_BY_AP_PCT))
return;
apply = _ModifyUInt32(apply, m_baseSpellPower, amount);
// For speed just update for client
@@ -347,7 +350,9 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
UpdateDamagePhysical(BASE_ATTACK);
if (CanDualWield() && haveOffhandWeapon()) //allow update offhand damage only if player knows DualWield Spec and has equipped offhand weapon
UpdateDamagePhysical(OFF_ATTACK);
if (getClass() == CLASS_SHAMAN || getClass() == CLASS_PALADIN) // mental quickness
if (HasAuraType(SPELL_AURA_MOD_SPELL_DAMAGE_OF_ATTACK_POWER) ||
HasAuraType(SPELL_AURA_MOD_SPELL_HEALING_OF_ATTACK_POWER) ||
HasAuraType(SPELL_AURA_OVERRIDE_SPELL_POWER_BY_AP_PCT))
UpdateSpellDamageAndHealingBonus();
if (pet && pet->IsPetGhoul()) // At melee attack power change for DK pet