From 6de10526cc2afbdfddc07bc6cb7ecd306ece4af5 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Thu, 19 Jul 2012 03:08:05 +0200 Subject: [PATCH] [12058] Remove more header includes --- src/game/AchievementMgr.cpp | 56 +++++++++++++++++++++++++++++++ src/game/AchievementMgr.h | 65 +++++++----------------------------- src/game/BattleGroundAB.cpp | 1 + src/game/BattleGroundAV.cpp | 1 + src/game/DynamicObject.cpp | 1 + src/game/GameObject.cpp | 1 + src/game/GridNotifiers.cpp | 62 +++++++++++++++++++++++++--------- src/game/GridNotifiers.h | 42 ++--------------------- src/game/GridNotifiersImpl.h | 1 + src/game/Level3.cpp | 1 + src/game/LootHandler.cpp | 1 + src/game/LootMgr.cpp | 2 ++ src/game/MotionMaster.cpp | 1 + src/game/Player.cpp | 2 ++ src/game/Player.h | 1 - src/game/SkillDiscovery.cpp | 1 + src/game/SkillExtraItems.cpp | 2 ++ src/game/SpellEffects.cpp | 14 ++++---- src/game/SpellMgr.cpp | 1 + src/game/SpellMgr.h | 2 -- src/game/TradeHandler.cpp | 1 + src/game/Unit.cpp | 2 +- src/shared/revision_nr.h | 2 +- 23 files changed, 143 insertions(+), 120 deletions(-) diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp index 208394b45..bf42905fd 100644 --- a/src/game/AchievementMgr.cpp +++ b/src/game/AchievementMgr.cpp @@ -18,6 +18,7 @@ #include "Common.h" #include "AchievementMgr.h" +#include "DBCStores.h" #include "Player.h" #include "WorldPacket.h" #include "DBCEnums.h" @@ -39,6 +40,7 @@ #include "BattleGroundAB.h" #include "Map.h" #include "InstanceData.h" +#include "DBCStructure.h" #include "Policies/SingletonImp.h" @@ -1700,6 +1702,12 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui } } +uint32 AchievementMgr::GetCriteriaProgressCounter(AchievementCriteriaEntry const* entry) const +{ + CriteriaProgressMap::const_iterator iter = m_criteriaProgress.find(entry->ID); + return iter != m_criteriaProgress.end() ? iter->second.counter : 0; +} + uint32 AchievementMgr::GetCriteriaProgressMaxCounter(AchievementCriteriaEntry const* achievementCriteria, AchievementEntry const* achievement) { uint32 resultValue = 0; @@ -2250,6 +2258,54 @@ AchievementCriteriaEntryList const& AchievementGlobalMgr::GetAchievementCriteria return m_AchievementCriteriasByType[type]; } +AchievementCriteriaEntryList const* AchievementGlobalMgr::GetAchievementCriteriaByAchievement(uint32 id) +{ + AchievementCriteriaListByAchievement::const_iterator itr = m_AchievementCriteriaListByAchievement.find(id); + return itr != m_AchievementCriteriaListByAchievement.end() ? &itr->second : NULL; +} + +AchievementEntryList const* AchievementGlobalMgr::GetAchievementByReferencedId(uint32 id) const +{ + AchievementListByReferencedId::const_iterator itr = m_AchievementListByReferencedId.find(id); + return itr != m_AchievementListByReferencedId.end() ? &itr->second : NULL; +} + +AchievementReward const* AchievementGlobalMgr::GetAchievementReward(AchievementEntry const* achievement, uint8 gender) const +{ + AchievementRewardsMapBounds bounds = m_achievementRewards.equal_range(achievement->ID); + for (AchievementRewardsMap::const_iterator iter = bounds.first; iter != bounds.second; ++iter) + if(iter->second.gender == GENDER_NONE || uint8(iter->second.gender) == gender) + return &iter->second; + + return NULL; +} + +AchievementRewardLocale const* AchievementGlobalMgr::GetAchievementRewardLocale(AchievementEntry const* achievement, uint8 gender) const +{ + AchievementRewardLocalesMapBounds bounds = m_achievementRewardLocales.equal_range(achievement->ID); + for (AchievementRewardLocalesMap::const_iterator iter = bounds.first; iter != bounds.second; ++iter) + if(iter->second.gender == GENDER_NONE || uint8(iter->second.gender) == gender) + return &iter->second; + + return NULL; +} + +AchievementCriteriaRequirementSet const* AchievementGlobalMgr::GetCriteriaRequirementSet(AchievementCriteriaEntry const* achievementCriteria) +{ + AchievementCriteriaRequirementMap::const_iterator iter = m_criteriaRequirementMap.find(achievementCriteria->ID); + return iter!=m_criteriaRequirementMap.end() ? &iter->second : NULL; +} + +bool AchievementGlobalMgr::IsRealmCompleted(AchievementEntry const* achievement) const +{ + return m_allCompletedAchievements.find(achievement->ID) != m_allCompletedAchievements.end(); +} + +void AchievementGlobalMgr::SetRealmCompleted(AchievementEntry const* achievement) +{ + m_allCompletedAchievements.insert(achievement->ID); +} + void AchievementGlobalMgr::LoadAchievementCriteriaList() { if (sAchievementCriteriaStore.GetNumRows()==0) diff --git a/src/game/AchievementMgr.h b/src/game/AchievementMgr.h index f18a0ade9..9a3971af6 100644 --- a/src/game/AchievementMgr.h +++ b/src/game/AchievementMgr.h @@ -22,13 +22,15 @@ #include "Policies/Singleton.h" #include "Database/DatabaseEnv.h" #include "DBCEnums.h" -#include "DBCStores.h" #include "SharedDefines.h" #include "ObjectGuid.h" #include #include +struct AchievementEntry; +struct AchievementCriteriaEntry; + typedef std::list AchievementCriteriaEntryList; typedef std::list AchievementEntryList; @@ -281,12 +283,7 @@ class AchievementMgr CompletedAchievementMap const& GetCompletedAchievements() const { return m_completedAchievements; } bool IsCompletedCriteria(AchievementCriteriaEntry const* criteria, AchievementEntry const* achievement) const; - uint32 GetCriteriaProgressCounter(AchievementCriteriaEntry const* entry) const - { - CriteriaProgressMap::const_iterator iter = m_criteriaProgress.find(entry->ID); - return iter != m_criteriaProgress.end() ? iter->second.counter : 0; - } - + uint32 GetCriteriaProgressCounter(AchievementCriteriaEntry const* entry) const; static uint32 GetCriteriaProgressMaxCounter(AchievementCriteriaEntry const* entry, AchievementEntry const* achievement); // Use PROGRESS_SET only for reset/downgrade criteria progress @@ -313,53 +310,14 @@ class AchievementGlobalMgr { public: AchievementCriteriaEntryList const& GetAchievementCriteriaByType(AchievementCriteriaTypes type); - AchievementCriteriaEntryList const* GetAchievementCriteriaByAchievement(uint32 id) - { - AchievementCriteriaListByAchievement::const_iterator itr = m_AchievementCriteriaListByAchievement.find(id); - return itr != m_AchievementCriteriaListByAchievement.end() ? &itr->second : NULL; - } + AchievementCriteriaEntryList const* GetAchievementCriteriaByAchievement(uint32 id); + AchievementEntryList const* GetAchievementByReferencedId(uint32 id) const; + AchievementReward const* GetAchievementReward(AchievementEntry const* achievement, uint8 gender) const; + AchievementRewardLocale const* GetAchievementRewardLocale(AchievementEntry const* achievement, uint8 gender) const; + AchievementCriteriaRequirementSet const* GetCriteriaRequirementSet(AchievementCriteriaEntry const* achievementCriteria); - AchievementEntryList const* GetAchievementByReferencedId(uint32 id) const - { - AchievementListByReferencedId::const_iterator itr = m_AchievementListByReferencedId.find(id); - return itr != m_AchievementListByReferencedId.end() ? &itr->second : NULL; - } - - AchievementReward const* GetAchievementReward(AchievementEntry const* achievement, uint8 gender) const - { - AchievementRewardsMapBounds bounds = m_achievementRewards.equal_range(achievement->ID); - for (AchievementRewardsMap::const_iterator iter = bounds.first; iter != bounds.second; ++iter) - if(iter->second.gender == GENDER_NONE || uint8(iter->second.gender) == gender) - return &iter->second; - - return NULL; - } - - AchievementRewardLocale const* GetAchievementRewardLocale(AchievementEntry const* achievement, uint8 gender) const - { - AchievementRewardLocalesMapBounds bounds = m_achievementRewardLocales.equal_range(achievement->ID); - for (AchievementRewardLocalesMap::const_iterator iter = bounds.first; iter != bounds.second; ++iter) - if(iter->second.gender == GENDER_NONE || uint8(iter->second.gender) == gender) - return &iter->second; - - return NULL; - } - - AchievementCriteriaRequirementSet const* GetCriteriaRequirementSet(AchievementCriteriaEntry const *achievementCriteria) - { - AchievementCriteriaRequirementMap::const_iterator iter = m_criteriaRequirementMap.find(achievementCriteria->ID); - return iter!=m_criteriaRequirementMap.end() ? &iter->second : NULL; - } - - bool IsRealmCompleted(AchievementEntry const* achievement) const - { - return m_allCompletedAchievements.find(achievement->ID) != m_allCompletedAchievements.end(); - } - - void SetRealmCompleted(AchievementEntry const* achievement) - { - m_allCompletedAchievements.insert(achievement->ID); - } + bool IsRealmCompleted(AchievementEntry const* achievement) const; + void SetRealmCompleted(AchievementEntry const* achievement); void LoadAchievementCriteriaList(); void LoadAchievementCriteriaRequirements(); @@ -367,6 +325,7 @@ class AchievementGlobalMgr void LoadCompletedAchievements(); void LoadRewards(); void LoadRewardLocales(); + private: AchievementCriteriaRequirementMap m_criteriaRequirementMap; diff --git a/src/game/BattleGroundAB.cpp b/src/game/BattleGroundAB.cpp index 76e1646f9..0f4154844 100644 --- a/src/game/BattleGroundAB.cpp +++ b/src/game/BattleGroundAB.cpp @@ -27,6 +27,7 @@ #include "Util.h" #include "WorldPacket.h" #include "MapManager.h" +#include "DBCStores.h" // TODO REMOVE this when graveyard handling for pvp is updated BattleGroundAB::BattleGroundAB() { diff --git a/src/game/BattleGroundAV.cpp b/src/game/BattleGroundAV.cpp index d8ffd5013..94bd50190 100644 --- a/src/game/BattleGroundAV.cpp +++ b/src/game/BattleGroundAV.cpp @@ -24,6 +24,7 @@ #include "GameObject.h" #include "Language.h" #include "WorldPacket.h" +#include "DBCStores.h" // TODO REMOVE this when graveyard handling for pvp is updated BattleGroundAV::BattleGroundAV() { diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp index 8a6d9d0cd..58506729c 100644 --- a/src/game/DynamicObject.cpp +++ b/src/game/DynamicObject.cpp @@ -26,6 +26,7 @@ #include "CellImpl.h" #include "GridNotifiersImpl.h" #include "SpellMgr.h" +#include "DBCStores.h" DynamicObject::DynamicObject() : WorldObject() { diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index 77a1995a6..9d4c6d758 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -38,6 +38,7 @@ #include "BattleGroundAV.h" #include "Util.h" #include "ScriptMgr.h" +#include "SQLStorages.h" #include GameObject::GameObject() : WorldObject(), diff --git a/src/game/GridNotifiers.cpp b/src/game/GridNotifiers.cpp index 6a229dfbd..515a7413a 100644 --- a/src/game/GridNotifiers.cpp +++ b/src/game/GridNotifiers.cpp @@ -25,11 +25,11 @@ #include "Transports.h" #include "ObjectAccessor.h" #include "BattleGroundMgr.h" +#include "CreatureAI.h" using namespace MaNGOS; -void -VisibleChangesNotifier::Visit(CameraMapType &m) +void VisibleChangesNotifier::Visit(CameraMapType &m) { for(CameraMapType::iterator iter=m.begin(); iter != m.end(); ++iter) { @@ -37,8 +37,7 @@ VisibleChangesNotifier::Visit(CameraMapType &m) } } -void -VisibleNotifier::Notify() +void VisibleNotifier::Notify() { Player& player = *i_camera.GetOwner(); // at this moment i_clientGUIDs have guids that not iterate at grid level checks @@ -97,8 +96,7 @@ VisibleNotifier::Notify() } } -void -MessageDeliverer::Visit(CameraMapType &m) +void MessageDeliverer::Visit(CameraMapType &m) { for(CameraMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { @@ -129,9 +127,7 @@ void MessageDelivererExcept::Visit(CameraMapType &m) } } - -void -ObjectMessageDeliverer::Visit(CameraMapType &m) +void ObjectMessageDeliverer::Visit(CameraMapType &m) { for(CameraMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { @@ -143,8 +139,7 @@ ObjectMessageDeliverer::Visit(CameraMapType &m) } } -void -MessageDistDeliverer::Visit(CameraMapType &m) +void MessageDistDeliverer::Visit(CameraMapType &m) { for(CameraMapType::iterator iter=m.begin(); iter != m.end(); ++iter) { @@ -163,8 +158,7 @@ MessageDistDeliverer::Visit(CameraMapType &m) } } -void -ObjectMessageDistDeliverer::Visit(CameraMapType &m) +void ObjectMessageDistDeliverer::Visit(CameraMapType &m) { for(CameraMapType::iterator iter=m.begin(); iter != m.end(); ++iter) { @@ -179,8 +173,8 @@ ObjectMessageDistDeliverer::Visit(CameraMapType &m) } } -template void -ObjectUpdater::Visit(GridRefManager &m) +template +void ObjectUpdater::Visit(GridRefManager &m) { for(typename GridRefManager::iterator iter = m.begin(); iter != m.end(); ++iter) { @@ -234,6 +228,44 @@ void MaNGOS::RespawnDo::operator()( GameObject* u ) const u->Respawn(); } +void MaNGOS::CallOfHelpCreatureInRangeDo::operator()(Creature* u) +{ + if (u == i_funit) + return; + + if (!u->CanAssistTo(i_funit, i_enemy, false)) + return; + + // too far + if (!i_funit->IsWithinDistInMap(u, i_range)) + return; + + // only if see assisted creature + if (!i_funit->IsWithinLOSInMap(u)) + return; + + if (u->AI()) + u->AI()->AttackStart(i_enemy); +} + +bool MaNGOS::AnyAssistCreatureInRangeCheck::operator()(Creature* u) +{ + if (u == i_funit) + return false; + + if (!u->CanAssistTo(i_funit, i_enemy)) + return false; + + // too far + if (!i_funit->IsWithinDistInMap(u, i_range)) + return false; + + // only if see assisted creature + if (!i_funit->IsWithinLOSInMap(u)) + return false; + + return true; +} template void ObjectUpdater::Visit(GameObjectMapType &); template void ObjectUpdater::Visit(DynamicObjectMapType &); diff --git a/src/game/GridNotifiers.h b/src/game/GridNotifiers.h index 8c619ad7c..5ad1f24d7 100644 --- a/src/game/GridNotifiers.h +++ b/src/game/GridNotifiers.h @@ -29,10 +29,6 @@ #include "GameObject.h" #include "Player.h" #include "Unit.h" -#include "CreatureAI.h" - -class Player; -//class Map; namespace MaNGOS { @@ -997,25 +993,7 @@ namespace MaNGOS CallOfHelpCreatureInRangeDo(Unit* funit, Unit* enemy, float range) : i_funit(funit), i_enemy(enemy), i_range(range) {} - void operator()(Creature* u) - { - if (u == i_funit) - return; - - if (!u->CanAssistTo(i_funit, i_enemy, false)) - return; - - // too far - if (!i_funit->IsWithinDistInMap(u, i_range)) - return; - - // only if see assisted creature - if (!i_funit->IsWithinLOSInMap(u)) - return; - - if (u->AI()) - u->AI()->AttackStart(i_enemy); - } + void operator()(Creature* u); private: Unit* const i_funit; @@ -1069,24 +1047,8 @@ namespace MaNGOS { } WorldObject const& GetFocusObject() const { return *i_funit; } - bool operator()(Creature* u) - { - if(u == i_funit) - return false; + bool operator()(Creature* u); - if ( !u->CanAssistTo(i_funit, i_enemy) ) - return false; - - // too far - if( !i_funit->IsWithinDistInMap(u, i_range) ) - return false; - - // only if see assisted creature - if( !i_funit->IsWithinLOSInMap(u) ) - return false; - - return true; - } private: Unit* const i_funit; Unit* const i_enemy; diff --git a/src/game/GridNotifiersImpl.h b/src/game/GridNotifiersImpl.h index 967650cbd..26e94a568 100644 --- a/src/game/GridNotifiersImpl.h +++ b/src/game/GridNotifiersImpl.h @@ -27,6 +27,7 @@ #include "CreatureAI.h" #include "SpellAuras.h" #include "DBCEnums.h" +#include "DBCStores.h" template inline void MaNGOS::VisibleNotifier::Visit(GridRefManager &m) diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 7d2fa3a1d..837055c45 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -56,6 +56,7 @@ #include "CreatureEventAIMgr.h" #include "DBCEnums.h" #include "AuctionHouseBot/AuctionHouseBot.h" +#include "SQLStorages.h" static uint32 ahbotQualityIds[MAX_AUCTION_QUALITY] = { diff --git a/src/game/LootHandler.cpp b/src/game/LootHandler.cpp index a58f1eb4c..e1e5b97a7 100644 --- a/src/game/LootHandler.cpp +++ b/src/game/LootHandler.cpp @@ -30,6 +30,7 @@ #include "Group.h" #include "World.h" #include "Util.h" +#include "DBCStores.h" void WorldSession::HandleAutostoreLootItemOpcode( WorldPacket & recv_data ) { diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp index eb54bdc79..14923100f 100644 --- a/src/game/LootMgr.cpp +++ b/src/game/LootMgr.cpp @@ -24,6 +24,8 @@ #include "Util.h" #include "SharedDefines.h" #include "SpellMgr.h" +#include "DBCStores.h" +#include "SQLStorages.h" static eConfigFloatValues const qualityToRate[MAX_ITEM_QUALITY] = { CONFIG_FLOAT_RATE_DROP_ITEM_POOR, // ITEM_QUALITY_POOR diff --git a/src/game/MotionMaster.cpp b/src/game/MotionMaster.cpp index 139c92111..d5276e06f 100644 --- a/src/game/MotionMaster.cpp +++ b/src/game/MotionMaster.cpp @@ -30,6 +30,7 @@ #include "movement/MoveSpline.h" #include "movement/MoveSplineInit.h" #include "CreatureLinkingMgr.h" +#include "DBCStores.h" #include diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 6580e41c9..052f4f958 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -61,6 +61,8 @@ #include "AchievementMgr.h" #include "Mail.h" #include "SpellAuras.h" +#include "DBCStores.h" +#include "SQLStorages.h" #include diff --git a/src/game/Player.h b/src/game/Player.h index 10b5724ad..346ea6fc9 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -36,7 +36,6 @@ #include "AchievementMgr.h" #include "ReputationMgr.h" #include "BattleGround.h" -#include "DBCStores.h" #include "SharedDefines.h" #include diff --git a/src/game/SkillDiscovery.cpp b/src/game/SkillDiscovery.cpp index ad11325ac..ac33ef9b5 100644 --- a/src/game/SkillDiscovery.cpp +++ b/src/game/SkillDiscovery.cpp @@ -25,6 +25,7 @@ #include "SkillDiscovery.h" #include "SpellMgr.h" #include "Player.h" +#include "DBCStores.h" #include struct SkillDiscoveryEntry diff --git a/src/game/SkillExtraItems.cpp b/src/game/SkillExtraItems.cpp index cfa4256f5..92171272e 100644 --- a/src/game/SkillExtraItems.cpp +++ b/src/game/SkillExtraItems.cpp @@ -21,6 +21,8 @@ #include "Log.h" #include "ProgressBar.h" #include "Player.h" +#include "DBCStores.h" + #include // some type definitions diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 6d650e6ef..2bb3f65c5 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4963,7 +4963,7 @@ bool Spell::DoSummonWild(CreatureSummonPositions& list, SummonPropertiesEntry co MANGOS_ASSERT(!list.empty() && prop); uint32 creature_entry = m_spellInfo->EffectMiscValue[effIdx]; - CreatureInfo const* cInfo = sCreatureStorage.LookupEntry(creature_entry); + CreatureInfo const* cInfo = ObjectMgr::GetCreatureTemplate(creature_entry); if (!cInfo) { sLog.outErrorDb("Spell::DoSummonWild: creature entry %u not found for spell %u.", creature_entry, m_spellInfo->Id); @@ -4999,7 +4999,7 @@ bool Spell::DoSummonCritter(CreatureSummonPositions& list, SummonPropertiesEntry // ATM only first position is supported for summoning uint32 pet_entry = m_spellInfo->EffectMiscValue[effIdx]; - CreatureInfo const* cInfo = sCreatureStorage.LookupEntry(pet_entry); + CreatureInfo const* cInfo = ObjectMgr::GetCreatureTemplate(pet_entry); if (!cInfo) { sLog.outErrorDb("Spell::DoSummonCritter: creature entry %u not found for spell %u.", pet_entry, m_spellInfo->Id); @@ -5064,7 +5064,7 @@ bool Spell::DoSummonGuardian(CreatureSummonPositions& list, SummonPropertiesEntr MANGOS_ASSERT(!list.empty() && prop); uint32 pet_entry = m_spellInfo->EffectMiscValue[effIdx]; - CreatureInfo const* cInfo = sCreatureStorage.LookupEntry(pet_entry); + CreatureInfo const* cInfo = ObjectMgr::GetCreatureTemplate(pet_entry); if (!cInfo) { sLog.outErrorDb("Spell::DoSummonGuardian: creature entry %u not found for spell %u.", pet_entry, m_spellInfo->Id); @@ -5149,7 +5149,7 @@ bool Spell::DoSummonTotem(SpellEffectIndex eff_idx, uint8 slot_dbc) CreatureCreatePos pos(m_caster, m_caster->GetOrientation(), 2.0f, angle); - CreatureInfo const* cinfo = sCreatureStorage.LookupEntry(m_spellInfo->EffectMiscValue[eff_idx]); + CreatureInfo const* cinfo = ObjectMgr::GetCreatureTemplate(m_spellInfo->EffectMiscValue[eff_idx]); if (!cinfo) { sLog.outErrorDb("Creature entry %u does not exist but used in spell %u totem summon.", m_spellInfo->Id, m_spellInfo->EffectMiscValue[eff_idx]); @@ -5213,7 +5213,7 @@ bool Spell::DoSummonPossessed(CreatureSummonPositions& list, SummonPropertiesEnt MANGOS_ASSERT(!list.empty() && prop); uint32 creatureEntry = m_spellInfo->EffectMiscValue[effIdx]; - CreatureInfo const* cInfo = sCreatureStorage.LookupEntry(creatureEntry); + CreatureInfo const* cInfo = ObjectMgr::GetCreatureTemplate(creatureEntry); if (!cInfo) { sLog.outErrorDb("Spell::DoSummonPossessed: creature entry %u not found for spell %u.", creatureEntry, m_spellInfo->Id); @@ -5275,7 +5275,7 @@ bool Spell::DoSummonPet(SpellEffectIndex eff_idx) return false; uint32 pet_entry = m_spellInfo->EffectMiscValue[eff_idx]; - CreatureInfo const* cInfo = sCreatureStorage.LookupEntry(pet_entry); + CreatureInfo const* cInfo = ObjectMgr::GetCreatureTemplate(pet_entry); if (!cInfo) { sLog.outErrorDb("Spell::DoSummonPet: creature entry %u not found for spell %u.", pet_entry, m_spellInfo->Id); @@ -5995,7 +5995,7 @@ void Spell::EffectSummonPet(SpellEffectIndex eff_idx) return; } - CreatureInfo const* cInfo = petentry ? sCreatureStorage.LookupEntry(petentry) : NULL; + CreatureInfo const* cInfo = ObjectMgr::GetCreatureTemplate(petentry); // == 0 in case call current pet, check only real summon case if (petentry && !cInfo) diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index db6432ce5..e77ee72f6 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -21,6 +21,7 @@ #include "SpellAuraDefines.h" #include "ProgressBar.h" #include "DBCStores.h" +#include "SQLStorages.h" #include "World.h" #include "Chat.h" #include "Spell.h" diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index 6315e9ed8..ad5d13317 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -26,8 +26,6 @@ #include "SharedDefines.h" #include "SpellAuraDefines.h" #include "DBCStructure.h" -#include "DBCStores.h" -#include "SQLStorages.h" #include "Utilities/UnorderedMapSet.h" diff --git a/src/game/TradeHandler.cpp b/src/game/TradeHandler.cpp index e6823dae1..336a8e432 100644 --- a/src/game/TradeHandler.cpp +++ b/src/game/TradeHandler.cpp @@ -28,6 +28,7 @@ #include "Spell.h" #include "SocialMgr.h" #include "Language.h" +#include "DBCStores.h" void WorldSession::SendTradeStatus(TradeStatus status) { diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index ad7233b29..28b9c4283 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1006,7 +1006,7 @@ void Unit::JustKilledCreature(Creature* victim) // some critters required for quests (need normal entry instead possible heroic in any cases) if (victim->GetCreatureType() == CREATURE_TYPE_CRITTER && GetTypeId() == TYPEID_PLAYER) { - if (CreatureInfo const* normalInfo = sCreatureStorage.LookupEntry(victim->GetEntry())) + if (CreatureInfo const* normalInfo = ObjectMgr::GetCreatureTemplate(victim->GetEntry())) ((Player*)this)->KilledMonster(normalInfo, victim->GetObjectGuid()); } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 45906e2fc..615b7337b 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12057" + #define REVISION_NR "12058" #endif // __REVISION_NR_H__