Fixes #181 and fixes #551

master
BenDol 9 years ago
parent cb7cea6809
commit 900ebbd985

@ -860,7 +860,7 @@ void Game::useWith(const ItemPtr& item, const ThingPtr& toThing)
Position pos = item->getPosition(); Position pos = item->getPosition();
if(!pos.isValid()) // virtual item if(!pos.isValid()) // virtual item
pos = Position(0xFFFF, 0, 0); // means that is a item in inventory 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()); m_protocolGame->sendUseItemWith(pos, item->getId(), item->getStackPos(), toThing->getPosition(), toThing->getId(), toThing->getStackPos());
} }

@ -485,7 +485,7 @@ ThingPtr Tile::getTopMultiUseThing()
for(uint i = 0; i < m_things.size(); ++i) { for(uint i = 0; i < m_things.size(); ++i) {
ThingPtr thing = m_things[i]; ThingPtr thing = m_things[i];
if(!thing->isGround() && !thing->isGroundBorder() && !thing->isOnBottom() && !thing->isOnTop()) { if(!thing->isGround() && !thing->isOnBottom() && !thing->isOnTop()) {
if(i > 0 && thing->isSplash()) if(i > 0 && thing->isSplash())
return m_things[i-1]; return m_things[i-1];
return thing; return thing;
@ -494,7 +494,7 @@ ThingPtr Tile::getTopMultiUseThing()
for(uint i = 0; i < m_things.size(); ++i) { for(uint i = 0; i < m_things.size(); ++i) {
ThingPtr thing = m_things[i]; ThingPtr thing = m_things[i];
if(!thing->isGround() && !thing->isGroundBorder() && !thing->isOnTop()) if(!thing->isGround() && !thing->isOnTop())
return thing; return thing;
} }

Loading…
Cancel
Save