From f1fda8050af28f90d035d09452a37f77c165f61f Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Thu, 5 Apr 2012 00:20:40 -0300 Subject: [PATCH] fix use with for bottom items * fix hangables --- src/otclient/core/item.cpp | 2 +- src/otclient/core/tile.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/otclient/core/item.cpp b/src/otclient/core/item.cpp index 93f4d5ff..31eb0909 100644 --- a/src/otclient/core/item.cpp +++ b/src/otclient/core/item.cpp @@ -92,7 +92,7 @@ void Item::draw(const Point& dest, float scaleFactor, bool animate) if(tile) { if(tile->mustHookSouth()) xPattern = getNumPatternsX() >= 2 ? 1 : 0; - else if(tile->mustHookSouth()) + else if(tile->mustHookEast()) xPattern = getNumPatternsX() >= 3 ? 2 : 0; } } else if(isFluid() || isFluidContainer()) { diff --git a/src/otclient/core/tile.cpp b/src/otclient/core/tile.cpp index a3b1f412..347f5aa7 100644 --- a/src/otclient/core/tile.cpp +++ b/src/otclient/core/tile.cpp @@ -338,6 +338,12 @@ ThingPtr Tile::getTopMultiUseThing() } } + for(uint i = 0; i < m_things.size(); ++i) { + ThingPtr thing = m_things[i]; + if(!thing->isGround() && !thing->isGroundBorder() && !thing->isOnTop()) + return thing; + } + return m_things[0]; }