aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Globals/ObjectMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 2936c31e1ae..47b9e840504 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -20,6 +20,7 @@
#include "AchievementMgr.h"
#include "ArenaTeam.h"
#include "ArenaTeamMgr.h"
+#include "BattlegroundMgr.h"
#include "Chat.h"
#include "Common.h"
#include "DatabaseEnv.h"
@@ -1112,6 +1113,11 @@ void ObjectMgr::LoadEquipmentTemplates()
}
uint8 id = fields[1].GetUInt8();
+ if (!id)
+ {
+ TC_LOG_ERROR("sql.sql", "Creature equipment template with id 0 found for creature %u, skipped.", entry);
+ continue;
+ }
EquipmentInfo& equipmentInfo = _equipmentInfoStore[entry][id];
@@ -1462,6 +1468,7 @@ bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guidLow, uint32 linkedGuidLow)
return false;
const CreatureData* master = GetCreatureData(guidLow);
+ ASSERT(master);
uint64 guid = MAKE_NEW_GUID(guidLow, master->id, HIGHGUID_UNIT);
if (!linkedGuidLow) // we're removing the linking
@@ -7518,6 +7525,10 @@ void ObjectMgr::LoadGameObjectForQuests()
{
switch (itr->second.type)
{
+ case GAMEOBJECT_TYPE_QUESTGIVER:
+ _gameObjectForQuestStore.insert(itr->second.entry);
+ ++count;
+ break;
case GAMEOBJECT_TYPE_CHEST:
{
// scan GO chest with loot including quest items