From f5d9c36f6e15cb227efc53139c7f0b3f954173e7 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Thu, 30 Oct 2025 21:39:53 +0800 Subject: [PATCH] fix bug --- lua/app/common/bi_report.lua | 66 ++++++++++++++++++++++++++ lua/app/global/global_func.lua | 4 +- lua/app/module/equip/equip_manager.lua | 66 -------------------------- lua/app/ui/common/cell/reward_cell.lua | 2 +- 4 files changed, 69 insertions(+), 69 deletions(-) diff --git a/lua/app/common/bi_report.lua b/lua/app/common/bi_report.lua index 2394424c..10c85a19 100644 --- a/lua/app/common/bi_report.lua +++ b/lua/app/common/bi_report.lua @@ -2118,4 +2118,70 @@ function BIReport:postVideoAdOpt(optType, adName, result) self:report(EVENT_NAME_VIDEO_AD_OPT, args) end +--@region 装备上报 +local EVENT_NAME_EQUIP_OPT = "client_equip_opt" + +BIReport.EQUIP_OP_TYPE = { + GET = "Get", + WEAR = "Wear", + LEVEL_UP = "LevelUp", + REFINE_UP = "RefineUp", + RESOLVE = "Resolve", +} + +-- 装备 +function BIReport:postEquipWearOpt(optType, seat, list) + local str_list = "" + for _, equipId in ipairs(list) do + str_list = str_list .. equipId .. ";" + end + local args = { + opt_type = optType, + seat = seat, + wear_equips = str_list, + seat_data = DataManager.EquipData:getSeatDataString(), + } + self:report(EVENT_NAME_EQUIP_OPT, args) +end + +function BIReport:postEquipLvUpOpt(optType, seat, parts) + local strData = "" + for _, part in ipairs(parts) do + strData = strData .. part .. ";" + end + local args = { + opt_type = optType, + seat = seat, + part = strData, + seat_data = DataManager.EquipData:getSeatDataString(), + } + self:report(EVENT_NAME_EQUIP_OPT, args) +end + +function BIReport:postEquipResolveOpt(optType, resolveIds, rewards) + local args = { + opt_type = optType, + resolve_ids = resolveIds, + reward_str = rewards and GFunc.getRewardsStr(rewards) or nil, + seat_data = DataManager.EquipData:getSeatDataString(), + } + self:report(EVENT_NAME_EQUIP_OPT, args) +end + +function BIReport:postEquipGet(equipId, cfgId, getType) + local equip = DataManager.EquipData:getEquipByUid(equipId) + local args = { + opt_type = BIReport.EQUIP_OP_TYPE.GET, + equip_id = equipId, + equip_cfg_id = cfgId, + type = getType, + } + if equip then + args.equip_part = equip:getPart() + args.equip_qlt = equip:getQlt() + end + self:report(EVENT_NAME_EQUIP_OPT, args) +end +--@endregion + 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 ffeaa52e..14fcc3bb 100644 --- a/lua/app/global/global_func.lua +++ b/lua/app/global/global_func.lua @@ -677,8 +677,8 @@ function GFunc.sortRewards(rewards) if v.type == GConst.REWARD_TYPE.ITEM then rewards[i].sort = (maxType - v.type) * 1000000000 + v.item.id elseif v.type == GConst.REWARD_TYPE.EQUIP then - local cfg = ConfigManager:getConfig("equip")[v.equip.id] - rewards[i].sort = (maxType - v.type) * 1000000000 + cfg.qlt*100000000 + v.equip.id + local cfg = ConfigManager:getConfig("equip")[v.equip.cfg_id] + rewards[i].sort = (maxType - v.type) * 1000000000 + cfg.qlt*100000000 + v.equip.cfg_id end end table.sort(rewards, function (a, b) diff --git a/lua/app/module/equip/equip_manager.lua b/lua/app/module/equip/equip_manager.lua index d81ac7b2..e3ecb39d 100644 --- a/lua/app/module/equip/equip_manager.lua +++ b/lua/app/module/equip/equip_manager.lua @@ -140,70 +140,4 @@ function EquipManager:onEquipDecomposeRsp(result) BIReport:postEquipResolveOpt(BIReport.EQUIP_OP_TYPE.RESOLVE, result.reqData.ids, result.rewards) end --@endregion - ---@region 上报 -local EVENT_NAME_EQUIP_OPT = "client_equip_opt" - -BIReport.EQUIP_OP_TYPE = { - GET = "Get", - WEAR = "Wear", - LEVEL_UP = "LevelUp", - REFINE_UP = "RefineUp", - RESOLVE = "Resolve", -} - --- 装备 -function BIReport:postEquipWearOpt(optType, seat, list) - local str_list = "" - for _, equipId in ipairs(list) do - str_list = str_list .. equipId .. ";" - end - local args = { - opt_type = optType, - seat = seat, - wear_equips = str_list, - seat_data = DataManager.EquipData:getSeatDataString(), - } - self:report(EVENT_NAME_EQUIP_OPT, args) -end - -function BIReport:postEquipLvUpOpt(optType, seat, parts) - local strData = "" - for _, part in ipairs(parts) do - strData = strData .. part .. ";" - end - local args = { - opt_type = optType, - seat = seat, - part = strData, - seat_data = DataManager.EquipData:getSeatDataString(), - } - self:report(EVENT_NAME_EQUIP_OPT, args) -end - -function BIReport:postEquipResolveOpt(optType, resolveIds, rewards) - local args = { - opt_type = optType, - resolve_ids = resolveIds, - reward_str = rewards and GFunc.getRewardsStr(rewards) or nil, - seat_data = DataManager.EquipData:getSeatDataString(), - } - self:report(EVENT_NAME_EQUIP_OPT, args) -end - -function BIReport:postEquipGet(equipId, cfgId, getType) - local equip = DataManager.EquipData:getEquipByUid(equipId) - local args = { - opt_type = BIReport.EQUIP_OP_TYPE.GET, - equip_id = equipId, - equip_cfg_id = cfgId, - type = getType, - } - if equip then - args.equip_part = equip:getPart() - args.equip_qlt = equip:getQlt() - end - self:report(EVENT_NAME_EQUIP_OPT, args) -end ---@endregion return EquipManager \ No newline at end of file diff --git a/lua/app/ui/common/cell/reward_cell.lua b/lua/app/ui/common/cell/reward_cell.lua index dbc6baed..bfa3438c 100644 --- a/lua/app/ui/common/cell/reward_cell.lua +++ b/lua/app/ui/common/cell/reward_cell.lua @@ -35,7 +35,7 @@ function RewardCell:refresh(reward, mask, check) self.itemCell:setActive(false) self.equipCell:setActive(true) - self.equipCell:refreshByServer(reward.equip) + self.equipCell:refreshByCfg(self.id) end self:showMask(mask, check)