Commit 27cc6f238ef936ac204716ada8751809cfca78de
1 parent
8c4a6f4c
商店bug
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/adv/Adv.lua
... | ... | @@ -799,7 +799,7 @@ local function clickTrader(self, room, block, params) |
799 | 799 | if (block.event.status or ""):getv(buyId, 0) == 1 then return false, 3 end -- 买过了 |
800 | 800 | |
801 | 801 | local buyCount = #((block.event.status or ""):toArray()) |
802 | - if traderData.purchasetime <= buyCount then return false, 4 end | |
802 | + if traderData.purchasetime ~= 0 and traderData.purchasetime <= buyCount then return false, 4 end | |
803 | 803 | |
804 | 804 | local goodsData = csvdb["event_trader_goodsCsv"][block.event.shop[buyId][1]] |
805 | 805 | if not goodsData then return false, 5 end |
... | ... | @@ -821,7 +821,7 @@ local function clickTrader(self, room, block, params) |
821 | 821 | self:checkAchievement(Adv.AchievType.Shop, 1, block.event.id) |
822 | 822 | self:backReward(reward) |
823 | 823 | |
824 | - if traderData.purchasetime <= buyCount or #block.event.shop <= buyCount then | |
824 | + if (traderData.purchasetime ~= 0 and traderData.purchasetime <= buyCount) or #block.event.shop <= buyCount then | |
825 | 825 | block:clear() |
826 | 826 | end |
827 | 827 | return true | ... | ... |