From b7721f685610d57f98a2440baccf642f24073ec0 Mon Sep 17 00:00:00 2001 From: otfallen Date: Sat, 15 Sep 2012 05:00:56 +0000 Subject: [PATCH 1/2] Tiny fix to UICreature --- src/otclient/uicreature.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/otclient/uicreature.h b/src/otclient/uicreature.h index 6693a534..b8fe04a3 100644 --- a/src/otclient/uicreature.h +++ b/src/otclient/uicreature.h @@ -30,7 +30,6 @@ class UICreature : public UIWidget { public: - UICreature() { m_color = Color::white; } void drawSelf(Fw::DrawPane drawPane); void setCreature(const CreaturePtr& creature) { m_creature = creature; } From bfa0844de1680e288915aadbc86b489095fc1ac6 Mon Sep 17 00:00:00 2001 From: otfallen Date: Sat, 15 Sep 2012 05:05:45 +0000 Subject: [PATCH 2/2] TiXmlElement can already Set integer attribs. --- src/otclient/houses.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/otclient/houses.cpp b/src/otclient/houses.cpp index f88eba6e..561e1799 100644 --- a/src/otclient/houses.cpp +++ b/src/otclient/houses.cpp @@ -70,21 +70,20 @@ void House::load(const TiXmlElement *elem) void House::save(TiXmlElement*& elem) { -#define s(x) stdext::to_string((x)) // ugly macro again... to save "typing". elem = new TiXmlElement("house"); elem->SetAttribute("name", getName()); - elem->SetAttribute("houseid", s(getId())); + elem->SetAttribute("houseid", getId()); Position entry = getEntry(); - elem->SetAttribute("entryx", s(entry.x)); - elem->SetAttribute("entryy", s(entry.y)); - elem->SetAttribute("entryz", s(entry.z)); + elem->SetAttribute("entryx", entry.x); + elem->SetAttribute("entryy", entry.y); + elem->SetAttribute("entryz", entry.z); - elem->SetAttribute("rent", s(getRent())); - elem->SetAttribute("townid", s(getTownId())); - elem->SetAttribute("size", s(getSize())); - elem->SetAttribute("guildhall", s(m_isGuildHall)); + elem->SetAttribute("rent", getRent()); + elem->SetAttribute("townid", getTownId()); + elem->SetAttribute("size", getSize()); + elem->SetAttribute("guildhall", (int)m_isGuildHall); } HouseManager::HouseManager()