Core/Spells: Implemented SPELL_ATTR9_CANNOT_KILL_TARGET

This commit is contained in:
Shauren
2024-07-03 14:35:01 +02:00
parent 90610b4f6f
commit b3bdb4efef
3 changed files with 7 additions and 4 deletions
+3
View File
@@ -940,6 +940,9 @@ bool Unit::HasBreakableByDamageCrowdControlAura(Unit* excludeCasterChannel) cons
}
}
if (spellProto && spellProto->HasAttribute(SPELL_ATTR9_CANNOT_KILL_TARGET) && damageTaken >= health)
damageTaken = health - 1;
if (attacker && attacker != victim)
{
if (Player* killer = attacker->ToPlayer())