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 modules recursivity makes client crash, it should generate a warning
== P1 BUGS (affects game play) == P1 BUGS (affects game play)
private channels are not closed when switching characters
sometimes minimap desync Z pos sometimes minimap desync Z pos
follow and autowalk doesn't cancel when walking via hotkeys 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 == MINOR FEATURES
display exit box when exiting from game display exit box when exiting from game
case insensitive npctrade
load modules from zip packages load modules from zip packages
move up/down in lineedits move up/down in lineedits
select characters in lineedits select characters in lineedits

View File

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

View File

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

View File

@ -6,7 +6,7 @@ NPCOfferLabel < Label
NPCItemBox < UICheckBox NPCItemBox < UICheckBox
border-width: 1 border-width: 1
border-color: #000000 border-color: #000000
color: #aaaaaa color: #aaaaaa
text-align: center text-align: center
text-offset: 0 20 text-offset: 0 20
@ -88,7 +88,7 @@ MainWindow
type: grid type: grid
cell-size: 160 90 cell-size: 160 90
flow: true flow: true
auto-spacing: true auto-spacing: true
FlatPanel FlatPanel
id: setupPanel id: setupPanel