diff options
author | Shauren <shauren.trinity@gmail.com> | 2025-04-19 17:50:49 +0200 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2025-05-11 12:09:54 +0200 |
commit | 8e0be127399e82a5082a9e740054b7e9fda259bc (patch) | |
tree | 4587d1242f8c8c01d15573aebc06af8817bc9f59 /src/server/game/Spells/SpellMgr.cpp | |
parent | d01f12cc91d3443cb217ba7db0c4f42263dfc53c (diff) |
Core/Conditions: Added conditions for automatic learning spells with SkillLineAbility::AcquireMethod = 4
(cherry picked from commit 7eaa695581589e8cb9a277f9c13ad0e3daf669a7)
# Conflicts:
# sql/updates/world/cata_classic/2025_04_19_01_world.sql
# src/server/game/Conditions/ConditionMgr.cpp
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 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)); } |