Fixes aura assert by not removing player when crash from map.

This commit is contained in:
hondacrx
2022-08-01 11:32:31 -04:00
parent bd3dfeb637
commit 8caa99803f
3 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -3393,11 +3393,11 @@ namespace Game.Entities
// we want to have all auras removed, so use your brain when linking events
for (int counter = 0; !m_appliedAuras.Empty() || !m_ownedAuras.Empty(); counter++)
{
foreach (var aurAppIter in GetAppliedAuras())
_UnapplyAura(aurAppIter, AuraRemoveMode.Default);
while (!m_appliedAuras.Empty())
_UnapplyAura(m_appliedAuras.First(), AuraRemoveMode.Default);
foreach (var aurIter in GetOwnedAuras())
RemoveOwnedAura(aurIter);
while (!m_ownedAuras.Empty())
RemoveOwnedAura(m_ownedAuras.First());
const int maxIteration = 50;
// give this loop a few tries, if there are still auras then log as much information as possible