aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2014-03-20 11:46:17 +0100
committerShauren <shauren.trinity@gmail.com>2014-03-20 11:46:17 +0100
commit46ccb1d15ede04440448f2f741d2a3246ca7ad41 (patch)
treebd3ae39d440141074000105aa92da06ba6c74176 /src
parent9a5e89c3cbd6fd6c34939bd62e0e5458a392c841 (diff)
Core/Creatures: Added check for creature_equip_template.id = 0. 0 is a special value telling core to unequip all items
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 48e4411e035..2a3a79905fb 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -1087,6 +1087,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];