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;
Outfit out;
out.setCategory(ThingCategoryCreature);
if(!attrib->Attribute("type").empty())
out.setId(attrib->readType<int32>("type"));
else
out.setId(attrib->readType<int32>("typeex"));
int32 type = attrib->readType<int32>("type");
if(type > 0) {
out.setCategory(ThingCategoryCreature);
out.setId(type);
} else {
out.setCategory(ThingCategoryItem);
out.setAuxId(attrib->readType<int32>("typeex"));
}
{
out.setHead(attrib->readType<int>(("head")));