case insensitive to npc trade, private channels are now closing

This commit is contained in:
Henrique Santiago 2012-04-30 18:57:17 -03:00
parent beaba25af1
commit 45d3097504
5 changed files with 7 additions and 8 deletions

1
BUGS
View File

@ -2,7 +2,6 @@
modules recursivity makes client crash, it should generate a warning
== P1 BUGS (affects game play)
private channels are not closed when switching characters
sometimes minimap desync Z pos
follow and autowalk doesn't cancel when walking via hotkeys

1
TODO
View File

@ -34,7 +34,6 @@ allow multiple Map and Game instances ?
== MINOR FEATURES
display exit box when exiting from game
case insensitive npctrade
load modules from zip packages
move up/down in lineedits
select characters in lineedits

View File

@ -80,7 +80,6 @@ function applyMessagePrefixies(name, level, message)
return message
end
-- hooked events
local function onCreatureSpeak(name, level, speaktype, message, channelId, creaturePos)
local defaultMessage = speaktype < 3 and true or false
@ -107,12 +106,13 @@ local function onCreatureSpeak(name, level, speaktype, message, channelId, creat
end
local function onOpenChannel(channelId, channelName)
Console.addChannel(tr(channelName), channelId)
Console.addChannel(channelName, channelId)
end
local function onOpenPrivateChannel(receiver)
local privateTab = Console.getTab(receiver)
if privateTab == nil then
channels[receiver] = receiver
Console.addTab(receiver, true)
end
end
@ -120,6 +120,7 @@ end
local function onOpenOwnPrivateChannel(channelId, channelName)
local privateTab = Console.getTab(channelName)
if privateTab == nil then
--channels[channelId] = channelName (this should be tested)
Console.addChannel(channelName, channelId, true)
end
ownPrivateName = channelName

View File

@ -170,7 +170,7 @@ local function refreshPlayerGoods()
capacityLabel:setText(string.format('%.2f', playerFreeCapacity) .. ' ' .. WEIGHT_UNIT)
local currentTradeType = getCurrentTradeType()
local searchFilter = searchText:getText()
local searchFilter = searchText:getText():lower()
local foundSelectedItem = false
local items = itemsPanel:getChildCount()
@ -181,7 +181,7 @@ local function refreshPlayerGoods()
local canTrade = canTradeItem(item)
itemWidget:setEnabled(canTrade)
local searchCondition = (searchFilter == '') or (searchFilter ~= '' and string.find(item.name, searchFilter) ~= nil)
local searchCondition = (searchFilter == '') or (searchFilter ~= '' and string.find(item.name:lower(), searchFilter) ~= nil)
local showAllItemsCondition = (currentTradeType == BUY) or (showAllItems:isChecked()) or (currentTradeType == SELL and not showAllItems:isChecked() and canTrade)
itemWidget:setVisible(searchCondition and showAllItemsCondition)