Core/Spells: send the correct error message when trying to cast Death Coil on a friendly non-undead target

This commit is contained in:
Ovahlord
2021-05-24 18:42:59 +02:00
parent 1de7cf80ba
commit e0d2e8e902

View File

@@ -292,7 +292,10 @@ class spell_dk_death_coil : public SpellScript
return SPELL_FAILED_UNIT_NOT_INFRONT;
if (target->IsFriendlyTo(caster) && target->GetCreatureType() != CREATURE_TYPE_UNDEAD)
return SPELL_FAILED_BAD_TARGETS;
{
GetSpell()->m_customError = SPELL_CUSTOM_ERROR_TARGET_MUST_BE_UNDEAD;
return SPELL_FAILED_CUSTOM_ERROR;
}
}
else
return SPELL_FAILED_BAD_TARGETS;