diff options
| author | gvcoman <none@none> | 2008-11-08 23:32:15 -0600 |
|---|---|---|
| committer | gvcoman <none@none> | 2008-11-08 23:32:15 -0600 |
| commit | c014d6667c71f1d618fe195b21e2dd86e5407825 (patch) | |
| tree | 1fb039873fd6206d2829adc9e9b31e4a679d76a9 /src/game/Player.cpp | |
| parent | 35a284df7ea832a3c4beaa873af39441b67cb581 (diff) | |
[svn] * Disabled the move and stay commands while pet is possessed
* Make pet come back to its owner after possession ends if it's not currently in combat
* Allow the possessed unit to properly change attack targets
* Also remove charm effects from charmed target on owner aura cancel
--HG--
branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
| -rw-r--r-- | src/game/Player.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 4b4f444471c..b00dadc98dd 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -18764,8 +18764,16 @@ void Player::RemovePossess(bool attack) else { target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + // Reinitialize the pet bar and make the pet come back to the owner if(((Creature*)target)->isPet()) + { PetSpellInitialize(); + if (!target->getVictim()) + { + target->GetMotionMaster()->MoveFollow(this, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); + target->GetCharmInfo()->SetCommandState(COMMAND_FOLLOW); + } + } else if (target->isAlive()) { // If we're still hostile to our target, continue attacking otherwise reset threat and go home |
