diff options
author | Lopin <davca.hr@seznam.cz> | 2011-08-24 16:45:49 +0200 |
---|---|---|
committer | Lopin <davca.hr@seznam.cz> | 2011-08-24 16:45:49 +0200 |
commit | 8ae290c6d1d2bbd068da387fca5b9690076237c9 (patch) | |
tree | c639f2fe0659db1b2da43243bfc355ffc4cb1341 /src | |
parent | ededca331173474364069d705d5183c089953011 (diff) |
Core/Spells: Fixed quest Salvaging Life's Strength
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 15cee94e909..ae8069747e3 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -859,7 +859,7 @@ public: enum StoppingTheSpread { - NPC_KILL_CREDIT = 18240, + NPC_VILLAGER_KILL_CREDIT = 18240, SPELL_FLAMES = 39199, }; @@ -881,7 +881,7 @@ class spell_q9874_liquid_fire : public SpellScriptLoader if (!caster || !target || (target && target->HasAura(SPELL_FLAMES))) return; - caster->KilledMonsterCredit(NPC_KILL_CREDIT, 0); + caster->KilledMonsterCredit(NPC_VILLAGER_KILL_CREDIT, 0); target->CastSpell(target, SPELL_FLAMES, true); target->DespawnOrUnsummon(60000); } @@ -898,6 +898,47 @@ class spell_q9874_liquid_fire : public SpellScriptLoader }; }; + +enum SalvagingLifesStength +{ + NPC_SHARD_KILL_CREDIT = 29303, +}; + +class spell_q12805_lifeblood_dummy : public SpellScriptLoader +{ + public: + spell_q12805_lifeblood_dummy() : SpellScriptLoader("spell_q12805_lifeblood_dummy") + { + } + + class spell_q12805_lifeblood_dummy_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q12805_lifeblood_dummy_SpellScript); + + void HandleScript(SpellEffIndex /*effIndex*/) + { + Player* caster = GetCaster()->ToPlayer(); + Creature* target = GetHitUnit()->ToCreature(); + if (!caster || !target) + return; + + caster->KilledMonsterCredit(NPC_SHARD_KILL_CREDIT, 0); + target->CastSpell(target, uint32(GetEffectValue()), true); + target->DespawnOrUnsummon(2000); + } + + void Register() + { + OnEffect += SpellEffectFn(spell_q12805_lifeblood_dummy_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_q12805_lifeblood_dummy_SpellScript(); + }; +}; + void AddSC_quest_spell_scripts() { new spell_q55_sacred_cleansing(); @@ -919,4 +960,5 @@ void AddSC_quest_spell_scripts() new spell_symbol_of_life_dummy(); new spell_q12659_ahunaes_knife(); new spell_q9874_liquid_fire(); + new spell_q12805_lifeblood_dummy(); } |