Fixed problem with function "useWith" on creatures
This commit is contained in:
parent
8c731ac016
commit
1950d8ec26
|
@ -856,6 +856,9 @@ 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
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue