From 23d9fec3ac188e895e3a9f761e4fbb0da28b3cc3 Mon Sep 17 00:00:00 2001 From: Fang Date: Mon, 31 Jul 2023 09:45:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E9=87=91=E8=B4=AD=E4=B9=B0=E7=8A=B6?= =?UTF-8?q?=E6=80=81fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../userdata/dungeon/dungeon_armor_entity.lua | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lua/app/userdata/dungeon/dungeon_armor_entity.lua b/lua/app/userdata/dungeon/dungeon_armor_entity.lua index 82a5f306..0697e22e 100644 --- a/lua/app/userdata/dungeon/dungeon_armor_entity.lua +++ b/lua/app/userdata/dungeon/dungeon_armor_entity.lua @@ -410,25 +410,23 @@ end -- 基金阶段是否已购买 function DungeonArmorEntity:isBoughtFundStage(stage) - local bought = DataManager.ShopData:getActGiftMapByType(PayManager.PURCHARSE_TYPE.ACT_GIFT) - if not stage then return false end - if not self:getFundStageGiftId(stage) then - return + local giftId = self:getFundStageGiftId(stage) + + if not giftId then + return false end + local count = DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, giftId) + if EDITOR_MODE then - Logger.logHighlight("支线基金购买状态/"..self:getFundStageGiftId(stage)) - Logger.printTable(bought) - end - if bought then - return bought[self:getFundStageGiftId(stage)] + Logger.logHighlight("支线基金购买状态:"..giftId.."/"..count) end - return false + return count > 0 end -- 获取基金阶段标题