fix: Crash on ProcessDelayedDamages (#16166)

This commit is contained in:
Angelo Venturini
2023-05-03 06:27:44 -03:00
committed by GitHub
parent eea71a415e
commit 3dbdea5e28
2 changed files with 6 additions and 1 deletions

View File

@@ -3357,6 +3357,11 @@ void World::AddDelayedDamage(Unit* attacker, Unit* victim, uint32 damage, CleanD
void World::ProcessDelayedDamages()
{
for (auto& damage : _delayedDamages)
{
if (!damage.victim)
continue;
Unit::DealDamage(damage.attacker, damage.victim, damage.damage, damage.cleanDamage, damage.damagetype, damage.damageSchoolMask, damage.spellProto, damage.durabilityLoss);
}
_delayedDamages.clear();
}