You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. Having on map ground tile (for example dirt ID:351), border (for example grass ID:4543) and nature item (for example frostbite herb ID:7261) and when using on tile kitchen knife or any other item which have "use with" option, returns border item instead item on top of tile.
Steps to reproduce
Create ground tile, border item and nature item on one tile.
Use on that tile kitchen knife or any other item with "use with" option.
Expected behaviour
Item is used on nature item which is on top of a tile.
Actual behaviour
Item is used on border item which isn't on top of a tile.
Environment
Bug exists on master branch, tested with TFS and compiled OTClient from latest sources.
I found the same issue when trying to lock a open, unlocked door. When using the key with the door the client will "target" the ground below the open door instead which obviously does not work. Have you found any downsides to your solution so far or would you say it's save to use?
Hello. Having on map ground tile (for example dirt ID:351), border (for example grass ID:4543) and nature item (for example frostbite herb ID:7261) and when using on tile kitchen knife or any other item which have "use with" option, returns border item instead item on top of tile.
Steps to reproduce
Expected behaviour
Item is used on nature item which is on top of a tile.
Actual behaviour
Item is used on border item which isn't on top of a tile.
Environment
Bug exists on master branch, tested with TFS and compiled OTClient from latest sources.
Trying to find the problem by myself I have found that using one item on another triggers
g_game.useWith(selectedThing, tile:getTopMultiUseThing())
from https://github.com/edubart/otclient/blob/master/modules/game_interface/gameinterface.lua#L368 whileThingPtr Tile::getTopMultiUseThing()
from https://github.com/edubart/otclient/blob/master/src/client/tile.cpp#L475 iterates by tile things from stackpos 0 up to end of items. When iterating, border item matches!thing->isGround() && !thing->isOnTop()
from https://github.com/edubart/otclient/blob/master/src/client/tile.cpp#L500 returning that thing, not checking rest of items on tile.My workaround was to reverse loop in that way
which solved my issue, but I'm not sure if it won't break anything else, that's why I'm creating this issue.
The text was updated successfully, but these errors were encountered: