aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellMgr.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-04-19 17:50:49 +0200
committerShauren <shauren.trinity@gmail.com>2025-04-19 17:50:49 +0200
commit7eaa695581589e8cb9a277f9c13ad0e3daf669a7 (patch)
treea2b25a739b1f4c5759bdc7c0eddddcb16372f9f6 /src/server/game/Spells/SpellMgr.cpp
parentefed68fd03a36f4cc826e34a31d96778fb5b5bbe (diff)
Core/Conditions: Added conditions for automatic learning spells with SkillLineAbility::AcquireMethod = 4
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 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));
}