mirror of
https://github.com/edubart/otclient.git
synced 2025-04-29 17:19:20 +02:00
Fix target square
The target square disappeared when using filters in the battle window.
This commit is contained in:
parent
6217d8805b
commit
521e87ca00
@ -244,7 +244,11 @@ function doCreatureFitFilters(creature)
|
||||
|
||||
local localPlayer = g_game.getLocalPlayer()
|
||||
if pos.z ~= localPlayer:getPosition().z or not creature:canBeSeen() then return false end
|
||||
return true
|
||||
end
|
||||
|
||||
function doShowCreatureAtBattle(creature)
|
||||
if doCreatureFitFilters(creature) then
|
||||
local hidePlayers = hidePlayersButton:isChecked()
|
||||
local hideNPCs = hideNPCsButton:isChecked()
|
||||
local hideMonsters = hideMonstersButton:isChecked()
|
||||
@ -265,6 +269,8 @@ function doCreatureFitFilters(creature)
|
||||
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function onCreatureHealthPercentChange(creature, health)
|
||||
local battleButton = battleButtonsByCreaturesList[creature:getId()]
|
||||
@ -452,7 +458,7 @@ function addCreature(creature)
|
||||
end
|
||||
|
||||
local localPlayer = g_game.getLocalPlayer()
|
||||
battleButton:setVisible(localPlayer:hasSight(creature:getPosition()) and creature:canBeSeen())
|
||||
battleButton:setVisible(localPlayer:hasSight(creature:getPosition()) and creature:canBeSeen() and doShowCreatureAtBattle(creature))
|
||||
end
|
||||
|
||||
function removeAllCreatures()
|
||||
|
Loading…
x
Reference in New Issue
Block a user