Fixed problem with function "useWith" on creatures

这个提交包含在:
EgzoT 2017-10-23 02:33:51 +02:00 提交者 GitHub
父节点 8c731ac016
当前提交 1950d8ec26
共有 1 个文件被更改,包括 4 次插入1 次删除

查看文件

@ -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)