diff options
author | megamage <none@none> | 2009-05-27 23:26:08 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-27 23:26:08 -0500 |
commit | 773f9d072c8cd6bc8859f49c37161070a2bb29c9 (patch) | |
tree | 104abf77e313d838bbb88701313ea7e89092c923 | |
parent | c61ef6c73c1e69162acc97eb8539af284cf5c937 (diff) |
*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
-rw-r--r-- | src/bindings/scripts/include/sc_creature.cpp | 1 | ||||
-rw-r--r-- | src/bindings/scripts/include/sc_creature.h | 2 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp index aa2a3fbf324..347330c2006 100644 --- a/src/bindings/scripts/include/sc_creature.cpp +++ b/src/bindings/scripts/include/sc_creature.cpp @@ -621,7 +621,6 @@ BossAI::BossAI(Creature *c, uint32 id) : ScriptedAI(c) void BossAI::_Reset() { - me->setActive(false); events.Reset(); summons.DespawnAll(); if(instance) diff --git a/src/bindings/scripts/include/sc_creature.h b/src/bindings/scripts/include/sc_creature.h index 6208d10c39e..88801227493 100644 --- a/src/bindings/scripts/include/sc_creature.h +++ b/src/bindings/scripts/include/sc_creature.h @@ -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() { diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp index 476141dfa57..46679f0df5d 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp @@ -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) { |