fix(Core/Spells): Shadow Word: Death vs critters. (#15594)
Fixes #14299
This commit is contained in:
@@ -12566,15 +12566,18 @@ bool Player::isHonorOrXPTarget(Unit* victim) const
|
|||||||
|
|
||||||
// Victim level less gray level
|
// Victim level less gray level
|
||||||
if (v_level <= k_grey)
|
if (v_level <= k_grey)
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (victim->GetTypeId() == TYPEID_UNIT)
|
if (victim->GetTypeId() == TYPEID_UNIT)
|
||||||
{
|
{
|
||||||
if (victim->IsTotem() ||
|
if (victim->IsTotem() || victim->IsCritter() || victim->IsPet() || (victim->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP))
|
||||||
victim->IsPet() ||
|
{
|
||||||
victim->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP)
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17980,8 +17980,10 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
|
|||||||
sScriptMgr->OnCreatureKilledByPet( killer->GetCharmerOrOwnerPlayerOrPlayerItself(), victim->ToCreature());
|
sScriptMgr->OnCreatureKilledByPet( killer->GetCharmerOrOwnerPlayerOrPlayerItself(), victim->ToCreature());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (killer != victim && !victim->IsCritter())
|
if (killer != victim)
|
||||||
|
{
|
||||||
Unit::ProcDamageAndSpell(killer, victim, killer ? PROC_FLAG_KILL : 0, PROC_FLAG_KILLED, PROC_EX_NONE, 0, attackType, spellProto, nullptr, -1, spell);
|
Unit::ProcDamageAndSpell(killer, victim, killer ? PROC_FLAG_KILL : 0, PROC_FLAG_KILLED, PROC_EX_NONE, 0, attackType, spellProto, nullptr, -1, spell);
|
||||||
|
}
|
||||||
|
|
||||||
// Proc auras on death - must be before aura/combat remove
|
// Proc auras on death - must be before aura/combat remove
|
||||||
Unit::ProcDamageAndSpell(victim, nullptr, PROC_FLAG_DEATH, PROC_FLAG_NONE, PROC_EX_NONE, 0, attackType, spellProto, nullptr, -1, spell);
|
Unit::ProcDamageAndSpell(victim, nullptr, PROC_FLAG_DEATH, PROC_FLAG_NONE, PROC_EX_NONE, 0, attackType, spellProto, nullptr, -1, spell);
|
||||||
|
|||||||
Reference in New Issue
Block a user