fix(Core/Spells): Shadow Word: Death vs critters. (#15594)

Fixes #14299
This commit is contained in:
UltraNix
2023-03-29 06:27:17 +02:00
committed by GitHub
parent 7f711c0f3f
commit 7035e87543
2 changed files with 9 additions and 4 deletions

View File

@@ -12566,15 +12566,18 @@ bool Player::isHonorOrXPTarget(Unit* victim) const
// Victim level less gray level
if (v_level <= k_grey)
{
return false;
}
if (victim->GetTypeId() == TYPEID_UNIT)
{
if (victim->IsTotem() ||
victim->IsPet() ||
victim->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP)
if (victim->IsTotem() || victim->IsCritter() || victim->IsPet() || (victim->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP))
{
return false;
}
}
return true;
}