Set Spirit Wolf attack speed at 1.5s (enhancement shaman spell Feral Spirit)

Update Spirit Wolf Attack Power when shaman Attack power change

Signed-off-by: dr.skull <dr.skull@centrum.sk>
This commit is contained in:
dr.skull
2013-02-11 15:43:53 +01:00
parent 620a43b4ef
commit 760018647d
3 changed files with 18 additions and 9 deletions
+13 -1
View File
@@ -441,6 +441,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
SetFloatValue(index_mult, attPowerMultiplier); //UNIT_FIELD_(RANGED)_ATTACK_POWER_MULTIPLIER field
Pet* pet = GetPet(); //update pet's AP
Guardian* guardian = GetGuardianPet();
//automatically update weapon damage after attack power modification
if (ranged)
{
@@ -456,8 +457,11 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
if (getClass() == CLASS_SHAMAN || getClass() == CLASS_PALADIN) // mental quickness
UpdateSpellDamageAndHealingBonus();
if (pet && pet->IsPetGhoul()) // At ranged attack change for hunter pet
if (pet && pet->IsPetGhoul()) // At melee attack power change for DK pet
pet->UpdateAttackPowerAndDamage();
if (guardian && guardian->IsSpiritWolf()) // At melee attack power change for Shaman feral spirit
guardian->UpdateAttackPowerAndDamage();
}
}
@@ -1305,6 +1309,14 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged)
bonusAP = owner->GetTotalAttackPowerValue(BASE_ATTACK) * 0.22f;
SetBonusDamage(int32(owner->GetTotalAttackPowerValue(BASE_ATTACK) * 0.1287f));
}
else if (IsSpiritWolf()) //wolf benefit from shaman's attack power
{
float dmg_multiplier = 0.31f;
if (m_owner->GetAuraEffect(63271, 0)) // Glyph of Feral Spirit
dmg_multiplier = 0.61f;
bonusAP = owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier;
SetBonusDamage(int32(owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier));
}
//demons benefit from warlocks shadow or fire damage
else if (isPet())
{