mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-17 13:39:46 -04:00
Core/Creatures: Implemented unkillable flag (prevent health from going below 1)
This commit is contained in:
@@ -857,6 +857,10 @@ bool Unit::HasBreakableByDamageCrowdControlAura(Unit* excludeCasterChannel) cons
|
||||
|
||||
duel_hasEnded = true;
|
||||
}
|
||||
else if (victim->IsCreature() && damageTaken >= health && victim->ToCreature()->HasFlag(CREATURE_STATIC_FLAG_UNKILLABLE))
|
||||
{
|
||||
damageTaken = health - 1;
|
||||
}
|
||||
else if (victim->IsVehicle() && damageTaken >= (health-1) && victim->GetCharmer() && victim->GetCharmer()->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Player* victimRider = victim->GetCharmer()->ToPlayer();
|
||||
|
||||
Reference in New Issue
Block a user