Core/Creatures: Implemented unkillable flag (prevent health from going below 1)
Port From (https://github.com/TrinityCore/TrinityCore/commit/7ea438ebdca93874776e02e9985db1da0a53f2fb)
This commit is contained in:
@@ -2591,6 +2591,10 @@ namespace Game.Entities
|
||||
|
||||
duel_hasEnded = true;
|
||||
}
|
||||
else if (victim.IsCreature() && damageTaken >= health && victim.ToCreature().HasFlag(CreatureStaticFlags.Unkillable))
|
||||
{
|
||||
damageTaken = health - 1;
|
||||
}
|
||||
else if (victim.IsVehicle() && damageTaken >= (health - 1) && victim.GetCharmer() != null && victim.GetCharmer().IsTypeId(TypeId.Player))
|
||||
{
|
||||
Player victimRider = victim.GetCharmer().ToPlayer();
|
||||
|
||||
Reference in New Issue
Block a user