|
@@ -856,7 +856,10 @@ void Game::useWith(const ItemPtr& item, const ThingPtr& toThing)
|
856
|
856
|
if(!pos.isValid()) // virtual item
|
857
|
857
|
pos = Position(0xFFFF, 0, 0); // means that is an item in inventory
|
858
|
858
|
|
859
|
|
- m_protocolGame->sendUseItemWith(pos, item->getId(), item->getStackPos(), toThing->getPosition(), toThing->getId(), toThing->getStackPos());
|
|
859
|
+ if(toThing->isCreature())
|
|
860
|
+ m_protocolGame->sendUseOnCreature(pos, item->getId(), item->getStackPos(), toThing->getId());
|
|
861
|
+ else
|
|
862
|
+ m_protocolGame->sendUseItemWith(pos, item->getId(), item->getStackPos(), toThing->getPosition(), toThing->getId(), toThing->getStackPos());
|
860
|
863
|
}
|
861
|
864
|
|
862
|
865
|
void Game::useInventoryItemWith(int itemId, const ThingPtr& toThing)
|