diff options
author | Duarte Duarte <dnpd.dd@gmail.com> | 2014-10-18 18:59:31 +0100 |
---|---|---|
committer | Duarte Duarte <dnpd.dd@gmail.com> | 2014-10-18 18:59:31 +0100 |
commit | 670d12722c0ae3a0356779f65088429f5a589a02 (patch) | |
tree | 646a386770873083fc2beca2336bdeb27848784e /src | |
parent | 4a0be2bffc21e30624122ec5f36d6c8479f83385 (diff) | |
parent | 8ecbedccb72cd578f57eb7a7d0ecb4c22c4c089f (diff) |
Merge pull request #13245 from Mihapro/4.3.4
DB/Quests: 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(); } |