diff options
author | Meji <alvaromegias_46@hotmail.com> | 2022-06-09 13:58:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-09 13:58:54 +0200 |
commit | a1f673d1ca91ceea9585f6ec7267aae94d11fca7 (patch) | |
tree | 592dc81138a752b93f3c47d7b9801b33fa369a34 /src/server/game/Spells/SpellMgr.cpp | |
parent | 0943610fde41f38d2c866bc0c6db0c53d32bb804 (diff) |
Core/BattlePets: Move BattlePet stuff from SpellMgr to BattlePetMgr (#27986)
Diffstat (limited to 'src/server/game/Spells/SpellMgr.cpp')
-rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 0b9856d6fb8..be6ab369a46 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -18,6 +18,7 @@ #include "SpellMgr.h" #include "BattlefieldMgr.h" #include "BattlegroundMgr.h" +#include "BattlePetMgr.h" #include "Chat.h" #include "Containers.h" #include "DB2Stores.h" @@ -2439,7 +2440,6 @@ void SpellMgr::LoadSpellInfoStore() std::unordered_map<std::pair<uint32, Difficulty>, SpellInfoLoadHelper> loadData; std::unordered_map<int32, BattlePetSpeciesEntry const*> battlePetSpeciesByCreature; - std::unordered_map<uint32, BattlePetSpeciesEntry const*> battlePetSpeciesBySpellId; for (BattlePetSpeciesEntry const* battlePetSpecies : sBattlePetSpeciesStore) if (battlePetSpecies->CreatureID) battlePetSpeciesByCreature[battlePetSpecies->CreatureID] = battlePetSpecies; @@ -2458,7 +2458,7 @@ void SpellMgr::LoadSpellInfoStore() if (SummonPropertiesEntry const* summonProperties = sSummonPropertiesStore.LookupEntry(effect->EffectMiscValue[1])) if (summonProperties->Slot == SUMMON_SLOT_MINIPET && summonProperties->GetFlags().HasFlag(SummonPropertiesFlags::SummonFromBattlePetJournal)) if (BattlePetSpeciesEntry const* battlePetSpecies = Trinity::Containers::MapGetValuePtr(battlePetSpeciesByCreature, effect->EffectMiscValue[0])) - mBattlePets[effect->SpellID] = battlePetSpecies; + BattlePets::BattlePetMgr::AddBattlePetSpeciesBySpell(effect->SpellID, battlePetSpecies); if (effect->Effect == SPELL_EFFECT_LANGUAGE) sLanguageMgr->LoadSpellEffectLanguage(effect); @@ -4845,8 +4845,3 @@ uint32 SpellMgr::GetModelForTotem(uint32 spellId, uint8 race) const return 0; } - -BattlePetSpeciesEntry const* SpellMgr::GetBattlePetSpecies(uint32 spellId) const -{ - return Trinity::Containers::MapGetValuePtr(mBattlePets, spellId); -} |