mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-21 07:22:02 -04:00
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
This commit is contained in:
@@ -307,6 +307,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
|
||||
SetInt32Value(index, (uint32)base_attPower); //UNIT_FIELD_(RANGED)_ATTACK_POWER field
|
||||
|
||||
Pet* pet = GetPet(); //update pet's AP
|
||||
Guardian* guardian = GetGuardianPet();
|
||||
//automatically update weapon damage after attack power modification
|
||||
if (ranged)
|
||||
{
|
||||
@@ -322,8 +323,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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1098,6 +1102,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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user