Core/Globals: cache SpellSpecific and AuraState information instead of computing them each time they're needed

This commit is contained in:
roc13x committed 2017-05-04 00:12:11 +01:00
1 parent c6aa63536e
commit 0b2e5adeb1
5 files changed
+30

No files matched your search

+17
View File
@@ -3821,6 +3821,23 @@ void SpellMgr::LoadSpellInfoCorrections()
TC_LOG_INFO("server.loading", ">> Loaded SpellInfo corrections in %u ms", GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellInfoSpellSpecificAndAuraState()
{
uint32 oldMSTime = getMSTime();
for (SpellInfo* spellInfo : mSpellInfoMap)
{
if (!spellInfo)
continue;
// AuraState depends on SpellSpecific
spellInfo->_LoadSpellSpecific();
spellInfo->_LoadAuraState();
}
TC_LOG_INFO("server.loading", ">> Loaded SpellInfo SpellSpecific and AuraState in %u ms", GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellInfoImmunities()
{
uint32 oldMSTime = getMSTime();