aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGacko <gacko28@gmx.de>2014-03-26 18:36:39 +0100
committerGacko <gacko28@gmx.de>2014-03-26 18:36:39 +0100
commit808a1998c6104241dd3da5d983a70798113b017d (patch)
treed8b6d1c8b124aaa3161829160bfed13a72a4cb68
parent17674182c43fa6b5112ad1b11577baf0e08cca91 (diff)
Quest: The Power of the Elements
Remove hack SAI, use aura script
-rw-r--r--sql/updates/world/2014_03_26_00_world_sai.sql6
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp34
2 files changed, 40 insertions, 0 deletions
diff --git a/sql/updates/world/2014_03_26_00_world_sai.sql b/sql/updates/world/2014_03_26_00_world_sai.sql
new file mode 100644
index 00000000000..bb1ac0c9d62
--- /dev/null
+++ b/sql/updates/world/2014_03_26_00_world_sai.sql
@@ -0,0 +1,6 @@
+DELETE FROM `smart_scripts` WHERE `entryorguid`=24601 AND `source_type`=0 AND `id`=2;
+
+DELETE FROM `spell_script_names` WHERE `spell_id`=46374;
+INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUE
+(46374,'spell_windsoul_totem_aura');
+
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp
index f840c0562b3..a489c6e772f 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -2537,6 +2537,39 @@ public:
};
+enum WindsoulTotemAura
+{
+ SPELL_WINDSOUL_CREDT = 46378
+};
+
+class spell_windsoul_totem_aura : public SpellScriptLoader
+{
+public:
+ spell_windsoul_totem_aura() : SpellScriptLoader("spell_windsoul_totem_aura") { }
+
+ class spell_windsoul_totem_aura_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_windsoul_totem_aura_AuraScript);
+
+ void OnRemove(AuraEffect const*, AuraEffectHandleModes)
+ {
+ if (GetTarget()->isDead())
+ if (Unit* caster = GetCaster())
+ caster->CastSpell(NULL, SPELL_WINDSOUL_CREDT);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectRemove += AuraEffectRemoveFn(spell_windsoul_totem_aura_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_windsoul_totem_aura_AuraScript();
+ }
+};
+
void AddSC_borean_tundra()
{
new npc_sinkhole_kill_credit();
@@ -2565,4 +2598,5 @@ void AddSC_borean_tundra()
new npc_valiance_keep_cannoneer();
new npc_warmage_coldarra();
new npc_hidden_cultist();
+ new spell_windsoul_totem_aura();
}