Core/Spells: Implemented SPELL_ATTR9_CANNOT_KILL_TARGET

Port From (https://github.com/TrinityCore/TrinityCore/commit/b3bdb4efef5d89df023fcccd6975edfd1ebd9903)
This commit is contained in:
Hondacrx
2024-08-31 17:39:01 -04:00
parent bc7568ca34
commit b4c955379f
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -2782,6 +2782,9 @@ namespace Game.Entities
}
}
if (spellProto != null && spellProto.HasAttribute(SpellAttr9.CannotKillTarget) && damageTaken >= health)
damageTaken = health - 1;
if (attacker != null && attacker != victim)
{
Player killer = attacker.ToPlayer();