aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/FULL/world_scripts_full.sql1
-rw-r--r--sql/updates/7930_world_scriptname.sql1
-rw-r--r--src/scripts/northrend/icecrown.cpp55
3 files changed, 57 insertions, 0 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index d0e6c84d65c..6c4a6d65c52 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -789,6 +789,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_dame_evniki_kapsalis' WHERE `en
UPDATE `creature_template` SET `ScriptName`='npc_squire_david' WHERE `entry`=33447;
UPDATE `creature_template` SET `ScriptName`='npc_argent_valiant' WHERE `entry`=33448;
UPDATE `creature_template` SET `ScriptName`='npc_argent_tournament_post' WHERE `entry`=35473;
+UPDATE `creature_template` SET `ScriptName`= 'npc_alorah_and_grimmin' WHERE `entry` IN (36101,36102);
/* IRONFORGE */
UPDATE `creature_template` SET `ScriptName`='npc_royal_historian_archesonus' WHERE `entry`=8879;
diff --git a/sql/updates/7930_world_scriptname.sql b/sql/updates/7930_world_scriptname.sql
new file mode 100644
index 00000000000..c94162e8eb1
--- /dev/null
+++ b/sql/updates/7930_world_scriptname.sql
@@ -0,0 +1 @@
+UPDATE `creature_template` SET `ScriptName`= 'npc_alorah_and_grimmin' WHERE `entry` IN (36101,36102); \ No newline at end of file
diff --git a/src/scripts/northrend/icecrown.cpp b/src/scripts/northrend/icecrown.cpp
index aa32cd957b1..7d1f768a2df 100644
--- a/src/scripts/northrend/icecrown.cpp
+++ b/src/scripts/northrend/icecrown.cpp
@@ -284,6 +284,56 @@ CreatureAI* GetAI_npc_argent_tournament_post(Creature* pCreature)
return new npc_argent_tournament_postAI (pCreature);
}
+/*######
+## npc_alorah_and_grimmin
+######*/
+
+enum ealorah_and_grimmin
+{
+ SPELL_CHAIN = 68341,
+ NPC_FJOLA_LIGHTBANE = 36065,
+ NPC_EYDIS_DARKBANE = 36066,
+ NPC_PRIESTESS_ALORAH = 36101,
+ NPC_PRIEST_GRIMMIN = 36102
+};
+
+struct npc_alorah_and_grimminAI : public ScriptedAI
+{
+ npc_alorah_and_grimminAI(Creature* pCreature) : ScriptedAI(pCreature) {}
+
+ uint8 uiCast;
+
+ void Reset()
+ {
+ uiCast = 1;
+ }
+
+ void UpdateAI(const uint32 uiDiff)
+ {
+ if (uiCast = 1)
+ {
+ Creature* pTarget1 = me->FindNearestCreature(NPC_EYDIS_DARKBANE, 10.0f);
+ Creature* pTarget2 = me->FindNearestCreature(NPC_FJOLA_LIGHTBANE, 10.0f);
+ switch(me->GetEntry())
+ {
+ case NPC_PRIESTESS_ALORAH:
+ DoCast(pTarget1, SPELL_CHAIN);
+ uiCast = 0;
+ case NPC_PRIEST_GRIMMIN:
+ DoCast(pTarget2, SPELL_CHAIN);
+ uiCast = 0;
+ }
+ }
+ if (!UpdateVictim())
+ return;
+ }
+};
+
+CreatureAI* GetAI_npc_alorah_and_grimmin(Creature* pCreature)
+{
+ return new npc_alorah_and_grimminAI (pCreature);
+}
+
void AddSC_icecrown()
{
Script *newscript;
@@ -315,4 +365,9 @@ void AddSC_icecrown()
newscript->Name = "npc_argent_tournament_post";
newscript->GetAI = &GetAI_npc_argent_tournament_post;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_alorah_and_grimmin";
+ newscript->GetAI = &GetAI_npc_alorah_and_grimmin;
+ newscript->RegisterSelf();
}