Core/Creature: Implemented sparring with max health percent thresholds
Port From (https://github.com/TrinityCore/TrinityCore/commit/0750b7f8455df39a64462636ca296c6f2aa2b048)
This commit is contained in:
@@ -564,6 +564,15 @@ namespace Game.Entities
|
||||
CalculateMeleeDamage(victim, out damageInfo, attType);
|
||||
// Send log damage message to client
|
||||
DealDamageMods(damageInfo.Attacker, victim, ref damageInfo.Damage, ref damageInfo.Absorb);
|
||||
|
||||
// sparring
|
||||
Creature victimCreature = victim.ToCreature();
|
||||
if (victimCreature != null)
|
||||
{
|
||||
if (victimCreature.ShouldFakeDamageFrom(damageInfo.Attacker))
|
||||
damageInfo.HitInfo |= HitInfo.FakeDamage;
|
||||
}
|
||||
|
||||
SendAttackStateUpdate(damageInfo);
|
||||
|
||||
_lastDamagedTargetGuid = victim.GetGUID();
|
||||
|
||||
Reference in New Issue
Block a user