From c159871bf92b2c4ad001a50fc6384df794a45c9e Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 27 Sep 2021 03:41:16 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/gameserver/metamgr.cc | 4 +++ server/gameserver/metamgr.h | 4 +++ server/tools/protobuild/cs_msgid.proto | 4 +++ server/tools/protobuild/cs_proto.proto | 46 ++++++++++++++++++++++++++ 4 files changed, 58 insertions(+) diff --git a/server/gameserver/metamgr.cc b/server/gameserver/metamgr.cc index 1f91bab..540007b 100644 --- a/server/gameserver/metamgr.cc +++ b/server/gameserver/metamgr.cc @@ -341,6 +341,10 @@ public: #ifdef DEBUG MetaMgr::Instance()->show_team_ui = 1; #endif + MetaMgr::Instance()->match_team_time = MetaMgr::Instance()->GetSysParamAsInt("match_team_time", 0); + MetaMgr::Instance()->match_robot_time = MetaMgr::Instance()->GetSysParamAsInt("match_robot_time", 0); + MetaMgr::Instance()->match_choose_time = MetaMgr::Instance()->GetSysParamAsInt("match_choose_time", 0); + MetaMgr::Instance()->match_lock_time = MetaMgr::Instance()->GetSysParamAsInt("match_lock_time", 0); { METAMGR_READ(prebattle_box_id_chiji, 0); } diff --git a/server/gameserver/metamgr.h b/server/gameserver/metamgr.h index 9486c22..990a052 100644 --- a/server/gameserver/metamgr.h +++ b/server/gameserver/metamgr.h @@ -176,6 +176,10 @@ class MetaMgr : public a8::Singleton int async_send_mapblock = 1; int show_team_ui = 1; + int match_team_time = 0; + int match_robot_time = 0; + int match_choose_time = 0; + int match_lock_time = 0; private: MetaDataLoader* loader_ = nullptr; diff --git a/server/tools/protobuild/cs_msgid.proto b/server/tools/protobuild/cs_msgid.proto index 4f5cf81..a3dbe9e 100644 --- a/server/tools/protobuild/cs_msgid.proto +++ b/server/tools/protobuild/cs_msgid.proto @@ -21,6 +21,9 @@ enum CMMessageId_e _CMGetBoxInfo = 215; _CMOpenBox = 216; _CMExecCommand = 217; + _CMMatchCancel = 218; + _CMMatchChoose = 219; + _CMMatchStartGame = 220; } enum SMMessageId_e @@ -49,4 +52,5 @@ enum SMMessageId_e _SMGameStart = 1013; _SMSysPiaoMsg = 1014; _SMShowCountdown = 1015; + _SMUpdateMatchInfo = 1016; } diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index 23af7d4..d2de770 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -868,6 +868,27 @@ message MFRichTextElement optional MFImageElement union_obj_2 = 3; //图片元素 } +message MFMatchTeamMember +{ + optional string account_id = 1; //账号id account_id + optional string name = 2; //角色名 + optional string avatar_url = 3; //头像 + optional int32 hero_id = 4; //英雄id + repeated MFWeapon weapons = 5; //武器列表 + repeated MFSkin skins = 6; //皮肤列表 key: 皮肤id value:皮肤等级 + repeated MFPair skill_list = 7; //技能列表 key:技能id value:预留给之后扩展,目前传0就行 + optional bool is_leader = 8; //是否队长 + optional int32 state = 9; //0:准备 1:已准备 +} + +//该消息每秒同步 +message MFMatchInfo +{ + repeated MFMatchTeamMember members = 1; //成员列表 + optional int32 phase = 2; //阶段 1:合并队伍(匹配中) 2:选择角色 3:锁定(已准备) + optional int32 countdown = 3; //倒计时(单位秒) +} + //end mfmsg //加入 @@ -1066,6 +1087,25 @@ message CMOpenBox optional int32 box_id = 1; //1: 战前宝箱 } +//组队匹配-取消 +message CMMatchCancel +{ +} + +//组队匹配-选取英雄 +message CMMatchChoose +{ + optional int32 hero_id = 1; //英雄id + repeated MFWeapon weapons = 2; //武器列表 + repeated MFSkin skins = 3; //皮肤列表 key: 皮肤id value:皮肤等级 + repeated MFPair skill_list = 4; //技能列表 key:技能id value:预留给之后扩展,目前传0就行 +} + +//组队匹配-出击 +message CMMatchStartGame +{ +} + //endcmmsg //观战error_code == 0 时关闭结算界面,回到战斗界面 @@ -1255,3 +1295,9 @@ message SMShowCountdown optional int32 countdown = 2; //倒计时(单位秒),倒计时用来替换msg里的%d标识 optional int32 msg_type = 3; //保留字段 } + +//更新匹配信息 +message SMUpdateMatchInfo +{ + optional MFMatchInfo info = 1; //匹配信息 +}