mirror of
https://github.com/edubart/otclient.git
synced 2025-04-30 01:29:21 +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()
|
local localPlayer = g_game.getLocalPlayer()
|
||||||
if pos.z ~= localPlayer:getPosition().z or not creature:canBeSeen() then return false end
|
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 hidePlayers = hidePlayersButton:isChecked()
|
||||||
local hideNPCs = hideNPCsButton:isChecked()
|
local hideNPCs = hideNPCsButton:isChecked()
|
||||||
local hideMonsters = hideMonstersButton:isChecked()
|
local hideMonsters = hideMonstersButton:isChecked()
|
||||||
@ -265,6 +269,8 @@ function doCreatureFitFilters(creature)
|
|||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
function onCreatureHealthPercentChange(creature, health)
|
function onCreatureHealthPercentChange(creature, health)
|
||||||
local battleButton = battleButtonsByCreaturesList[creature:getId()]
|
local battleButton = battleButtonsByCreaturesList[creature:getId()]
|
||||||
@ -452,7 +458,7 @@ function addCreature(creature)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local localPlayer = g_game.getLocalPlayer()
|
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
|
end
|
||||||
|
|
||||||
function removeAllCreatures()
|
function removeAllCreatures()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user