From 85a121822e42058fdc36ea6e2ba047793c1fc323 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Tue, 7 Feb 2012 01:02:06 -0200 Subject: [PATCH] allow useWith with inventory items --- src/otclient/core/game.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/otclient/core/game.cpp b/src/otclient/core/game.cpp index a96dad6c..2970db00 100644 --- a/src/otclient/core/game.cpp +++ b/src/otclient/core/game.cpp @@ -339,6 +339,9 @@ void Game::useWith(const ThingPtr& fromThing, const ThingPtr& toThing) return; Position pos = fromThing->getPosition(); + if(!pos.isValid()) // virtual item + pos = Position(0xFFFF, 0, 0); // means that is a item in inventory + int fromStackpos = getThingStackpos(fromThing); if(fromStackpos == -1) return;