From 1950d8ec2621b249d348f3c4648192a17f17eda3 Mon Sep 17 00:00:00 2001 From: EgzoT Date: Mon, 23 Oct 2017 02:33:51 +0200 Subject: [PATCH] Fixed problem with function "useWith" on creatures --- src/client/game.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/game.cpp b/src/client/game.cpp index 80b0b49b..4ddc3145 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -856,7 +856,10 @@ void Game::useWith(const ItemPtr& item, const ThingPtr& toThing) if(!pos.isValid()) // virtual item pos = Position(0xFFFF, 0, 0); // means that is an item in inventory - m_protocolGame->sendUseItemWith(pos, item->getId(), item->getStackPos(), toThing->getPosition(), toThing->getId(), toThing->getStackPos()); + if(toThing->isCreature()) + m_protocolGame->sendUseOnCreature(pos, item->getId(), item->getStackPos(), toThing->getId()); + else + m_protocolGame->sendUseItemWith(pos, item->getId(), item->getStackPos(), toThing->getPosition(), toThing->getId(), toThing->getStackPos()); } void Game::useInventoryItemWith(int itemId, const ThingPtr& toThing)