From 24d410701f0008aecdfb0668ff92938312d0e5bb Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Sun, 21 Nov 2010 14:52:25 +0100 Subject: [PATCH] [10768] Remove useless code in PetAI::_stopAttack() Those are all processed elsewhere and _stopAttack() can not be called when pet is not alive. Signed-off-by: NoFantasy --- src/game/PetAI.cpp | 11 ----------- src/game/PetAI.h | 1 - src/shared/revision_nr.h | 2 +- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp index eaa733292..f30b9540f 100644 --- a/src/game/PetAI.cpp +++ b/src/game/PetAI.cpp @@ -105,17 +105,6 @@ bool PetAI::_needToStop() const void PetAI::_stopAttack() { inCombat = false; - if( !m_creature->isAlive() ) - { - DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "PetAI (guid = %u) stopped attack, he is dead.", m_creature->GetGUIDLow()); - m_creature->StopMoving(); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveIdle(); - m_creature->CombatStop(); - m_creature->getHostileRefManager().deleteReferences(); - - return; - } Unit* owner = m_creature->GetCharmerOrOwner(); diff --git a/src/game/PetAI.h b/src/game/PetAI.h index b09e8d449..e29cec58a 100644 --- a/src/game/PetAI.h +++ b/src/game/PetAI.h @@ -36,7 +36,6 @@ class MANGOS_DLL_DECL PetAI : public CreatureAI void EnterEvadeMode(); void AttackedBy(Unit*); bool IsVisible(Unit *) const; - void JustDied(Unit* /*who*/) { _stopAttack(); } void UpdateAI(const uint32); static int Permissible(const Creature *); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 49c9cf551..8b161dfa2 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10767" + #define REVISION_NR "10768" #endif // __REVISION_NR_H__