cache SpellSpecific and AuraState information instead of computing them each time they're needed

This commit is contained in:
hondacrx
2017-09-01 10:40:48 -04:00
parent a710308c13
commit 6421672adc
8 changed files with 104 additions and 113 deletions
+2 -2
View File
@@ -3922,7 +3922,7 @@ namespace Game.Entities
}
bool auraStateFound = false;
AuraStateType auraState = aura.GetSpellInfo().GetAuraState(GetMap().GetDifficultyID());
AuraStateType auraState = aura.GetSpellInfo().GetAuraState();
if (auraState != 0)
{
bool canBreak = false;
@@ -4095,7 +4095,7 @@ namespace Game.Entities
return;
// Update target aura state flag
AuraStateType aState = aura.GetSpellInfo().GetAuraState(GetMap().GetDifficultyID());
AuraStateType aState = aura.GetSpellInfo().GetAuraState();
if (aState != 0)
ModifyAuraState(aState, true);
+1 -1
View File
@@ -1881,7 +1881,7 @@ namespace Game.Entities
AddInterruptMask((uint)aurSpellInfo.AuraInterruptFlags);
}
AuraStateType aState = aura.GetSpellInfo().GetAuraState(GetMap().GetDifficultyID());
AuraStateType aState = aura.GetSpellInfo().GetAuraState();
if (aState != 0)
m_auraStateAuras.Add(aState, aurApp);