From 86e6e62fe9ea32793f9f1c22eb799d20dee0da76 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Thu, 8 Jun 2023 16:41:07 +0800 Subject: [PATCH 1/4] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/common/local_data.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/app/common/local_data.lua b/lua/app/common/local_data.lua index 551d9767..07dbea46 100644 --- a/lua/app/common/local_data.lua +++ b/lua/app/common/local_data.lua @@ -13,7 +13,10 @@ local LOCAL_DATA_KEY = { LAST_LOGIN_URL = "LAST_LOGIN_URL", LAST_LOGIN_NAME = "LAST_LOGIN_NAME", LAST_LOGIN_IP = "LAST_LOGIN_IP", + LAST_LOGIN_INFO = "LAST_LOGIN_INFO", -- 上一次登录成功的信息 + LAST_LOGIN_TYPE = "LAST_LOGIN_TYPE", -- 上次登录类型 token不记录 ACCOUNT_INFO = "ACCOUNT_INFO", + SEND_QUEUE = "SEND_QUEUE", SDK_LOGIN_TYPE = "SDK_LOGIN_TYPE", NEED_UPDATE = "NEED_UPDATE", -- 需要更新 @@ -225,7 +228,7 @@ end function LocalData:getLastLoginInfo() local str = self:getString(LOCAL_DATA_KEY.LAST_LOGIN_INFO, "{}") - local info = json.decode(str) + local info = json.decode(str) or {} info.type = info.type or NetManager.LOGIN_TYPE.ANONYMOUS if type(info.type) == "number" then if info.type == SDKManager.BF_LOGIN_TYPE.GOOGLE then From 5b37d50df4296640fbff0a5f8ca47e854c1e1660 Mon Sep 17 00:00:00 2001 From: chenxi Date: Thu, 8 Jun 2023 17:01:17 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/config/strings/cn/buff.lua | 4 ++-- lua/app/config/strings/en/buff.lua | 2 +- lua/app/config/strings/zh/buff.lua | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/app/config/strings/cn/buff.lua b/lua/app/config/strings/cn/buff.lua index eebc775d..1f3eafe9 100644 --- a/lua/app/config/strings/cn/buff.lua +++ b/lua/app/config/strings/cn/buff.lua @@ -26,7 +26,7 @@ local buff = { }, [12]={ ["id"]=12, - ["desc"]="极致抗性:受到所有英雄的伤害降低{0}。", + ["desc"]="极致抗性:受到的所有伤害降低{0}。", ["name"]="dec_dmg_all_add" }, [24]={ @@ -126,7 +126,7 @@ local buff = { }, [62]={ ["id"]=62, - ["desc"]="反击:受到直接时有{0}的概率进行反击。", + ["desc"]="反击:受到直接伤害时有{0}的概率进行反击。", ["name"]="counterattack" }, [63]={ diff --git a/lua/app/config/strings/en/buff.lua b/lua/app/config/strings/en/buff.lua index b829dfe4..3d27e3a7 100644 --- a/lua/app/config/strings/en/buff.lua +++ b/lua/app/config/strings/en/buff.lua @@ -26,7 +26,7 @@ local buff = { }, [12]={ ["id"]=12, - ["desc"]="Ultimate Resistance: Reduces damage taken from all heroes by {0}.", + ["desc"]="Ultimate Resistance: Reduces all damages taken by {0}.", ["name"]="dec_dmg_all_add" }, [24]={ diff --git a/lua/app/config/strings/zh/buff.lua b/lua/app/config/strings/zh/buff.lua index 02294add..1657df6a 100644 --- a/lua/app/config/strings/zh/buff.lua +++ b/lua/app/config/strings/zh/buff.lua @@ -26,7 +26,7 @@ local buff = { }, [12]={ ["id"]=12, - ["desc"]="極致抗性:受到所有英雄的傷害降低{0}。", + ["desc"]="極致抗性:受到的所有傷害降低{0}。", ["name"]="dec_dmg_all_add" }, [24]={ From cc8bace10b9c999c6fbb639bea718be47940b4e6 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Thu, 8 Jun 2023 17:07:04 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/common/pay_manager.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/app/common/pay_manager.lua b/lua/app/common/pay_manager.lua index 3de67f3f..61fe559d 100644 --- a/lua/app/common/pay_manager.lua +++ b/lua/app/common/pay_manager.lua @@ -166,7 +166,8 @@ function PayManager:requestRewards(purchaseToken, orderId, originOrderId, notSho end) for _, info in ipairs(biPayGetInfo) do - BIReport:postPayGet(info.giftType, info.giftId, info.rechargeId, orderId, originOrderId, 1, msgData.rewards or {}) + local giftType = PayManager:getGiftType(info.giftType, info.giftId) + BIReport:postPayGet(giftType, info.giftId, info.rechargeId, orderId, originOrderId, 1, msgData.rewards or {}) local rechargeCfg = ConfigManager:getConfig("recharge")[info.rechargeId] if rechargeCfg then BIReport:postPurchase(rechargeCfg.price, rechargeCfg.payId, originOrderId, orderId) From 8891f004ffd005316eeb1dc5ef1dba744e337a53 Mon Sep 17 00:00:00 2001 From: chenxi Date: Mon, 12 Jun 2023 18:25:14 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/first/first.lua | 1 + lua/app/module/shop/shop_manager.lua | 3 +++ lua/app/ui/main_city/cell/side_bar_base_cell.lua | 12 ++++++++++++ lua/app/ui/main_city/cell/side_bar_idle_cell.lua | 4 ++++ .../main_city/cell/side_bar_seven_days_cell.lua | 4 ++++ lua/app/ui/main_city/main_city_ui.lua | 16 ++++++++++------ lua/app/ui/shop/shop_comp.lua | 9 ++++++++- lua/app/ui/task/task_main_ui.lua | 15 +++++++++++++++ lua/app/userdata/shop/shop_data.lua | 4 +++- 9 files changed, 60 insertions(+), 8 deletions(-) diff --git a/lua/app/first/first.lua b/lua/app/first/first.lua index 81d15463..d6011462 100644 --- a/lua/app/first/first.lua +++ b/lua/app/first/first.lua @@ -357,6 +357,7 @@ function First:requestAddress(callback, times, totalTimes) local serverResult = json.decode(rsp.Data) if serverResult then responded = true + CS.BF.BFMain.IsShenhe = (serverResult.env == "audit" and CS.UnityEngine.Application.platform == CS.UnityEngine.RuntimePlatform.IPhonePlayer) -- 如果已经成功过了 不作处理 if self.hasReceiveAddrSuccess then return diff --git a/lua/app/module/shop/shop_manager.lua b/lua/app/module/shop/shop_manager.lua index 8ea48b6c..6a8bf62e 100644 --- a/lua/app/module/shop/shop_manager.lua +++ b/lua/app/module/shop/shop_manager.lua @@ -31,6 +31,9 @@ function ShopManager:triggerGiftPopUI(actType, actId) end function ShopManager:showGiftPopUI(actType, actId, onlySelf) + if GFunc.isShenhe() then + return + end if actType == PayManager.PURCHARSE_TYPE.ACT_GIFT and actId == GConst.ShopConst.FIRST_RECHARGE_ID then UIManager:showUI("app/ui/shop/first_recharge_pop_ui") else diff --git a/lua/app/ui/main_city/cell/side_bar_base_cell.lua b/lua/app/ui/main_city/cell/side_bar_base_cell.lua index 9299da70..3d278180 100644 --- a/lua/app/ui/main_city/cell/side_bar_base_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_base_cell.lua @@ -11,6 +11,10 @@ function SideBarBaseCellComp:getModuleKey() return nil end +function SideBarBaseCellComp:getHasPurchase() + return true +end + function SideBarBaseCellComp:getIsOpen() return false end @@ -159,6 +163,14 @@ function SideBarBaseCellComp:setVisible(visible) end end +function SideBarBaseCellComp:checkIsOpen() + -- 审核模式下大多数的带内购的侧边栏入口都不显示 + if self:getHasPurchase() and GFunc.isShenhe() then + return false + end + return self:getIsOpen() +end + function SideBarBaseCellComp:getIsVisible() return self.visible end diff --git a/lua/app/ui/main_city/cell/side_bar_idle_cell.lua b/lua/app/ui/main_city/cell/side_bar_idle_cell.lua index ede99e12..6d45cd95 100644 --- a/lua/app/ui/main_city/cell/side_bar_idle_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_idle_cell.lua @@ -5,6 +5,10 @@ function SideBarIdleCell:getModuleKey() return ModuleManager.MODULE_KEY.IDLE_DROP end +function SideBarIdleCell:getHasPurchase() + return false +end + function SideBarIdleCell:getIsOpen() return DataManager.IdleData:getIsOpen() end diff --git a/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua b/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua index ddfbb7fb..28413b52 100644 --- a/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua @@ -5,6 +5,10 @@ function SideBarSevenDaysCell:getModuleKey() return ModuleManager.MODULE_KEY.SEVEN_DAY end +function SideBarSevenDaysCell:getHasPurchase() + return false +end + function SideBarSevenDaysCell:getIsOpen() return DataManager.SevenDayData:getIsOpen() end diff --git a/lua/app/ui/main_city/main_city_ui.lua b/lua/app/ui/main_city/main_city_ui.lua index 170d402e..70d0346d 100644 --- a/lua/app/ui/main_city/main_city_ui.lua +++ b/lua/app/ui/main_city/main_city_ui.lua @@ -430,7 +430,7 @@ function MainCityUI:refreshLeftBtns() CellClass = require(v) self.sideBarClassMap[v] = CellClass end - if CellClass:getIsOpen() then + if CellClass:checkIsOpen() then local cell = self.sideBarCellMap[v] if cell == nil then cell = self:addSideBarCellComp(v) @@ -510,7 +510,7 @@ function MainCityUI:refreshRightBtns() CellClass = require(v) self.sideBarClassMap[v] = CellClass end - if CellClass:getIsOpen() then + if CellClass:checkIsOpen() then local cell = self.sideBarCellMap[v] if cell == nil then cell = self:addSideBarCellComp(v) @@ -641,7 +641,7 @@ end function MainCityUI:refreshBounty() local isOpen = DataManager.BountyData:getIsOpen() - if not isOpen or self.mainComp:getCurModuleType() == GConst.MainCityConst.MAIN_MODULE.DAILY_CHALLENGE then + if not isOpen or self.mainComp:getCurModuleType() == GConst.MainCityConst.MAIN_MODULE.DAILY_CHALLENGE or GFunc.isShenhe() then self.bountyNode:setVisible(false) self.bountyRewardSpine:getSkeletonGraphic().enabled = false return @@ -881,11 +881,11 @@ function MainCityUI:checkSideBarOpenStatus() for k, CellClass in pairs(self.sideBarClassMap) do local cell = self.sideBarCellMap[k] if cell and cell:getIsActive() then - if not CellClass:getIsOpen() then + if not CellClass:checkIsOpen() then return self:refreshAllSideBars() end else - if CellClass:getIsOpen() then + if CellClass:checkIsOpen() then return self:refreshAllSideBars() end end @@ -900,7 +900,7 @@ function MainCityUI:checkMainPop() return end -- 检查功能弹窗 - if DataManager.PlayerData:getIfCanShowModuleUnlock() then + if DataManager.PlayerData:getIfCanShowModuleUnlock() and not GFunc.isShenhe() then ModuleManager.MaincityManager:showModuleUnlockUI() return end @@ -954,6 +954,10 @@ end -- 检查礼包(首充/章节/新手/助力/成长/金币顺序) function MainCityUI:checkGift() + -- 审核模式不弹礼包 + if GFunc.isShenhe() then + return + end -- 引导其间不处理 if DataManager.TutorialData:getIsHaveTutorial() then return diff --git a/lua/app/ui/shop/shop_comp.lua b/lua/app/ui/shop/shop_comp.lua index 51301b1c..29ecabe2 100644 --- a/lua/app/ui/shop/shop_comp.lua +++ b/lua/app/ui/shop/shop_comp.lua @@ -41,7 +41,7 @@ function ShopComp:initTitlePage() self.subTitleSelectText2 = self.uiMap["shop_comp.title_node.btn_cell_2.select_text"] self.subTitleIcon2 = self.uiMap["shop_comp.title_node.btn_cell_2.icon"] self.subTitleBtn2 = self.uiMap["shop_comp.title_node.btn_cell_2"] - + self.subTitleText1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_16)) -- 特惠商品 self.subTitleSelectText1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_16)) -- 特惠商品 self.subTitleText2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_17)) -- 主要商品 @@ -57,6 +57,10 @@ function ShopComp:initTitlePage() local safeHeight = SafeAreaManager:getNotchScreenHeight() self.titleNode:setAnchoredPositionY(TITLE_POS - safeHeight) + if GFunc.isShenhe() then + self.subTitleBtn2:setAnchoredPositionX(0) + self.subTitleBtn1:setVisible(false) + end end function ShopComp:refreshTitle() @@ -80,6 +84,9 @@ function ShopComp:refreshTitle() end function ShopComp:switchPage(page) + if page == PAGE_DISCOUNT and GFunc.isShenhe() then + page = PAGE_MAIN + end if self.page ~= page then self.page = page self.post = false diff --git a/lua/app/ui/task/task_main_ui.lua b/lua/app/ui/task/task_main_ui.lua index f9f93285..dba4998f 100644 --- a/lua/app/ui/task/task_main_ui.lua +++ b/lua/app/ui/task/task_main_ui.lua @@ -72,6 +72,21 @@ function TaskMainUI:initTaskList() end sortTask(self.dailyTaskList) sortTask(self.challengeTaskList) + -- 审核模式不显示战令任务 + if GFunc.isShenhe() then + for i = #self.dailyTaskList, 1, -1 do + local task = self.dailyTaskList[i] + if task.lock then + table.remove(self.dailyTaskList, i) + end + end + for i = #self.challengeTaskList, 1, -1 do + local task = self.challengeTaskList[i] + if task.lock then + table.remove(self.challengeTaskList, i) + end + end + end end function TaskMainUI:onClose() diff --git a/lua/app/userdata/shop/shop_data.lua b/lua/app/userdata/shop/shop_data.lua index 3f600d5f..83b7cba5 100644 --- a/lua/app/userdata/shop/shop_data.lua +++ b/lua/app/userdata/shop/shop_data.lua @@ -827,7 +827,9 @@ function ShopData:getRp() if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL, true) then return false end - + if GFunc.isShenhe() then + return false + end local isHotOpen = ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL_DAILY, true) -- 主要商品 每日特惠广告道具 local hotAdGoods = self:getMallDailyGoods() and self:getMallDailyGoods()[1]