diff options
author | MrSmite <no_mail@email.com> | 2012-04-20 20:22:40 -0400 |
---|---|---|
committer | MrSmite <no_mail@email.com> | 2012-04-20 20:22:40 -0400 |
commit | e9fd6d19798c25f2971f37cd270722efac279cdf (patch) | |
tree | 9b0814a120056c5a51468955e5eb84017fa3e957 | |
parent | fb787aee5e50c152f9e4031961ec1c34153f12e5 (diff) |
Fix pets attacking on non-harmful spells
-rwxr-xr-x | src/server/game/Spells/Spell.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index df2b9c35320..f055d669925 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3107,13 +3107,13 @@ void Spell::cast(bool skipCheck) // should be done before the spell is actually executed sScriptMgr->OnPlayerSpellCast(playerCaster, this, skipCheck); - // Let any pets know we've attacked something. As of 3.0.2 pets begin - // attacking their owner's target immediately - if (Pet* playerPet = playerCaster->GetPet()) - { - if (playerPet->isAlive() && playerPet->isControlled() && (m_targets.GetTargetMask() & TARGET_FLAG_UNIT)) - playerPet->AI()->OwnerAttacked(m_targets.GetObjectTarget()->ToUnit()); - } + // As of 3.0.2 pets begin attacking their owner's target immediately + // Let any pets know we've attacked something. Check DmgClass for harmful spells only + // This prevents spells such as Hunter's Mark from triggering pet attack + if (this->GetSpellInfo()->DmgClass != SPELL_DAMAGE_CLASS_NONE) + if (Pet* playerPet = playerCaster->GetPet()) + if (playerPet->isAlive() && playerPet->isControlled() && (m_targets.GetTargetMask() & TARGET_FLAG_UNIT)) + playerPet->AI()->OwnerAttacked(m_targets.GetObjectTarget()->ToUnit()); } SetExecutedCurrently(true); |