Fix creature outfit

typeex wasn't being treated right; the outfit category was supposed
to be an itemid and the aux id should be set to the item id of the
outfit.

Signed-off-by: otfallen <f.fallen45@gmail.com>
This commit is contained in:
otfallen 2012-09-18 09:13:25 +00:00
parent d89dbec9e8
commit 4d0725e876
1 changed files with 9 additions and 5 deletions

View File

@ -287,11 +287,15 @@ void CreatureManager::m_loadCreatureBuffer(TiXmlElement* attrib, const CreatureT
return; return;
Outfit out; Outfit out;
int32 type = attrib->readType<int32>("type");
if(type > 0) {
out.setCategory(ThingCategoryCreature); out.setCategory(ThingCategoryCreature);
if(!attrib->Attribute("type").empty()) out.setId(type);
out.setId(attrib->readType<int32>("type")); } else {
else out.setCategory(ThingCategoryItem);
out.setId(attrib->readType<int32>("typeex")); out.setAuxId(attrib->readType<int32>("typeex"));
}
{ {
out.setHead(attrib->readType<int>(("head"))); out.setHead(attrib->readType<int>(("head")));