增加上报属性
This commit is contained in:
parent
792a5a1672
commit
f74226c056
@ -134,6 +134,7 @@ BIReport.ITEM_GET_TYPE = {
|
||||
WEAPON_GIFT = "WeaponGift",
|
||||
ARMOR_GIFT = "ArmorGift",
|
||||
EQUIP_UPGRADE = "EquipUpgrade",
|
||||
ARMOR_UPGRADE = "ArmorUpgrade",
|
||||
}
|
||||
|
||||
BIReport.ADS_CLICK_TYPE = {
|
||||
@ -357,6 +358,9 @@ function BIReport:report(name, args)
|
||||
local str, lv, atk, hp = DataManager.FormationData:getStageFormationBIStr()
|
||||
args.formation_atk = atk
|
||||
args.formation_hp = hp
|
||||
if DataManager.DungeonData then
|
||||
args.dungeon_progress = DataManager.DungeonData:getDungeonBIStr()
|
||||
end
|
||||
end
|
||||
args.current_version = CS.BF.BFMain.Instance.GameLaunchMgr:GetCurrentVersion()
|
||||
args.is_new_player = self.isNewPlayer
|
||||
@ -1091,11 +1095,12 @@ function BIReport:postVitGet(num, getType, vitAll)
|
||||
end
|
||||
|
||||
-- 体力使用
|
||||
function BIReport:postVitUse(num)
|
||||
function BIReport:postVitUse(num, getType)
|
||||
-- EnergyNum 当前体力数 减少体力时 Int 使用体力数量
|
||||
-- IsNew 是否是新用户 Boolean 是否为当天新用户,True = 是,False = 否
|
||||
-- MaxChapter 最大章节 Int 已解锁的最大章节
|
||||
local args = {
|
||||
type = getType,
|
||||
vit_num = num,
|
||||
vit_all = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_VIT),
|
||||
}
|
||||
|
||||
@ -93,8 +93,15 @@ end
|
||||
-- 响应结算金币副本
|
||||
function DungeonManager:respEndChallengeGold(result)
|
||||
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
||||
local passId = DataManager.DungeonData:getPassedMaxId(ModuleManager.MODULE_KEY.DUNGEON_GOLD)
|
||||
DataManager.DungeonData:initDungeonGold(result.gold_challenge)
|
||||
ModuleManager.BattleManager:showBattleResultUI(GConst.BattleConst.BATTLE_TYPE.DUNGEON_GOLD, result.rewards, result.reqData.combatReport)
|
||||
|
||||
if passId ~= DataManager.DungeonData:getPassedMaxId(ModuleManager.MODULE_KEY.DUNGEON_GOLD) then
|
||||
local data = {}
|
||||
data.dungeon_progress = DataManager.DungeonData:getDungeonBIStr()
|
||||
CS.ThinkingAnalytics.ThinkingAnalyticsAPI.UserSet(data)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -182,8 +189,15 @@ end
|
||||
-- 响应结算碎片副本
|
||||
function DungeonManager:respEndChallengeShards(result)
|
||||
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
||||
local passId = DataManager.DungeonData:getPassedMaxId(ModuleManager.MODULE_KEY.DUNGEON_SHARDS)
|
||||
DataManager.DungeonData:initDungeonShards(result.shards_challenge)
|
||||
ModuleManager.BattleManager:showBattleResultUI(GConst.BattleConst.BATTLE_TYPE.DUNGEON_SHARDS, result.rewards, result.reqData and result.reqData.combatReport or {})
|
||||
|
||||
if passId ~= DataManager.DungeonData:getPassedMaxId(ModuleManager.MODULE_KEY.DUNGEON_SHARDS) then
|
||||
local data = {}
|
||||
data.dungeon_progress = DataManager.DungeonData:getDungeonBIStr()
|
||||
CS.ThinkingAnalytics.ThinkingAnalyticsAPI.UserSet(data)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -94,11 +94,18 @@ end
|
||||
function DungeonArmorManager:rspEndChallenge(result)
|
||||
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
||||
local armorData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_ARMOR)
|
||||
local passId = armorData:getPassedMaxId()
|
||||
if result.reqData then
|
||||
armorData:refreshInfoOnSettlement(result.reqData.chapter_armor_id, result)
|
||||
end
|
||||
ModuleManager.BattleManager:showBattleArmorResultUI(GConst.BattleConst.BATTLE_TYPE.DUNGEON_ARMOR, result.rewards, result.reqData.combatReport)
|
||||
DataManager.DungeonData:setDirty()
|
||||
|
||||
if passId ~= armorData:getPassedMaxId() then
|
||||
local data = {}
|
||||
data.dungeon_progress = DataManager.DungeonData:getDungeonBIStr()
|
||||
CS.ThinkingAnalytics.ThinkingAnalyticsAPI.UserSet(data)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -80,6 +80,7 @@ end
|
||||
function DungeonWeaponManager:rspEndChallenge(result)
|
||||
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
||||
local weaponData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_WEAPON)
|
||||
local passId = weaponData:getPassedMaxId()
|
||||
weaponData:refreshInfoOnSettlement(result.reqData.chapter_weapon_id, result)
|
||||
|
||||
local firstRewardsIdx = #result.first_rewards
|
||||
@ -102,6 +103,12 @@ function DungeonWeaponManager:rspEndChallenge(result)
|
||||
end
|
||||
ModuleManager.BattleManager:showBattleResultUI(GConst.BattleConst.BATTLE_TYPE.DUNGEON_WEAPON, resultRewards, result.reqData.combatReport, nil, firstRewardsIdx, true)
|
||||
DataManager.DungeonData:setDirty()
|
||||
|
||||
if passId ~= weaponData:getPassedMaxId() then
|
||||
local data = {}
|
||||
data.dungeon_progress = DataManager.DungeonData:getDungeonBIStr()
|
||||
CS.ThinkingAnalytics.ThinkingAnalyticsAPI.UserSet(data)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -35,7 +35,11 @@ function EquipManager:reqUpgrade(id, part)
|
||||
return
|
||||
end
|
||||
|
||||
self:sendMessage(ProtoMsgType.FromMsgEnum.EquipUpgradeReq, {hero_id = id, position = part}, {}, self.rspUpgrade, BIReport.ITEM_GET_TYPE.EQUIP_UPGRADE)
|
||||
local itemGetType = BIReport.ITEM_GET_TYPE.EQUIP_UPGRADE
|
||||
if part ~= GConst.EquipConst.PART_TYPE.WEAPON then
|
||||
itemGetType = BIReport.ITEM_GET_TYPE.ARMOR_UPGRADE
|
||||
end
|
||||
self:sendMessage(ProtoMsgType.FromMsgEnum.EquipUpgradeReq, {hero_id = id, position = part}, {}, self.rspUpgrade, itemGetType)
|
||||
end
|
||||
|
||||
function EquipManager:rspUpgrade(result)
|
||||
|
||||
@ -164,6 +164,7 @@ function LoginManager:loginFinish(data)
|
||||
data.formation, data.formation_lv, data.formation_atk, data.formation_hp = DataManager.FormationData:getStageFormationBIStr()
|
||||
data.formation_lv = nil
|
||||
data.all_heroes = DataManager.HeroData:getAllHeroesBIStr()
|
||||
data.dungeon_progress = DataManager.DungeonData:getDungeonBIStr()
|
||||
CS.ThinkingAnalytics.ThinkingAnalyticsAPI.UserSet(data)
|
||||
|
||||
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.LOGIN_REQ_SUCCESS)
|
||||
|
||||
@ -160,7 +160,7 @@ function ItemData:addItem(data, itemGetType)
|
||||
elseif data.id == GConst.ItemConst.ITEM_ID_VIT then
|
||||
if data.count < 0 then
|
||||
ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.X_VIT_COST, -data.count)
|
||||
BIReport:postVitUse(data.count)
|
||||
BIReport:postVitUse(data.count, itemGetType)
|
||||
else
|
||||
BIReport:postVitGet(data.count, itemGetType)
|
||||
end
|
||||
|
||||
@ -473,4 +473,21 @@ function DungeonData:getDungeonDataByType(moduleKey)
|
||||
return self.dataDungeons[moduleKey]
|
||||
end
|
||||
|
||||
function DungeonData:getDungeonBIStr()
|
||||
local str
|
||||
if not self.dataDungeons then
|
||||
return GConst.EMPTY_STRING
|
||||
end
|
||||
for moduleKey, entity in pairs(self.dataDungeons) do
|
||||
if str then
|
||||
str = str .. "|"
|
||||
else
|
||||
str = GConst.EMPTY_STRING
|
||||
end
|
||||
str = str .. string.gsub(moduleKey, "_open", "") .. ":" .. entity:getPassedMaxId()
|
||||
end
|
||||
Logger.logHighlight(str)
|
||||
return str
|
||||
end
|
||||
|
||||
return DungeonData
|
||||
Loading…
x
Reference in New Issue
Block a user