aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/FULL/world_scripts_full.sql3
-rw-r--r--sql/updates/7464_world_scriptname.sql1
-rw-r--r--src/game/ScriptLoader.cpp2
-rw-r--r--src/scripts/CMakeLists.txt1
-rw-r--r--src/scripts/northrend/crystalsong_forest.cpp114
-rw-r--r--win/VC90/game.vcproj4
6 files changed, 125 insertions, 0 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index d58912b82f1..199649a2d69 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -409,6 +409,9 @@ UPDATE `creature_template` SET `ScriptName`='npc_ragged_john' WHERE `entry`=9563
/* CAVERNS OF TIME */
+/* CRYSTALSONG FOREST */
+UPDATE `creature_template` SET `ScriptName`='npc_warmage_violetstand' WHERE `entry` IN (32369,32371,32372);
+
/* MT. HYJAL */
UPDATE `instance_template` SET `script`='instance_hyjal' WHERE `map`=534;
UPDATE `creature_template` SET `ScriptName`='npc_tyrande_whisperwind' WHERE `entry`=17948;
diff --git a/sql/updates/7464_world_scriptname.sql b/sql/updates/7464_world_scriptname.sql
new file mode 100644
index 00000000000..9aa5dd37177
--- /dev/null
+++ b/sql/updates/7464_world_scriptname.sql
@@ -0,0 +1 @@
+UPDATE `creature_template` SET `ScriptName`='npc_warmage_violetstand' WHERE `entry` IN (32369,32371,32372); \ No newline at end of file
diff --git a/src/game/ScriptLoader.cpp b/src/game/ScriptLoader.cpp
index ce2df8c2f5a..cd28fd10c27 100644
--- a/src/game/ScriptLoader.cpp
+++ b/src/game/ScriptLoader.cpp
@@ -385,6 +385,7 @@ void AddSC_icecrown();
void AddSC_sholazar_basin();
void AddSC_storm_peaks();
void AddSC_zuldrak();
+void AddSC_crystalsong_forest();
//outland
void AddSC_boss_exarch_maladaar(); //Auchindoun Auchenai Crypts
@@ -851,6 +852,7 @@ void AddScripts()
AddSC_sholazar_basin();
AddSC_storm_peaks();
AddSC_zuldrak();
+ AddSC_crystalsong_forest();
//outland
AddSC_boss_exarch_maladaar(); //Auchindoun Auchenai Crypts
diff --git a/src/scripts/CMakeLists.txt b/src/scripts/CMakeLists.txt
index e7e3cfe9b5f..9d118443962 100644
--- a/src/scripts/CMakeLists.txt
+++ b/src/scripts/CMakeLists.txt
@@ -444,6 +444,7 @@ SET(scripts_STAT_SRCS
northrend/sholazar_basin.cpp
northrend/storm_peaks.cpp
northrend/zuldrak.cpp
+ northrend/crystalsong_forest.cpp
outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
outland/auchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp
outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp
diff --git a/src/scripts/northrend/crystalsong_forest.cpp b/src/scripts/northrend/crystalsong_forest.cpp
new file mode 100644
index 00000000000..00a70003b54
--- /dev/null
+++ b/src/scripts/northrend/crystalsong_forest.cpp
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2010 Trinity <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* Script Data Start
+SDName: CrystalSongForest
+SDAuthor: Malcrom
+SD%Complete: 99%
+SDComment:
+SDCategory: CrystalsongForest
+Script Data End */
+
+#include "ScriptedPch.h"
+
+/*******************************************************
+ * npc_warmage_violetstand
+ *******************************************************/
+
+enum Spells
+{
+ SPELL_TRANSITUS_SHIELD_BEAM = 48310
+};
+
+enum NPCs
+{
+ NPC_TRANSITUS_SHIELD_DUMMY = 27306,
+ NPC_WARMAGE_SARINA = 32369,
+ NPC_WARMAGE_HALISTER = 32371,
+ NPC_WARMAGE_ILSUDRIA = 32372
+};
+
+struct npc_warmage_violetstandAI : public Scripted_NoMovementAI
+{
+ npc_warmage_violetstandAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature){}
+
+ uint32 m_uiTimer; //Timer until recast
+ std::list<Creature *> orbList;
+
+ void Reset()
+ {
+ m_uiTimer = 0;
+ }
+
+ void Aggro(Unit* pWho){}
+
+ void AttackStart(Unit* pWho){}
+
+ void UpdateAI(const uint32 uiDiff)
+ {
+ if (m_uiTimer <= uiDiff)
+ {
+ m_creature->CastStop();
+ Creature* pTarget = GetClosestCreatureWithEntry(me,NPC_TRANSITUS_SHIELD_DUMMY,32.0f);
+
+ switch(me->GetEntry())
+ {
+ case NPC_WARMAGE_SARINA:
+ GetCreatureListWithEntryInGrid(orbList, m_creature, NPC_TRANSITUS_SHIELD_DUMMY, 32.0f);
+ if (!orbList.empty())
+ {
+ for (std::list<Creature*>::iterator itr = orbList.begin(); itr != orbList.end(); ++itr)
+ {
+ if (Creature* pOrb = *itr)
+ if (pOrb->GetPositionY() < 1000)
+ DoCast(pOrb,SPELL_TRANSITUS_SHIELD_BEAM);
+ }
+ }
+ m_uiTimer = 90000;
+ break;
+ case NPC_WARMAGE_HALISTER:
+ case NPC_WARMAGE_ILSUDRIA:
+ if (pTarget)
+ DoCast(pTarget,SPELL_TRANSITUS_SHIELD_BEAM);
+ m_uiTimer = 90000;
+ break;
+ }
+ }
+ else m_uiTimer -= uiDiff;
+
+ ScriptedAI::UpdateAI(uiDiff);
+
+ if (!UpdateVictim())
+ return;
+ }
+};
+
+CreatureAI* GetAI_npc_warmage_violetstand(Creature* pCreature)
+{
+ return new npc_warmage_violetstandAI(pCreature);
+}
+
+void AddSC_crystalsong_forest()
+{
+ Script *newscript;
+
+ newscript = new Script;
+ newscript->Name = "npc_warmage_violetstand";
+ newscript->GetAI = &GetAI_npc_warmage_violetstand;
+ newscript->RegisterSelf();
+} \ No newline at end of file
diff --git a/win/VC90/game.vcproj b/win/VC90/game.vcproj
index 2f197eab7f1..3cd3d712c51 100644
--- a/win/VC90/game.vcproj
+++ b/win/VC90/game.vcproj
@@ -3042,6 +3042,10 @@
>
</File>
<File
+ RelativePath="..\..\src\scripts\northrend\crystalsong_forest.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\src\scripts\northrend\dalaran.cpp"
>
</File>