Fix Naxx40 Gluth decimate SpellScript

This commit is contained in:
郑佩茹
2024-06-13 12:17:52 -06:00
parent 977a33dcbf
commit 830574a136

View File

@@ -26,6 +26,7 @@ enum Spells
SPELL_MORTAL_WOUND = 25646, SPELL_MORTAL_WOUND = 25646,
SPELL_ENRAGE = 28371, SPELL_ENRAGE = 28371,
SPELL_DECIMATE = 28374, SPELL_DECIMATE = 28374,
SPELL_DECIMATE_DAMAGE = 28375,
SPELL_BERSERK = 26662, SPELL_BERSERK = 26662,
SPELL_INFECTED_WOUND = 29306, SPELL_INFECTED_WOUND = 29306,
SPELL_CHOW_SEARCHER = 28404 SPELL_CHOW_SEARCHER = 28404
@@ -254,6 +255,11 @@ class spell_gluth_decimate : public SpellScript
{ {
PrepareSpellScript(spell_gluth_decimate); PrepareSpellScript(spell_gluth_decimate);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_DECIMATE_DAMAGE });
}
void HandleScriptEffect(SpellEffIndex /*effIndex*/) void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{ {
if (Unit* unitTarget = GetHitUnit()) if (Unit* unitTarget = GetHitUnit())
@@ -270,7 +276,7 @@ class spell_gluth_decimate : public SpellScript
Unit::DealDamage(GetCaster(), cTarget, damage); Unit::DealDamage(GetCaster(), cTarget, damage);
return; return;
} }
GetCaster()->CastCustomSpell(28375, SPELLVALUE_BASE_POINT0, damage, unitTarget); GetCaster()->CastCustomSpell(SPELL_DECIMATE_DAMAGE, SPELLVALUE_BASE_POINT0, damage, unitTarget);
} }
} }