diff --git a/lua/app/config/localization/localization_global_const.lua b/lua/app/config/localization/localization_global_const.lua index 43c2d83d..b0e511bc 100644 --- a/lua/app/config/localization/localization_global_const.lua +++ b/lua/app/config/localization/localization_global_const.lua @@ -463,6 +463,9 @@ local LocalizationGlobalConst = ARENA_DESC_42 = "ARENA_DESC_42", EQUIP_DESC_26 = "EQUIP_DESC_26", EQUIP_DESC_27 = "EQUIP_DESC_27", + ["SEIZED_DESC_1"] ="SEIZED_DESC_1", + ["SEIZED_DESC_2"] ="SEIZED_DESC_2", + ["SEIZED_DESC_3"]= "SEIZED_DESC_3", } return LocalizationGlobalConst \ No newline at end of file diff --git a/lua/app/config/strings/cn/global.lua b/lua/app/config/strings/cn/global.lua index d9e77e81..831b5708 100644 --- a/lua/app/config/strings/cn/global.lua +++ b/lua/app/config/strings/cn/global.lua @@ -463,6 +463,9 @@ local localization_global = ["ARENA_DESC_42"] = "未领取奖励", ["EQUIP_DESC_26"] = "武器直升{0}级礼包", ["EQUIP_DESC_27"] = "防具直升{0}级礼包", + ["SEIZED_DESC_1"] ="检测到你的账号存在异常,请联系客服或删除账号使用新建账号继续游戏。", + ["SEIZED_DESC_2"] ="联系客服", + ["SEIZED_DESC_3"]= "删除账号", } return localization_global \ No newline at end of file diff --git a/lua/app/global/global_const.lua b/lua/app/global/global_const.lua index 15f472b4..0a148c5c 100644 --- a/lua/app/global/global_const.lua +++ b/lua/app/global/global_const.lua @@ -732,6 +732,7 @@ end GConst.ERROR_STR = { SUCCESS = "SUCCESS", NAME_HAS_EXISTED = "NAME_HAS_EXISTED", + ACCOUNT_BANNED = "ACCOUNT_BANNED", } return GConst \ No newline at end of file diff --git a/lua/app/module/account/account_manager.lua b/lua/app/module/account/account_manager.lua index 6b0cd55f..9bfea8ae 100644 --- a/lua/app/module/account/account_manager.lua +++ b/lua/app/module/account/account_manager.lua @@ -28,6 +28,7 @@ function AccountManager:onDeleteAccount(result) local info = LocalData:getLastLoginInfo() BIReport:postAccountDelete(info.type) ModuleManager.LoginManager:goToLoginScene() + LocalData:saveBattleSnapshot({}) -- 清除 else GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DELETE_ACCOUNT_FAILED)) end diff --git a/lua/app/module/login/login_manager.lua b/lua/app/module/login/login_manager.lua index bc2336bb..ea4af29c 100644 --- a/lua/app/module/login/login_manager.lua +++ b/lua/app/module/login/login_manager.lua @@ -183,6 +183,21 @@ function LoginManager:loginFinish(data) else local info = LocalData:getLastLoginInfo() BIReport:postAccountLoginFailed(info.type, data.err_code) + if data.err_code == GConst.ERROR_STR.ACCOUNT_BANNED then -- 封号 + local params = { + content = I18N:getGlobalText(I18N.GlobalConst.SEIZED_DESC_1), + boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL, + okText = I18N:getGlobalText(I18N.GlobalConst.SEIZED_DESC_2), + okFunc = function() + ModuleManager.GameSettingManager:showSupport() + end, + cancelText = I18N:getGlobalText(I18N.GlobalConst.SEIZED_DESC_3), + cancelFunc = function() + ModuleManager.AccountManager:deleteAccount() + end + } + GFunc.showMessageBox(params) + end end end @@ -198,40 +213,40 @@ function LoginManager:saveAuthArgs(isReconnect, name) args.client_info = self:getClientInfo() args.reconnect = isReconnect - local sendQueue = LocalData:getSendQueue() + -- local sendQueue = LocalData:getSendQueue() args.sync = { pip = GFunc.getArray() } - if sendQueue and sendQueue[1] then - local ProtoMsgDispatch = require "app/proto/proto_msg_dispatch" - local pb = require "pb" - for _, info in ipairs(sendQueue) do - local curParams = info.params - local needAd = false - if info.msgName == ProtoMsgType.FromMsgEnum.PipedReq then - local msgName = ProtoMsgDispatch:getReqMsgNameByMsgId(curParams.msg_id) - if msgName then - local fullMsgName = ProtoMsgDispatch:getMsgFullNameByMsgName(msgName) - if fullMsgName then - if curParams.data and type(curParams.data) == "table" then - local ok, pbData = pcall(function() - return pb.encode(fullMsgName, curParams.data) - end) - if ok then - needAd = true - curParams.data = pbData - end - end - end - end - end - if needAd then - table.insert(args.sync.pip, curParams) - end - end - end + -- if sendQueue and sendQueue[1] then + -- local ProtoMsgDispatch = require "app/proto/proto_msg_dispatch" + -- local pb = require "pb" + -- for _, info in ipairs(sendQueue) do + -- local curParams = info.params + -- local needAd = false + -- if info.msgName == ProtoMsgType.FromMsgEnum.PipedReq then + -- local msgName = ProtoMsgDispatch:getReqMsgNameByMsgId(curParams.msg_id) + -- if msgName then + -- local fullMsgName = ProtoMsgDispatch:getMsgFullNameByMsgName(msgName) + -- if fullMsgName then + -- if curParams.data and type(curParams.data) == "table" then + -- local ok, pbData = pcall(function() + -- return pb.encode(fullMsgName, curParams.data) + -- end) + -- if ok then + -- needAd = true + -- curParams.data = pbData + -- end + -- end + -- end + -- end + -- end + -- if needAd then + -- table.insert(args.sync.pip, curParams) + -- end + -- end + -- end NetManager:saveAuthArgs(args) end diff --git a/lua/app/net/net_manager.lua b/lua/app/net/net_manager.lua index 625e9956..8a3f4fe2 100644 --- a/lua/app/net/net_manager.lua +++ b/lua/app/net/net_manager.lua @@ -1073,23 +1073,24 @@ function NetManager:getNotAddCostsRsp(msgName) end function NetManager:pipedMessage(msgName, params) - if msgName == ProtoMsgType.FromMsgEnum.LoginReq or - msgName == ProtoMsgType.FromMsgEnum.SyncReq or - msgName == ProtoMsgType.FromMsgEnum.IdleRewardReq or - msgName == ProtoMsgType.FromMsgEnum.IdleExtraRewardReq or - msgName == ProtoMsgType.FromMsgEnum.MailCycleReq or - msgName == ProtoMsgType.FromMsgEnum.GMReq then - return msgName, params - end - local msgId = ProtoMsgDispatch:getMsgIdByMsgName(msgName) - self.msgId = self.msgId + 1 - local pipedStruct = { - id = self.msgId, - ts = Time:getServerTime() * 1000, - msg_id = msgId, - data = params, - } - return ProtoMsgType.FromMsgEnum.PipedReq, pipedStruct + return msgName, params -- 屏蔽PipedReq + -- if msgName == ProtoMsgType.FromMsgEnum.LoginReq or + -- msgName == ProtoMsgType.FromMsgEnum.SyncReq or + -- msgName == ProtoMsgType.FromMsgEnum.IdleRewardReq or + -- msgName == ProtoMsgType.FromMsgEnum.IdleExtraRewardReq or + -- msgName == ProtoMsgType.FromMsgEnum.MailCycleReq or + -- msgName == ProtoMsgType.FromMsgEnum.GMReq then + -- return msgName, params + -- end + -- local msgId = ProtoMsgDispatch:getMsgIdByMsgName(msgName) + -- self.msgId = self.msgId + 1 + -- local pipedStruct = { + -- id = self.msgId, + -- ts = Time:getServerTime() * 1000, + -- msg_id = msgId, + -- data = params, + -- } + -- return ProtoMsgType.FromMsgEnum.PipedReq, pipedStruct end if EDITOR_MODE then