上报和容错
This commit is contained in:
parent
8c88139a09
commit
5eff2c3633
@ -376,6 +376,7 @@ function BIReport:report(name, args)
|
|||||||
if DataManager.DungeonData then
|
if DataManager.DungeonData then
|
||||||
args.dungeon_progress = DataManager.DungeonData:getDungeonBIStr()
|
args.dungeon_progress = DataManager.DungeonData:getDungeonBIStr()
|
||||||
end
|
end
|
||||||
|
args.game_version = DataManager.PlayerData:getGameVersion()
|
||||||
end
|
end
|
||||||
args.current_version = CS.BF.BFMain.Instance.GameLaunchMgr:GetCurrentVersion()
|
args.current_version = CS.BF.BFMain.Instance.GameLaunchMgr:GetCurrentVersion()
|
||||||
args.is_new_player = self.isNewPlayer
|
args.is_new_player = self.isNewPlayer
|
||||||
@ -1564,13 +1565,22 @@ function BIReport:postDailyChallengeTaskState(completedCount, taskInfo)
|
|||||||
self:report(EVENT_NAME_DAILY_CHALLENGE_OPT, args)
|
self:report(EVENT_NAME_DAILY_CHALLENGE_OPT, args)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BIReport:postNetError(pbName, code, reqData)
|
function BIReport:postNetError(pbName, code, reqData, pbData)
|
||||||
|
local msg = GConst.EMPTY_STRING
|
||||||
|
if pbData then
|
||||||
|
msg = json.encode(pbData)
|
||||||
|
if msg and #msg > 2000 then
|
||||||
|
msg = string.sub(msg, 1, 2000)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local args = {
|
local args = {
|
||||||
event_type = BIReport.NETWORK_OPT_TYPE.ERROR_CODE,
|
event_type = BIReport.NETWORK_OPT_TYPE.ERROR_CODE,
|
||||||
pb_name = pbName,
|
pb_name = pbName,
|
||||||
ui_name = UIManager:getTopUIIndex(),
|
ui_name = UIManager:getTopUIIndex(),
|
||||||
error_code = code,
|
error_code = code,
|
||||||
req_data = reqData
|
req_data = reqData,
|
||||||
|
msg = msg,
|
||||||
}
|
}
|
||||||
self:report(EVENT_NAME_NETWORK_OPT, args)
|
self:report(EVENT_NAME_NETWORK_OPT, args)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -773,7 +773,7 @@ function NetManager:onReceive(msgId, data)
|
|||||||
reqDataStr = json.encode(sendInfo.params)
|
reqDataStr = json.encode(sendInfo.params)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
BIReport:postNetError(sendMsgName, pbData.err_code, reqDataStr)
|
BIReport:postNetError(sendMsgName, pbData.err_code, reqDataStr, pbData)
|
||||||
end
|
end
|
||||||
|
|
||||||
local callbacks = self.receiveCallbacks[msg]
|
local callbacks = self.receiveCallbacks[msg]
|
||||||
|
|||||||
@ -215,6 +215,7 @@ function BattleBaseData:refreshBoard(board, boardEdge, blockIcon, snapshot)
|
|||||||
boardEdge = snapshot.gridEdge
|
boardEdge = snapshot.gridEdge
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if boardEdge then
|
||||||
for _, info in pairs(boardEdge) do
|
for _, info in pairs(boardEdge) do
|
||||||
local initInfo = {
|
local initInfo = {
|
||||||
posId = info.pos,
|
posId = info.pos,
|
||||||
@ -231,6 +232,7 @@ function BattleBaseData:refreshBoard(board, boardEdge, blockIcon, snapshot)
|
|||||||
self.gridEdgeEntities[initInfo.posId][initInfo.direction] = self:getNewGridEdgeEntity(initInfo)
|
self.gridEdgeEntities[initInfo.posId][initInfo.direction] = self:getNewGridEdgeEntity(initInfo)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if snapshot and snapshot.boardSnapInfo then
|
if snapshot and snapshot.boardSnapInfo then
|
||||||
for posIdStr, snap in pairs(snapshot.boardSnapInfo) do
|
for posIdStr, snap in pairs(snapshot.boardSnapInfo) do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user