aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/scripts/world_scripts_full.sql1
-rw-r--r--sql/updates/world/2011_04_03_10_world_spell_script_names.sql4
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp1
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp43
4 files changed, 48 insertions, 1 deletions
diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql
index 7c7f6755828..0ba5d667f4b 100644
--- a/sql/scripts/world_scripts_full.sql
+++ b/sql/scripts/world_scripts_full.sql
@@ -2123,6 +2123,7 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
( 52308, 'spell_q12683_take_sputum_sample'),
( 55804, 'spell_q12937_relief_for_the_fallen'),
( 54798, 'spell_q12851_going_bearback'),
+( 8593, 'spell_symbol_of_life_dummy'),
-- item
( 23074, 'spell_item_arcanite_dragonling'),
( 8063, 'spell_item_deviate_fish'),
diff --git a/sql/updates/world/2011_04_03_10_world_spell_script_names.sql b/sql/updates/world/2011_04_03_10_world_spell_script_names.sql
new file mode 100644
index 00000000000..c522d73ac8b
--- /dev/null
+++ b/sql/updates/world/2011_04_03_10_world_spell_script_names.sql
@@ -0,0 +1,4 @@
+-- Add spell script
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_symbol_of_life_dummy';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(8593, 'spell_symbol_of_life_dummy');
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 10edae93467..ca0e1d594e0 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -781,7 +781,6 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
{
switch (m_spellInfo->Id)
{
- case 8593: // Symbol of life (restore creature to life)
case 31225: // Shimmering Vessel (restore creature to life)
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index b45038e52a1..e1e66a04baa 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -776,6 +776,48 @@ class spell_q10041_q10040_who_are_they : public SpellScriptLoader
}
};
+enum symboloflife
+{
+ SPELL_PERMANENT_FEIGN_DEATH = 29266,
+};
+
+// 8593 Symbol of life dummy
+class spell_symbol_of_life_dummy : public SpellScriptLoader
+{
+public:
+ spell_symbol_of_life_dummy() : SpellScriptLoader("spell_symbol_of_life_dummy") { }
+
+ class spell_symbol_of_life_dummy_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_symbol_of_life_dummy_SpellScript);
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ if (Creature* target = GetTargetUnit()->ToCreature())
+ {
+ if (target->HasAura(SPELL_PERMANENT_FEIGN_DEATH))
+ {
+ target->RemoveAurasDueToSpell(SPELL_PERMANENT_FEIGN_DEATH);
+ target->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0);
+ target->SetUInt32Value(UNIT_FIELD_FLAGS_2, 0);
+ target->SetHealth(target->GetMaxHealth() / 2);
+ target->SetPower(POWER_MANA, target->GetMaxPower(POWER_MANA) * 0.75);
+ }
+ }
+ }
+
+ void Register()
+ {
+ OnEffect += SpellEffectFn(spell_symbol_of_life_dummy_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_symbol_of_life_dummy_SpellScript();
+ };
+};
+
void AddSC_quest_spell_scripts()
{
new spell_q55_sacred_cleansing();
@@ -794,4 +836,5 @@ void AddSC_quest_spell_scripts()
new spell_q12851_going_bearback();
new spell_q12937_relief_for_the_fallen();
new spell_q10041_q10040_who_are_they();
+ new spell_symbol_of_life_dummy();
}