mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-06 17:08:23 +01:00
Core/Spells: send the correct error message when trying to cast Death Coil on a friendly non-undead target
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user