diff options
author | gvcoman <none@none> | 2008-11-20 20:27:04 -0500 |
---|---|---|
committer | gvcoman <none@none> | 2008-11-20 20:27:04 -0500 |
commit | 4495efa1aeaf58650dfcee95f709969cc33ce6c8 (patch) | |
tree | 844f5f69e73f6bcfd4b3bd306ca83bd38683e91e /src/game/PossessedAI.cpp | |
parent | df6a8e5f8e11e914843db0dc9c41f3a415587cfd (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/PossessedAI.cpp')
-rw-r--r-- | src/game/PossessedAI.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/PossessedAI.cpp b/src/game/PossessedAI.cpp index 6b803303185..8abbb7f2603 100644 --- a/src/game/PossessedAI.cpp +++ b/src/game/PossessedAI.cpp @@ -24,7 +24,7 @@ void PossessedAI::AttackStart(Unit *u)
{
- if( !u )
+ if( !u || i_pet.GetCharmer()->HasAuraType(SPELL_AURA_MOD_PACIFY))
return;
if (i_pet.getVictim() && u != i_pet.getVictim())
@@ -95,7 +95,7 @@ void PossessedAI::UpdateAI(const uint32 diff) _stopAttack(); // i_victimGuid == 0 && i_pet.getVictim() == NULL now
return;
}
- else if(i_pet.IsWithinCombatDist(i_pet.getVictim(), ATTACK_DISTANCE) && i_pet.isAttackReady())
+ else if(i_pet.IsWithinCombatDist(i_pet.getVictim(), ATTACK_DISTANCE) && i_pet.isAttackReady() && !i_pet.GetCharmer()->HasAuraType(SPELL_AURA_MOD_PACIFY))
{
i_pet.AttackerStateUpdate(i_pet.getVictim());
|