mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Compile fixes
This commit is contained in:
@@ -749,6 +749,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2623,6 +2623,19 @@ void SpellMgr::LoadSpellAreas()
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
// Temporary structure to hold spell effect entries for faster loading
|
||||
struct SpellEffectArray
|
||||
{
|
||||
SpellEffectArray()
|
||||
{
|
||||
effects[0] = NULL;
|
||||
effects[1] = NULL;
|
||||
effects[2] = NULL;
|
||||
}
|
||||
|
||||
SpellEffectEntry const* effects[MAX_SPELL_EFFECTS];
|
||||
};
|
||||
|
||||
void SpellMgr::LoadSpellInfoStore()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
@@ -2630,24 +2643,6 @@ void SpellMgr::LoadSpellInfoStore()
|
||||
UnloadSpellInfoStore();
|
||||
mSpellInfoMap.resize(sSpellStore.GetNumRows(), NULL);
|
||||
|
||||
// Temporary structure to hold spell effect entries for faster loading
|
||||
struct SpellEffectArray
|
||||
{
|
||||
SpellEffectArray()
|
||||
{
|
||||
effects[0] = NULL;
|
||||
effects[1] = NULL;
|
||||
effects[2] = NULL;
|
||||
}
|
||||
|
||||
SpellEffectEntry const* effects[MAX_SPELL_EFFECTS];
|
||||
|
||||
SpellEffectEntry const*& operator[](int index)
|
||||
{
|
||||
return effects[index];
|
||||
}
|
||||
};
|
||||
|
||||
std::map<uint32, SpellEffectArray> effectsBySpell;
|
||||
|
||||
for (uint32 i = 0; i < sSpellEffectStore.GetNumRows(); ++i)
|
||||
@@ -2656,14 +2651,12 @@ void SpellMgr::LoadSpellInfoStore()
|
||||
if (!effect)
|
||||
continue;
|
||||
|
||||
effectsBySpell[effect->EffectSpellId][effect->EffectIndex] = effect;
|
||||
effectsBySpell[effect->EffectSpellId].effects[effect->EffectIndex] = effect;
|
||||
}
|
||||
|
||||
for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i)
|
||||
{
|
||||
if (SpellEntry const* spellEntry = sSpellStore.LookupEntry(i))
|
||||
mSpellInfoMap[i] = new SpellInfo(spellEntry, effectsBySpell[i].effects);
|
||||
}
|
||||
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded spell info store in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user