From 27cc6f238ef936ac204716ada8751809cfca78de Mon Sep 17 00:00:00 2001 From: zhouhaihai <781184096@qq.com> Date: Thu, 20 Feb 2020 20:19:00 +0800 Subject: [PATCH] 商店bug --- src/adv/Adv.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/adv/Adv.lua b/src/adv/Adv.lua index 4f14254..963fe45 100644 --- a/src/adv/Adv.lua +++ b/src/adv/Adv.lua @@ -799,7 +799,7 @@ local function clickTrader(self, room, block, params) if (block.event.status or ""):getv(buyId, 0) == 1 then return false, 3 end -- 买过了 local buyCount = #((block.event.status or ""):toArray()) - if traderData.purchasetime <= buyCount then return false, 4 end + if traderData.purchasetime ~= 0 and traderData.purchasetime <= buyCount then return false, 4 end local goodsData = csvdb["event_trader_goodsCsv"][block.event.shop[buyId][1]] if not goodsData then return false, 5 end @@ -821,7 +821,7 @@ local function clickTrader(self, room, block, params) self:checkAchievement(Adv.AchievType.Shop, 1, block.event.id) self:backReward(reward) - if traderData.purchasetime <= buyCount or #block.event.shop <= buyCount then + if (traderData.purchasetime ~= 0 and traderData.purchasetime <= buyCount) or #block.event.shop <= buyCount then block:clear() end return true -- libgit2 0.21.2