Core/Creatures: Implemented unkillable flag (prevent health from going below 1)
This commit is contained in:
1 parent
577bdd5ff4
commit
7acc26f09f
2 files changed
+12
No files matched your search
@@ -853,6 +853,10 @@ bool Unit::HasBreakableByDamageCrowdControlAura(Unit* excludeCasterChannel) cons
|
||||
|
||||
duel_hasEnded = true;
|
||||
}
|
||||
else if (victim->IsCreature() && damage >= health && victim->ToCreature()->HasStaticFlag(CREATURE_STATIC_FLAG_UNKILLABLE))
|
||||
{
|
||||
damage = health - 1;
|
||||
}
|
||||
else if (victim->IsVehicle() && damage >= (health-1) && victim->GetCharmer() && victim->GetCharmer()->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Player* victimRider = victim->GetCharmer()->ToPlayer();
|
||||
|
||||
Reference in new issue
Block a user