aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2014_09_16_02_world_spell_script_names.sql4
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp47
2 files changed, 51 insertions, 0 deletions
diff --git a/sql/updates/world/2014_09_16_02_world_spell_script_names.sql b/sql/updates/world/2014_09_16_02_world_spell_script_names.sql
new file mode 100644
index 00000000000..de211bdc88d
--- /dev/null
+++ b/sql/updates/world/2014_09_16_02_world_spell_script_names.sql
@@ -0,0 +1,4 @@
+--
+DELETE FROM `spell_script_names` WHERE `spell_id` = 39238;
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(39238, 'spell_q10929_fumping');
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 00ce2cb280e..9c65567fe7f 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -2348,6 +2348,52 @@ class spell_q14100_q14111_make_player_destroy_totems : public SpellScriptLoader
}
};
+enum Fumping
+{
+ SPELL_SUMMON_SAND_GNOME = 39240,
+ SPELL_SUMMON_BONE_SLICER = 39241
+};
+
+// 39238 - Fumping
+class spell_q10929_fumping : SpellScriptLoader
+{
+ public:
+ spell_q10929_fumping() : SpellScriptLoader("spell_q10929_fumping") { }
+
+ class spell_q10929_fumpingAuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_q10929_fumpingAuraScript);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_SAND_GNOME))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_BONE_SLICER))
+ return false;
+ return true;
+ }
+
+ void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
+ return;
+
+ if (Unit* caster = GetCaster())
+ caster->CastSpell(caster, urand(SPELL_SUMMON_SAND_GNOME, SPELL_SUMMON_BONE_SLICER), true);
+ }
+
+ void Register() override
+ {
+ OnEffectRemove += AuraEffectRemoveFn(spell_q10929_fumpingAuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_q10929_fumpingAuraScript();
+ }
+};
+
void AddSC_quest_spell_scripts()
{
new spell_q55_sacred_cleansing();
@@ -2405,4 +2451,5 @@ void AddSC_quest_spell_scripts()
new spell_q12919_gymers_throw();
new spell_q13400_illidan_kill_master();
new spell_q14100_q14111_make_player_destroy_totems();
+ new spell_q10929_fumping();
}