aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-17 20:00:28 -0500
committermegamage <none@none>2009-08-17 20:00:28 -0500
commitc84d37c2c21371eb871c16b449a9bac0cff6da13 (patch)
treee13d497851d0ad00e6a0c0faad94844a12f23f1c
parent14022b619f41a348521c6442825b033f96c0ce87 (diff)
*Fix the bug that Reset is not called for some scripts. This should fix the bug of quest "death's challenge". Thanks to Kudlaty
--HG-- branch : trunk
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp8
-rw-r--r--src/bindings/scripts/scripts/northrend/naxxramas/boss_anubrekhan.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/naxxramas/boss_sapphiron.cpp2
-rw-r--r--src/game/AggressorAI.cpp2
4 files changed, 12 insertions, 2 deletions
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp
index ec5f1d71988..344ea13695a 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp
@@ -323,6 +323,8 @@ struct TRINITY_DLL_DECL boss_kalecgos_kjAI : public ScriptedAI
m_creature->setActive(true);
Searched = false;
FindOrbs();
+
+ ScriptedAI::InitializeAI();
}
void Reset(){}
@@ -753,6 +755,8 @@ struct TRINITY_DLL_DECL mob_kiljaeden_controllerAI : public Scripted_NoMovementA
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
m_creature->addUnitState(UNIT_STAT_STUNNED);
+
+ ScriptedAI::InitializeAI();
}
void Reset(){
@@ -914,6 +918,8 @@ struct TRINITY_DLL_DECL mob_felfire_portalAI : public Scripted_NoMovementAI
SpawnFiendTimer = 5000;
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+
+ ScriptedAI::InitializeAI();
}
// TODO: Timers
@@ -1066,6 +1072,8 @@ struct TRINITY_DLL_DECL mob_shield_orbAI : public ScriptedAI
my = ShieldOrbLocations[0][1];
if (rand()%2 == 0)Clockwise = true;
else Clockwise = false;
+
+ ScriptedAI::InitializeAI();
}
void Reset(){}
diff --git a/src/bindings/scripts/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/src/bindings/scripts/scripts/northrend/naxxramas/boss_anubrekhan.cpp
index 835a5bfa2da..03f48383c22 100644
--- a/src/bindings/scripts/scripts/northrend/naxxramas/boss_anubrekhan.cpp
+++ b/src/bindings/scripts/scripts/northrend/naxxramas/boss_anubrekhan.cpp
@@ -45,7 +45,7 @@ struct TRINITY_DLL_DECL boss_anubrekhanAI : public BossAI
DoSpawnCreature(MOB_CRYPT_GUARD, 0, -10, 0, me->GetOrientation(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
}
- void InitializeAI() { Prepare(); }
+ void InitializeAI() { Prepare(); BossAI::InitializeAI(); }
void JustReachedHome() { Prepare(); _JustReachedHome(); }
void KilledUnit(Unit* victim)
diff --git a/src/bindings/scripts/scripts/northrend/naxxramas/boss_sapphiron.cpp b/src/bindings/scripts/scripts/northrend/naxxramas/boss_sapphiron.cpp
index f0dd9e735cb..1b2857f7706 100644
--- a/src/bindings/scripts/scripts/northrend/naxxramas/boss_sapphiron.cpp
+++ b/src/bindings/scripts/scripts/northrend/naxxramas/boss_sapphiron.cpp
@@ -85,7 +85,7 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public BossAI
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->SetReactState(REACT_PASSIVE);
- Reset();
+ ScriptedAI::InitializeAI();
}
void Reset()
diff --git a/src/game/AggressorAI.cpp b/src/game/AggressorAI.cpp
index 3050c772e28..3ede976a229 100644
--- a/src/game/AggressorAI.cpp
+++ b/src/game/AggressorAI.cpp
@@ -48,6 +48,8 @@ void SpellAI::InitializeAI()
for(uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
if(me->m_spells[i] && GetSpellStore()->LookupEntry(me->m_spells[i]))
spells.push_back(me->m_spells[i]);
+
+ CreatureAI::InitializeAI();
}
void SpellAI::Reset()