mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
*Make the pets of shaman and druid stronger and gain bonus damage from owners' spell damage.
--HG-- branch : trunk
This commit is contained in:
@@ -944,6 +944,23 @@ void Pet::UpdateAttackPowerAndDamage(bool ranged)
|
||||
frost = 0;
|
||||
SetBonusDamage( int32(frost * 0.4f));
|
||||
}
|
||||
//force of nature
|
||||
else if(GetEntry() == 1964)
|
||||
{
|
||||
int32 spellDmg = int32(owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_NATURE)) - owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_NATURE);
|
||||
if(spellDmg > 0)
|
||||
SetBonusDamage(int32(spellDmg * 0.09f));
|
||||
}
|
||||
//greater fire elemental
|
||||
else if(GetEntry() == 15438)
|
||||
{
|
||||
if(Unit* shaman = owner->GetOwner())
|
||||
{
|
||||
int32 spellDmg = int32(shaman->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE)) - shaman->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
|
||||
if(spellDmg > 0)
|
||||
SetBonusDamage(int32(spellDmg * 0.4f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, val + bonusAP);
|
||||
|
||||
Reference in New Issue
Block a user