This commit is contained in:
aozhiwei 2024-02-01 13:58:00 +08:00
parent c943bb24eb
commit 3cdf1762fa
3 changed files with 24 additions and 5 deletions

View File

@ -23,6 +23,7 @@ enum CMMessageId_e
_CMGetCurrentRoom = 117;
_CMEnterObserver = 118;
_CMLeaveObserver = 119;
_CMSwitchTeam = 120;
}
enum SMMessageId_e
@ -45,6 +46,7 @@ enum SMMessageId_e
_SMGetCurrentRoom = 117;
_SMEnterObserver = 118;
_SMLeaveObserver = 119;
_SMSwitchTeam = 120;
_SMRoomMemberChangeNotify = 1001;
_SMRoomKickoutNotify = 1002;

View File

@ -140,7 +140,7 @@ message MFCurrentRoom
optional int32 team_max_num = 7; //
optional int32 player_max_num = 8; //
optional int32 my_team_id = 9; //id
optional MFTeam observer_team = 10; //
repeated MFTeam observer_team_list = 10; //
optional MFMember owner = 20; //
@ -228,6 +228,7 @@ message CMJoinRoom
optional string team_uuid = 5; //id
optional string team_info = 6; // json:{}
optional string room_id = 10; //
optional int32 is_observer = 11; //
}
message SMJoinRoom
@ -368,7 +369,7 @@ message SMRoomGameStartNotify
optional int32 map_id = 5; //id
}
//
//-
message CMEnterObserver
{
@ -380,7 +381,7 @@ message SMEnterObserver
optional string errmsg = 2; //
}
//
//-
message CMLeaveObserver
{
@ -391,3 +392,16 @@ message SMLeaveObserver
optional int32 errcode = 1; //
optional string errmsg = 2; //
}
///-
message CMSwitchTeam
{
optional int32 team_id = 1; //id
optional int32 type = 2; //0: 1:
}
message SMSwitchTeam
{
optional int32 errcode = 1; //
optional string errmsg = 2; //
}

View File

@ -214,7 +214,7 @@ func (this *room) fillMFCurrentRoom(hum common.Player, pb *cs.MFCurrentRoom, obs
if observerTeam != nil && observerTeam.room != nil {
pbT2 := &cs.MFTeam{}
observerTeam.fillMFTeam(pbT2)
pb.ObserverTeam = pbT2
q5.AppendSlice(&pb.ObserverTeamList, pbT2)
}
}
@ -452,7 +452,10 @@ func (this *room) genGameStartNotifyMsg() {
AccountId string `json:"account_id"`
} `json:"members"`
} `json:"team_list"`
}{
ObList []struct {
AccountId string `json:"account_id"`
} `json:"ob_list"`
} {
ZoneId: this.config.zoneId,
NodeId: this.config.nodeId,
RoomUuid: q5.ToString(this.roomIdx),