Merge pull request #5343 from kandera/fix_spell_script_stuff

fix a few issues with the spell scripts i made.
This commit is contained in:
QAston committed 2012-02-23 09:35:10 -08:00
commit ccbe209ded
3 files changed
+17 -27

No files matched your search

+4 -6
View File
@@ -1513,7 +1513,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
@@ -1534,11 +1534,9 @@ class spell_item_impale_leviroth : public SpellScriptLoader
void HandleDummy(SpellEffIndex /* effIndex */)
{
Unit* target = GetHitCreature();
if (!target || target->GetEntry() != NPC_LEVIROTH || !target->HealthBelowPct(95))
return;
target->CastSpell(target, SPELL_LEVIROTH_SELF_IMPALE, true);
if (Unit* target = GetHitCreature())
if (target->GetEntry() == NPC_LEVIROTH && target->HealthBelowPct(95))
target->CastSpell(target, SPELL_LEVIROTH_SELF_IMPALE, true);
}
void Register()