aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2011_08_24_02_world_spell_script_names.sql4
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp46
2 files changed, 48 insertions, 2 deletions
diff --git a/sql/updates/world/2011_08_24_02_world_spell_script_names.sql b/sql/updates/world/2011_08_24_02_world_spell_script_names.sql
new file mode 100644
index 00000000000..1799d408747
--- /dev/null
+++ b/sql/updates/world/2011_08_24_02_world_spell_script_names.sql
@@ -0,0 +1,4 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=54190;
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`)
+VALUES
+(54190,'spell_q12805_lifeblood_dummy');
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();
}