diff --git a/lua/app/common/bi_report.lua b/lua/app/common/bi_report.lua index aceb491b..3a23407a 100644 --- a/lua/app/common/bi_report.lua +++ b/lua/app/common/bi_report.lua @@ -258,6 +258,19 @@ BIReport.PAY_UI_SHOW_TYPE = { SHOP_SHOW = "ShopShow", } +BIReport.BOX_OPEN_BOX_TYPE = { + SHOP = "Shop", + ACTIVITY = "Activity", +} + +BIReport.BOX_OPEN_OPEN_TYPE = { + USE_KEY = "UseKey", + USE_GEM = "UseGem", + BOUNTY = "Bounty", + ARENA_BOUNTY = "ArenaBounty", +} + + -- b6 local EVENT_NAME_EXIT = "client_exit" local EVENT_NAME_FIGHT = "client_fight" @@ -287,6 +300,7 @@ local EVENT_NAME_IRONSOURCE_AD_REVENUE = "client_ironsource_ad_revenue" -- applo local EVENT_NAME_DAILY_CHALLENGE_OPT = "client_daily_challenge_opt" local EVENT_NAME_ARENA_OPT = "client_arena_opt"-- 竞技场 local EVENT_NAME_MISCELLANEOUS_OPT = "event_name_miscellaneous_opt" -- 一些杂项 +local EVENT_BOX_OPEN = "client_box_open" function BIReport:setIsNewPlayer(isNewPlayer) self.isNewPlayer = isNewPlayer @@ -1607,4 +1621,15 @@ function BIReport:postPbAuthfailed(pbName, lastLoginInfo, authFailToLogin) self:report(EVENT_NAME_NETWORK_OPT, args) end +function BIReport:postBoxOpen(id, boxType, openType, box_level, rewards) + local args = { + box_type = boxType, + open_type = openType, + box_item_id = id, + box_level = box_level, + rewardsStr = GFunc.getItemRewardsStr(rewards) + } + self:report(EVENT_BOX_OPEN, args) +end + return BIReport \ No newline at end of file diff --git a/lua/app/global/global_func.lua b/lua/app/global/global_func.lua index cf666a8e..b0a80710 100644 --- a/lua/app/global/global_func.lua +++ b/lua/app/global/global_func.lua @@ -788,6 +788,23 @@ function GFunc.getRewardsStr(rewards) return itemStr end +function GFunc.getItemRewardsStr(rewards) + if rewards == nil then + return + end + + local itemStr = "" + for k, v in ipairs(rewards) do + if v.type == GConst.REWARD_TYPE.ITEM then + itemStr = itemStr .. v.item.id .. ":" .. v.item.count + end + if k ~= #rewards then + itemStr = itemStr.. "|" + end + end + return itemStr +end + function GFunc.copyStr(str) CS.UnityEngine.GUIUtility.systemCopyBuffer = str end diff --git a/lua/app/module/arena/arena_bounty_manager.lua b/lua/app/module/arena/arena_bounty_manager.lua index a68c2da0..1d461760 100644 --- a/lua/app/module/arena/arena_bounty_manager.lua +++ b/lua/app/module/arena/arena_bounty_manager.lua @@ -40,6 +40,8 @@ function ArenaBountyManager:onClaimReward(result) end if isSpecialBox then ModuleManager.ShopManager:showBoxOpenUI({type = GConst.ShopConst.BOX_REWARD_TYPE.ARENA_BOUNTY, params = rewardId, rewards = result.rewards}) + local openType = BIReport.BOX_OPEN_OPEN_TYPE.ARENA_BOUNTY + BIReport:postBoxOpen(rewardId, BIReport.BOX_OPEN_BOX_TYPE.ACTIVITY, openType, 0, result.rewards) else GFunc.showRewardBox(result.rewards) end diff --git a/lua/app/module/bounty/bounty_manager.lua b/lua/app/module/bounty/bounty_manager.lua index 8e49aa06..3e633da8 100644 --- a/lua/app/module/bounty/bounty_manager.lua +++ b/lua/app/module/bounty/bounty_manager.lua @@ -40,6 +40,8 @@ function BountyManager:onClaimReward(result) end if isSpecialBox then ModuleManager.ShopManager:showBoxOpenUI({type = GConst.ShopConst.BOX_REWARD_TYPE.BOUNTY, params = rewardId, rewards = result.rewards}) + local openType = BIReport.BOX_OPEN_OPEN_TYPE.BOUNTY + BIReport:postBoxOpen(rewardId, BIReport.BOX_OPEN_BOX_TYPE.ACTIVITY, openType, 0, result.rewards) else GFunc.showRewardBox(result.rewards) end diff --git a/lua/app/module/summon/summon_manager.lua b/lua/app/module/summon/summon_manager.lua index 73fde500..8f2da97b 100644 --- a/lua/app/module/summon/summon_manager.lua +++ b/lua/app/module/summon/summon_manager.lua @@ -40,6 +40,13 @@ function SummonManager:summonFinish(result) elseif summonType == GConst.SummonConst.SUMMON_TYPE.LV_3 then ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.X_OPEN_SHOP_BOX_LEVEL_3, 1) end + if result.rewards then + local openType = BIReport.BOX_OPEN_OPEN_TYPE.USE_KEY + if result.reqData.consume_type ~= 1 then -- 钻石 + openType = BIReport.BOX_OPEN_OPEN_TYPE.USE_GEM + end + BIReport:postBoxOpen(summonType, BIReport.BOX_OPEN_BOX_TYPE.SHOP, openType, DataManager.SummonData:getSummonLevel(), result.rewards) + end end if result.summon_info.count then local totalCount = 0 diff --git a/lua/app/ui/dungeon_weapon/dungeon_weapon_main_ui.lua b/lua/app/ui/dungeon_weapon/dungeon_weapon_main_ui.lua index bdd933ad..0c8fd1ed 100644 --- a/lua/app/ui/dungeon_weapon/dungeon_weapon_main_ui.lua +++ b/lua/app/ui/dungeon_weapon/dungeon_weapon_main_ui.lua @@ -70,6 +70,7 @@ function DungeonWeaponMainUI:_bind() self:bind(self.weaponData, "isDirty", function() self:refreshFormation() self:refreshRemianNode() + self:refreshScrollrect() end) self:bind(DataManager.FormationData, "dirty", function() @@ -91,8 +92,10 @@ function DungeonWeaponMainUI:refreshScrollrect() self.scrollRect:addRefreshCallback(function(index, cell) cell:refresh(self.chapterList[index]) end) + self.scrollRect:refillCells(#self.chapterList, nil, self.targetId) + else + self.scrollRect:refreshAll() end - self.scrollRect:refillCells(#self.chapterList, nil, self.targetId) end function DungeonWeaponMainUI:refreshFormation()