Core\Aura: Fixed Collection was modified error (i'm sure there is more, trying to cut down on lists having to be copied)

This commit is contained in:
hondacrx
2018-03-09 23:33:27 -05:00
parent c650888eeb
commit 0775ef9c97
+3 -1
View File
@@ -3394,8 +3394,10 @@ namespace Game.Entities
}
public void RemoveAurasDueToItemSpell(uint spellId, ObjectGuid castItemGuid)
{
foreach (var app in m_appliedAuras.LookupByKey(spellId))
var appliedAuras = m_appliedAuras.LookupByKey(spellId);
for (var i = 0; i < appliedAuras.Count; ++i)
{
AuraApplication app = appliedAuras[i];
if (app.GetBase().GetCastItemGUID() == castItemGuid)
{
RemoveAura(app);