aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 93828865a16..311c37e085f 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -2446,6 +2446,33 @@ public:
}
};
+class spell_q28813_set_health_random : public SpellScriptLoader
+{
+public:
+ spell_q28813_set_health_random() : SpellScriptLoader("spell_q28813_set_health_random") { }
+
+ class spell_q28813_set_health_random_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_q28813_set_health_random_SpellScript);
+
+ void HandleDummyEffect()
+ {
+ Unit* caster = GetCaster();
+ caster->SetHealth(caster->CountPctFromMaxHealth(urand(3, 5)*10));
+ }
+
+ void Register() override
+ {
+ OnCast += SpellCastFn(spell_q28813_set_health_random_SpellScript::HandleDummyEffect);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_q28813_set_health_random_SpellScript();
+ }
+};
+
void AddSC_quest_spell_scripts()
{
new spell_q55_sacred_cleansing();
@@ -2505,4 +2532,5 @@ void AddSC_quest_spell_scripts()
new spell_q14100_q14111_make_player_destroy_totems();
new spell_q10929_fumping();
new spell_q28813_get_our_boys_back_dummy();
+ new spell_q28813_set_health_random();
}