Updated vithrax bot config to version 1.2, fixed market bug and battle button bug

This commit is contained in:
OTCv8
2020-11-19 21:39:21 +01:00
parent bc1574f2e7
commit 407553647d
91 changed files with 467 additions and 523 deletions

View File

@@ -1384,7 +1384,7 @@ function Market.onMarketEnter(depotItems, offers, balance, vocation, items)
for i = 1, #marketItems[MarketCategory.TibiaCoins] do
local item = marketItems[MarketCategory.TibiaCoins][i].displayItem
depotItems[item:getId()] = tibiaCoins
information.depotItems[item:getId()] = tibiaCoins
end
-- update the items widget to match depot items
@@ -1425,9 +1425,10 @@ end
function Market.onCoinBalance(coins, transferableCoins)
tibiaCoins = coins
if not information or type(information.depotItems) ~= "table" then return end
if not marketItems[MarketCategory.TibiaCoins] then return end
for i = 1, #marketItems[MarketCategory.TibiaCoins] do
local item = marketItems[MarketCategory.TibiaCoins][i].displayItem
depotItems[item:getId()] = tibiaCoins
information.depotItems[item:getId()] = tibiaCoins
end
end