Core/Spells: Fix Quest "The Emissary"

This commit is contained in:
Vincent-Michael
2014-07-19 02:43:15 +02:00
parent 1866d8cc06
commit 9a2d86f6ae
2 changed files with 9 additions and 3 deletions
@@ -0,0 +1,3 @@
DELETE FROM `spell_custom_attr` WHERE `entry`=49882
INSERT INTO `spell_custom_attr` (`entry`, `attributes`) VALUES
(49882, 32768);
+6 -3
View File
@@ -2133,7 +2133,7 @@ class spell_item_complete_raptor_capture : public SpellScriptLoader
enum ImpaleLeviroth
{
NPC_LEVIROTH = 26452,
SPELL_LEVIROTH_SELF_IMPALE = 49882,
SPELL_LEVIROTH_SELF_IMPALE = 49882
};
class spell_item_impale_leviroth : public SpellScriptLoader
@@ -2152,11 +2152,14 @@ class spell_item_impale_leviroth : public SpellScriptLoader
return true;
}
void HandleDummy(SpellEffIndex /* effIndex */)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Unit* target = GetHitCreature())
if (Creature* target = GetHitCreature())
if (target->GetEntry() == NPC_LEVIROTH && !target->HealthBelowPct(95))
{
target->CastSpell(target, SPELL_LEVIROTH_SELF_IMPALE, true);
target->ResetPlayerDamageReq();
}
}
void Register() override