mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 01:23:47 +00:00
fix: Crash on ProcessDelayedDamages (#16166)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user