Core/Creatures: Added check for creature_equip_template.id = 0. 0 is a special value telling core to unequip all items

This commit is contained in:
Shauren
2014-03-20 11:46:17 +01:00
parent 9a5e89c3cb
commit 46ccb1d15e
2 changed files with 6 additions and 0 deletions

View File

@@ -0,0 +1 @@
UPDATE `creature_equip_template` SET `id`=1 WHERE `id`=0;

View File

@@ -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];