aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/SpellMgr.cpp')
-rw-r--r--src/server/game/Spells/SpellMgr.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 6cf7597e024..3d71f8c9d9d 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -20,6 +20,7 @@
#include "BattlefieldMgr.h"
#include "BattlegroundMgr.h"
#include "Chat.h"
+#include "DB2HotfixGenerator.h"
#include "DB2Stores.h"
#include "DatabaseEnv.h"
#include "LanguageMgr.h"
@@ -2074,19 +2075,11 @@ void SpellMgr::LoadSkillLineAbilityMap()
mSkillLineAbilityMap.clear();
- uint32 count = 0;
-
- for (uint32 i = 0; i < sSkillLineAbilityStore.GetNumRows(); ++i)
- {
- SkillLineAbilityEntry const* SkillInfo = sSkillLineAbilityStore.LookupEntry(i);
- if (!SkillInfo)
- continue;
-
- mSkillLineAbilityMap.insert(SkillLineAbilityMap::value_type(SkillInfo->Spell, SkillInfo));
- ++count;
- }
+ for (SkillLineAbilityEntry const* skillLineAbility : sSkillLineAbilityStore)
+ mSkillLineAbilityMap.emplace(skillLineAbility->Spell, skillLineAbility);
- TC_LOG_INFO("server.loading", ">> Loaded {} SkillLineAbility MultiMap Data in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded {} SkillLineAbility MultiMap Data in {} ms",
+ mSkillLineAbilityMap.size(), GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellPetAuras()
@@ -4827,12 +4820,19 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->MaxAffectedTargets = 1;
}
- if (SummonPropertiesEntry* properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(121)))
+ DB2HotfixGenerator summonProperties(sSummonPropertiesStore);
+ summonProperties.ApplyHotfix(121, [](SummonPropertiesEntry* properties)
+ {
properties->Title = AsUnderlyingType(SummonTitle::Totem);
- if (SummonPropertiesEntry* properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(647))) // 52893
+ });
+ summonProperties.ApplyHotfix(647, [](SummonPropertiesEntry* properties) // 52893
+ {
properties->Title = AsUnderlyingType(SummonTitle::Totem);
- if (SummonPropertiesEntry* properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(628))) // Hungry Plaguehound
+ });
+ summonProperties.ApplyHotfix(628, [](SummonPropertiesEntry* properties) // Hungry Plaguehound
+ {
properties->Control = SUMMON_CATEGORY_PET;
+ });
TC_LOG_INFO("server.loading", ">> Loaded SpellInfo corrections in {} ms", GetMSTimeDiffToNow(oldMSTime));
}