mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[12058] Remove more header includes
This commit is contained in:
parent
f24fa870c5
commit
6de10526cc
23 changed files with 143 additions and 120 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 <map>
|
||||
#include <string>
|
||||
|
||||
struct AchievementEntry;
|
||||
struct AchievementCriteriaEntry;
|
||||
|
||||
typedef std::list<AchievementCriteriaEntry const*> AchievementCriteriaEntryList;
|
||||
typedef std::list<AchievementEntry const*> 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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#include "CellImpl.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "DBCStores.h"
|
||||
|
||||
DynamicObject::DynamicObject() : WorldObject()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include "BattleGroundAV.h"
|
||||
#include "Util.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SQLStorages.h"
|
||||
#include <G3D/Quat.h>
|
||||
|
||||
GameObject::GameObject() : WorldObject(),
|
||||
|
|
|
|||
|
|
@ -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<class T> void
|
||||
ObjectUpdater::Visit(GridRefManager<T> &m)
|
||||
template<class T>
|
||||
void ObjectUpdater::Visit(GridRefManager<T> &m)
|
||||
{
|
||||
for(typename GridRefManager<T>::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<GameObject>(GameObjectMapType &);
|
||||
template void ObjectUpdater::Visit<DynamicObject>(DynamicObjectMapType &);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include "CreatureAI.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "DBCEnums.h"
|
||||
#include "DBCStores.h"
|
||||
|
||||
template<class T>
|
||||
inline void MaNGOS::VisibleNotifier::Visit(GridRefManager<T> &m)
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
#include "CreatureEventAIMgr.h"
|
||||
#include "DBCEnums.h"
|
||||
#include "AuctionHouseBot/AuctionHouseBot.h"
|
||||
#include "SQLStorages.h"
|
||||
|
||||
static uint32 ahbotQualityIds[MAX_AUCTION_QUALITY] =
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "Group.h"
|
||||
#include "World.h"
|
||||
#include "Util.h"
|
||||
#include "DBCStores.h"
|
||||
|
||||
void WorldSession::HandleAutostoreLootItemOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "movement/MoveSpline.h"
|
||||
#include "movement/MoveSplineInit.h"
|
||||
#include "CreatureLinkingMgr.h"
|
||||
#include "DBCStores.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@
|
|||
#include "AchievementMgr.h"
|
||||
#include "Mail.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "DBCStores.h"
|
||||
#include "SQLStorages.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
#include "AchievementMgr.h"
|
||||
#include "ReputationMgr.h"
|
||||
#include "BattleGround.h"
|
||||
#include "DBCStores.h"
|
||||
#include "SharedDefines.h"
|
||||
|
||||
#include<string>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#include "SkillDiscovery.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "Player.h"
|
||||
#include "DBCStores.h"
|
||||
#include <map>
|
||||
|
||||
struct SkillDiscoveryEntry
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
#include "Log.h"
|
||||
#include "ProgressBar.h"
|
||||
#include "Player.h"
|
||||
#include "DBCStores.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
// some type definitions
|
||||
|
|
|
|||
|
|
@ -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<CreatureInfo>(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<CreatureInfo>(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<CreatureInfo>(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<CreatureInfo>(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<CreatureInfo>(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<CreatureInfo>(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<CreatureInfo>(petentry) : NULL;
|
||||
CreatureInfo const* cInfo = ObjectMgr::GetCreatureTemplate(petentry);
|
||||
|
||||
// == 0 in case call current pet, check only real summon case
|
||||
if (petentry && !cInfo)
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@
|
|||
#include "SharedDefines.h"
|
||||
#include "SpellAuraDefines.h"
|
||||
#include "DBCStructure.h"
|
||||
#include "DBCStores.h"
|
||||
#include "SQLStorages.h"
|
||||
|
||||
#include "Utilities/UnorderedMapSet.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include "Spell.h"
|
||||
#include "SocialMgr.h"
|
||||
#include "Language.h"
|
||||
#include "DBCStores.h"
|
||||
|
||||
void WorldSession::SendTradeStatus(TradeStatus status)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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<CreatureInfo>(victim->GetEntry()))
|
||||
if (CreatureInfo const* normalInfo = ObjectMgr::GetCreatureTemplate(victim->GetEntry()))
|
||||
((Player*)this)->KilledMonster(normalInfo, victim->GetObjectGuid());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12057"
|
||||
#define REVISION_NR "12058"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue