Fixed an issue with the battle list filter.

More work on the minimap, interface changes, fixed direction controls, fixed reseting, fixed some draw things (needs some more work to finish).
Fixed a bug in the battle list causing Battle.onFollow(creature) to execute when there was no follow.
This commit is contained in:
BeniS
2012-07-09 23:37:47 +12:00
committed by Eduardo Bart
parent c8d9833444
commit 902ce06e88
13 changed files with 135 additions and 38 deletions

View File

@@ -130,13 +130,13 @@ function Battle.doCreatureFitFilters(creature)
local hideSkulls = hideSkullsButton:isChecked()
local hideParty = hidePartyButton:isChecked()
if hidePlayers and not creature:asMonster() and not creature:asNpc() then
if hidePlayers and creature:asPlayer() then
return false
elseif hideNPCs and creature:asNpc() then
return false
elseif hideMonsters and creature:asMonster() then
return false
elseif hideSkulls and creature:getSkull() == SkullNone then
elseif hideSkulls and creature:asPlayer() and creature:getSkull() == SkullNone then
return false
elseif hideParty and creature:getShield() > ShieldWhiteBlue then
return false
@@ -359,6 +359,7 @@ function Battle.checkBattleButton(battleButton)
end
if battleButton.isTarget or battleButton.isFollowed then
-- set new last battle button switched
if lastBattleButtonSwitched and lastBattleButtonSwitched ~= battleButton then
lastBattleButtonSwitched.isTarget = false
lastBattleButtonSwitched.isFollowed = false