From a037b22de9ceae04c73cca87bc71739b5ced15c0 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 20 Aug 2020 15:54:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=B4=E6=9D=A1=E7=89=B9?= =?UTF-8?q?=E6=AE=8A=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/masterserver/constant.h | 6 ++++++ server/masterserver/gsmgr.cc | 8 ++++++++ server/tools/protobuild/ss_proto.proto | 1 + 3 files changed, 15 insertions(+) diff --git a/server/masterserver/constant.h b/server/masterserver/constant.h index 24b7fd5..546cca7 100755 --- a/server/masterserver/constant.h +++ b/server/masterserver/constant.h @@ -118,6 +118,12 @@ enum VirtualPlayer_e VP_Mine = 9000003, }; +enum GameChannel_e +{ + kWxChannelId = 6001, + kTouTiaoChannelId = 6006 +}; + const char* const PROJ_NAME_FMT = "game%d_masterserver"; const char* const PROJ_ROOT_FMT = "/data/logs/%s"; diff --git a/server/masterserver/gsmgr.cc b/server/masterserver/gsmgr.cc index ab728fd..68fd153 100644 --- a/server/masterserver/gsmgr.cc +++ b/server/masterserver/gsmgr.cc @@ -30,6 +30,14 @@ void GSMgr::_SS_WSP_RequestTargetServer(f8::MsgHdr& hdr, const ss::SS_WSP_Reques if (!App::Instance()->IsSeparateChannel(channel)) { channel = 0; } + #if 1 + int src_channel = f8::ExtractChannelIdFromAccountId(msg.account_id()); + if (channel == 0 && + src_channel == kTouTiaoChannelId && + msg.proto_version() == 2019071502) { + channel = src_channel; + } + #endif ss::SS_MS_ResponseTargetServer respmsg; respmsg.set_context_id(msg.context_id()); if (msg.is_reconnect()) { diff --git a/server/tools/protobuild/ss_proto.proto b/server/tools/protobuild/ss_proto.proto index aecbd44..ab225c3 100755 --- a/server/tools/protobuild/ss_proto.proto +++ b/server/tools/protobuild/ss_proto.proto @@ -21,6 +21,7 @@ message SS_WSP_RequestTargetServer optional string team_id = 3; optional string server_info = 4; optional int32 is_reconnect = 5; + optional int32 proto_version = 6; //协议版本号Constant_e.ProtoVersion } message SS_MS_ResponseTargetServer