allow useWith with inventory items
This commit is contained in:
parent
71c706157a
commit
85a121822e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue