mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 12:04:55 +02:00
Game Menu / Attacking fixes
- No more "Attack" / "Follow" for creatures on different floor - No rule violation for monsters, only players now - Alt + Click to target works through roofs -> fixes #203 - Fixed battle list issue (check position when trying to attack)
This commit is contained in:
@@ -78,15 +78,21 @@ function UIGameMap:onMouseRelease(mousePosition, mouseButton)
|
||||
local useThing
|
||||
local creatureThing
|
||||
local multiUseThing
|
||||
local attackCreature
|
||||
|
||||
local tile = self:getTile(mousePosition)
|
||||
if tile then
|
||||
lookThing = tile:getTopLookThing()
|
||||
useThing = tile:getTopUseThing()
|
||||
creatureThing = tile:getTopCreature()
|
||||
end
|
||||
|
||||
local autoWalkTile = g_map.getTile(autoWalkPos)
|
||||
if autoWalkTile then
|
||||
attackCreature = autoWalkTile:getTopCreature()
|
||||
end
|
||||
|
||||
local ret = modules.game_interface.processMouseAction(mousePosition, mouseButton, autoWalkPos, lookThing, useThing, creatureThing)
|
||||
local ret = modules.game_interface.processMouseAction(mousePosition, mouseButton, autoWalkPos, lookThing, useThing, creatureThing, attackCreature)
|
||||
if ret then
|
||||
self.allowNextRelease = false
|
||||
end
|
||||
|
Reference in New Issue
Block a user