diff options
Diffstat (limited to 'src/server/game/Spells/SpellMgr.cpp')
-rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index d82e5f7b3c7..9333dcb00b6 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" @@ -1950,19 +1951,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() @@ -5169,12 +5162,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)); } |