diff options
author | xinef1 <w.szyszko2@gmail.com> | 2017-02-04 19:38:36 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2017-02-04 19:38:36 +0100 |
commit | 0fa38d0ae03e3d301fb1f94c48122ea81f000131 (patch) | |
tree | 1bc09e1df5f7cddbb7a4212693a21f7898b16d04 /src/server/game/Handlers/PetHandler.cpp | |
parent | 2063ef0891c400affb55f80c219d3289567ce7b8 (diff) |
Core/Pets: Fixed flashing pet attack button (#18906)
Diffstat (limited to 'src/server/game/Handlers/PetHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/PetHandler.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index 586f0aa9e6e..89f6e78cc6d 100644 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -138,6 +138,7 @@ void WorldSession::HandlePetStopAttack(WorldPacket &recvData) return; pet->AttackStop(); + pet->ClearInPetCombat(); } void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spellid, uint16 flag, ObjectGuid guid2) @@ -171,6 +172,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe case COMMAND_FOLLOW: //spellid=1792 //FOLLOW pet->AttackStop(); pet->InterruptNonMeleeSpells(false); + pet->ClearInPetCombat(); pet->GetMotionMaster()->MoveFollow(_player, PET_FOLLOW_DIST, pet->GetFollowAngle()); charmInfo->SetCommandState(COMMAND_FOLLOW); @@ -227,9 +229,6 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe } else // charmed player { - if (pet->GetVictim() && pet->GetVictim() != TargetUnit) - pet->AttackStop(); - charmInfo->SetIsCommandAttack(true); charmInfo->SetIsAtStay(false); charmInfo->SetIsFollowing(false); @@ -271,6 +270,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe { case REACT_PASSIVE: //passive pet->AttackStop(); + pet->ClearInPetCombat(); // no break; case REACT_DEFENSIVE: //recovery case REACT_AGGRESSIVE: //activete @@ -361,8 +361,6 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe // This is true if pet has no target or has target but targets differs. if (pet->GetVictim() != unit_target) { - if (pet->GetVictim()) - pet->AttackStop(); pet->GetMotionMaster()->Clear(); if (pet->ToCreature()->IsAIEnabled) pet->ToCreature()->AI()->AttackStart(unit_target); |