bug report module

* change modules authors and website
* avoid anchors recursivity crash
* update README
This commit is contained in:
Eduardo Bart
2012-05-01 10:06:38 -03:00
parent 69614da8cb
commit 788a831f24
39 changed files with 204 additions and 68 deletions

View File

@@ -1,7 +1,46 @@
PlayerTrade = {}
-- g_game.inspectTrade(counterOffer, index)
-- g_game.acceptTrade()
-- g_game.rejectTrade()
local tradeWindow
local function createTrade()
if tradeWindow then
tradeWindow:destroy()
tradeWindow = nil
end
tradeWindow = createWidget('TradeWindow', rootWidget)
end
local function onOwnTrade(name, items)
local firstItem = items[1]
local tradeItemWidget = tradeWindow:getChildById('tradeItem')
tradeItemWidget:setItem(firstItem)
end
local function onCounterTrade(name, items)
end
local function onCloseTrade()
tradeWindow:destroy()
tradeWindow = nil
end
function PlayerTrade.init()
importStyle 'tradewindow.otui'
connect(g_game, { onOwnTrade = onGameOwnTrade,
onCounterTrade = onGameCounterTrade,
onCloseTrade = onGameCloseTrade })
end
function PlayerTrade.terminate()
disconnect(g_game, { onOwnTrade = onGameOwnTrade,
onCounterTrade = onGameCounterTrade,
onCloseTrade = onGameCloseTrade })
end

View File

@@ -1,8 +1,8 @@
Module
name: game_playertrade
description: Allow to trade items with players
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart
website: www.otclient.info
dependencies:
- game