Misc fixes
This commit is contained in:
@@ -465,7 +465,7 @@ namespace Game.Combat
|
|||||||
oldVictimRef = null;
|
oldVictimRef = null;
|
||||||
|
|
||||||
// in 99% of cases - we won't need to actually look at anything beyond the first element
|
// in 99% of cases - we won't need to actually look at anything beyond the first element
|
||||||
ThreatReference highest = _sortedThreatList.Max();
|
ThreatReference highest = _sortedThreatList.First();
|
||||||
// if the highest reference is offline, the entire list is offline, and we indicate this
|
// if the highest reference is offline, the entire list is offline, and we indicate this
|
||||||
if (!highest.IsAvailable())
|
if (!highest.IsAvailable())
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -3393,11 +3393,11 @@ namespace Game.Entities
|
|||||||
// we want to have all auras removed, so use your brain when linking events
|
// 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++)
|
for (int counter = 0; !m_appliedAuras.Empty() || !m_ownedAuras.Empty(); counter++)
|
||||||
{
|
{
|
||||||
while (!m_appliedAuras.Empty())
|
foreach (var aurAppIter in GetAppliedAuras())
|
||||||
_UnapplyAura(m_appliedAuras.First(), AuraRemoveMode.Default);
|
_UnapplyAura(aurAppIter, AuraRemoveMode.Default);
|
||||||
|
|
||||||
while (!m_ownedAuras.Empty())
|
foreach (var aurIter in GetOwnedAuras())
|
||||||
RemoveOwnedAura(m_ownedAuras.First());
|
RemoveOwnedAura(aurIter);
|
||||||
|
|
||||||
const int maxIteration = 50;
|
const int maxIteration = 50;
|
||||||
// give this loop a few tries, if there are still auras then log as much information as possible
|
// give this loop a few tries, if there are still auras then log as much information as possible
|
||||||
@@ -3608,6 +3608,10 @@ namespace Game.Entities
|
|||||||
// removes aura application from lists and unapplies effects
|
// removes aura application from lists and unapplies effects
|
||||||
public void _UnapplyAura(KeyValuePair<uint, AuraApplication> pair, AuraRemoveMode removeMode)
|
public void _UnapplyAura(KeyValuePair<uint, AuraApplication> pair, AuraRemoveMode removeMode)
|
||||||
{
|
{
|
||||||
|
//Check if aura was already removed, if so just return.
|
||||||
|
if (!m_appliedAuras.Remove(pair))
|
||||||
|
return;
|
||||||
|
|
||||||
AuraApplication aurApp = pair.Value;
|
AuraApplication aurApp = pair.Value;
|
||||||
Cypher.Assert(aurApp != null);
|
Cypher.Assert(aurApp != null);
|
||||||
Cypher.Assert(!aurApp.HasRemoveMode());
|
Cypher.Assert(!aurApp.HasRemoveMode());
|
||||||
@@ -3624,8 +3628,6 @@ namespace Game.Entities
|
|||||||
|
|
||||||
Unit caster = aura.GetCaster();
|
Unit caster = aura.GetCaster();
|
||||||
|
|
||||||
m_appliedAuras.Remove(pair);
|
|
||||||
|
|
||||||
if (aura.GetSpellInfo().HasAnyAuraInterruptFlag())
|
if (aura.GetSpellInfo().HasAnyAuraInterruptFlag())
|
||||||
{
|
{
|
||||||
m_interruptableAuras.Remove(aurApp);
|
m_interruptableAuras.Remove(aurApp);
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ namespace Game
|
|||||||
if (mmap == null)
|
if (mmap == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return mmap.navMeshQueries[instanceId];
|
return mmap.navMeshQueries.LookupByKey(instanceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint GetLoadedTilesCount() { return loadedTiles; }
|
public uint GetLoadedTilesCount() { return loadedTiles; }
|
||||||
|
|||||||
Reference in New Issue
Block a user