aboutsummaryrefslogtreecommitdiff
path: root/src/game/PetHandler.cpp
diff options
context:
space:
mode:
authorgvcoman <none@none>2008-11-20 20:27:04 -0500
committergvcoman <none@none>2008-11-20 20:27:04 -0500
commit4495efa1aeaf58650dfcee95f709969cc33ce6c8 (patch)
tree844f5f69e73f6bcfd4b3bd306ca83bd38683e91e /src/game/PetHandler.cpp
parentdf6a8e5f8e11e914843db0dc9c41f3a415587cfd (diff)
* Don't allow pets to attack in melee if owner is pacified. This applies for possessed "pets" as well.
* Use proper spell ID in unsummoning possessed units on channeling interrupt. * Allow only once to init pet bar for CharmInfo * Export CharmInfo to be available to scripts * Allow to disable the melee attack command when initializing the pet action bar --HG-- branch : trunk
Diffstat (limited to 'src/game/PetHandler.cpp')
-rw-r--r--src/game/PetHandler.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp
index f95be3a9352..d912f42c22b 100644
--- a/src/game/PetHandler.cpp
+++ b/src/game/PetHandler.cpp
@@ -97,6 +97,13 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
break;
case COMMAND_ATTACK: //spellid=1792 //ATTACK
{
+ // Can't attack if owner is pacified
+ if (_player->HasAuraType(SPELL_AURA_MOD_PACIFY))
+ {
+ //pet->SendPetCastFail(spellid, SPELL_FAILED_PACIFIED);
+ //TODO: Send proper error message to client
+ return;
+ }
// only place where pet can be player
pet->clearUnitState(UNIT_STAT_FOLLOW);
uint64 selguid = _player->GetSelection();