From 4d0725e87647e8d59be30fe11e14eaa9a67b6392 Mon Sep 17 00:00:00 2001 From: otfallen Date: Tue, 18 Sep 2012 09:13:25 +0000 Subject: [PATCH] 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 --- src/otclient/creatures.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/otclient/creatures.cpp b/src/otclient/creatures.cpp index 864b75bf..bc6a1539 100644 --- a/src/otclient/creatures.cpp +++ b/src/otclient/creatures.cpp @@ -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("type")); - else - out.setId(attrib->readType("typeex")); + + int32 type = attrib->readType("type"); + if(type > 0) { + out.setCategory(ThingCategoryCreature); + out.setId(type); + } else { + out.setCategory(ThingCategoryItem); + out.setAuxId(attrib->readType("typeex")); + } { out.setHead(attrib->readType(("head")));