fix bug
This commit is contained in:
parent
7352433e21
commit
f5d9c36f6e
@ -2118,4 +2118,70 @@ function BIReport:postVideoAdOpt(optType, adName, result)
|
|||||||
self:report(EVENT_NAME_VIDEO_AD_OPT, args)
|
self:report(EVENT_NAME_VIDEO_AD_OPT, args)
|
||||||
end
|
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
|
return BIReport
|
||||||
@ -677,8 +677,8 @@ function GFunc.sortRewards(rewards)
|
|||||||
if v.type == GConst.REWARD_TYPE.ITEM then
|
if v.type == GConst.REWARD_TYPE.ITEM then
|
||||||
rewards[i].sort = (maxType - v.type) * 1000000000 + v.item.id
|
rewards[i].sort = (maxType - v.type) * 1000000000 + v.item.id
|
||||||
elseif v.type == GConst.REWARD_TYPE.EQUIP then
|
elseif v.type == GConst.REWARD_TYPE.EQUIP then
|
||||||
local cfg = ConfigManager:getConfig("equip")[v.equip.id]
|
local cfg = ConfigManager:getConfig("equip")[v.equip.cfg_id]
|
||||||
rewards[i].sort = (maxType - v.type) * 1000000000 + cfg.qlt*100000000 + v.equip.id
|
rewards[i].sort = (maxType - v.type) * 1000000000 + cfg.qlt*100000000 + v.equip.cfg_id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
table.sort(rewards, function (a, b)
|
table.sort(rewards, function (a, b)
|
||||||
|
|||||||
@ -140,70 +140,4 @@ function EquipManager:onEquipDecomposeRsp(result)
|
|||||||
BIReport:postEquipResolveOpt(BIReport.EQUIP_OP_TYPE.RESOLVE, result.reqData.ids, result.rewards)
|
BIReport:postEquipResolveOpt(BIReport.EQUIP_OP_TYPE.RESOLVE, result.reqData.ids, result.rewards)
|
||||||
end
|
end
|
||||||
--@endregion
|
--@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
|
return EquipManager
|
||||||
@ -35,7 +35,7 @@ function RewardCell:refresh(reward, mask, check)
|
|||||||
self.itemCell:setActive(false)
|
self.itemCell:setActive(false)
|
||||||
self.equipCell:setActive(true)
|
self.equipCell:setActive(true)
|
||||||
|
|
||||||
self.equipCell:refreshByServer(reward.equip)
|
self.equipCell:refreshByCfg(self.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
self:showMask(mask, check)
|
self:showMask(mask, check)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user