diff options
| author | Shauren <shauren.trinity@gmail.com> | 2012-09-16 00:35:48 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2012-09-16 00:35:48 +0200 |
| commit | 547895762dd00ec3ef7073a0c8a41b1e6ef147de (patch) | |
| tree | 05b87642684c4ab8e8c164bd68ddde299d22200b | |
| parent | e7155144dfece5ace6626a1dd131428ec5255c5a (diff) | |
Compile fixes
| -rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 1 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 35 |
2 files changed, 15 insertions, 21 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 6004e6d36d1..e93d9f25b67 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -749,6 +749,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster) } break; } + } default: break; } diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 82a712209ec..91041384200 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -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)); } |
