*Set boss active=false after they arrive home. This fix the bug that boss is stuck at some far away grid and there spawns another boss.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-27 23:26:08 -05:00
parent c61ef6c73c
commit 773f9d072c
3 changed files with 3 additions and 2 deletions

View File

@@ -621,7 +621,6 @@ BossAI::BossAI(Creature *c, uint32 id) : ScriptedAI(c)
void BossAI::_Reset()
{
me->setActive(false);
events.Reset();
summons.DespawnAll();
if(instance)

View File

@@ -219,11 +219,13 @@ struct TRINITY_DLL_DECL BossAI : public ScriptedAI
void Reset() { _Reset(); }
void EnterCombat(Unit *who) { _EnterCombat(); }
void JustDied(Unit *killer) { _JustDied(); }
void JustReachedHome() { me->setActive(false); }
protected:
void _Reset();
void _EnterCombat();
void _JustDied();
void _JustReachedHome() { me->setActive(false); }
bool CheckInRoom()
{

View File

@@ -46,7 +46,7 @@ struct TRINITY_DLL_DECL boss_anubrekhanAI : public BossAI
}
void InitializeAI() { Prepare(); }
void JustReachedHome() { Prepare(); }
void JustReachedHome() { Prepare(); _JustReachedHome(); }
void KilledUnit(Unit* victim)
{