diff options
author | Mihapro <miha.penger@siol.net> | 2014-09-30 01:14:24 +0200 |
---|---|---|
committer | Mihapro <miha.penger@siol.net> | 2014-09-30 01:14:24 +0200 |
commit | 8ecbedccb72cd578f57eb7a7d0ecb4c22c4c089f (patch) | |
tree | 882a149cec357e3faf4bca8184bcd223af9ca24e /src | |
parent | f3f81f6b0b57ccfaaa68f74e0b6dba456add5428 (diff) |
Fear No Evil changes
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 28 |
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(); } |