diff --git a/gameServer/demo/FightHandler.cs b/gameServer/demo/FightHandler.cs index 0e851cd..720bbf8 100644 --- a/gameServer/demo/FightHandler.cs +++ b/gameServer/demo/FightHandler.cs @@ -228,6 +228,19 @@ public override IMessage OnRoomDetail(ByteString msg) { Logger.Info("player userId={0}", player.UserID); } + foreach (BrigadeInfo brigade in roomDetail.Brigades) + { + Logger.Info("brigade brigadeId={0}", brigade.BrigadeID); + foreach (TeamDetail team in brigade.Teams) + { + Logger.Info("team teamId={0}, password={1}, capacity={2}, mode={3}, visibility={4}, owner={5}", + team.TeamInfo.TeamID, team.TeamInfo.Password, team.TeamInfo.Capacity, team.TeamInfo.Mode, team.TeamInfo.Visibility, team.TeamInfo.Owner); + foreach (PlayerInfo player in team.Player) + { + Logger.Info("player userId={0}", player.UserID); + } + } + } return reply; } diff --git a/gameServer/proto/Gsmvs.cs b/gameServer/proto/Gsmvs.cs index 713df1e..80575f4 100644 --- a/gameServer/proto/Gsmvs.cs +++ b/gameServer/proto/Gsmvs.cs @@ -40,40 +40,46 @@ static GsmvsReflection() { "KAwiTAoQR2V0Um9vbURldGFpbFJlcRIOCgZnYW1lSUQYASABKA0SDgoGcm9v", "bUlEGAIgASgEEhgKEGxhdGVzdFdhdGNoZXJOdW0YAyABKA0iTwoQR2V0Um9v", "bURldGFpbFJzcBIaCgZzdGF0dXMYASABKA4yCi5FcnJvckNvZGUSHwoKcm9v", - "bURldGFpbBgCIAEoCzILLlJvb21EZXRhaWwi2AEKClJvb21EZXRhaWwSDgoG", + "bURldGFpbBgCIAEoCzILLlJvb21EZXRhaWwi+AEKClJvb21EZXRhaWwSDgoG", "cm9vbUlEGAEgASgEEg0KBXN0YXRlGAIgASgNEhEKCW1heFBsYXllchgDIAEo", "DRIMCgRtb2RlGAQgASgFEhAKCGNhbldhdGNoGAUgASgFEhQKDHJvb21Qcm9w", "ZXJ0eRgGIAEoDBINCgVvd25lchgHIAEoDRISCgpjcmVhdGVGbGFnGAggASgN", "EiAKC3BsYXllckluZm9zGAkgAygLMgsuUGxheWVySW5mbxIdCgl3YXRjaFJv", - "b20YCiABKAsyCi5XYXRjaFJvb20iMQoKUGxheWVySW5mbxIOCgZ1c2VySUQY", - "ASABKA0SEwoLdXNlclByb2ZpbGUYAiABKAwixAEKDUNyZWF0ZUV4dEluZm8S", - "DgoGdXNlcklEGAEgASgNEhMKC3VzZXJQcm9maWxlGAIgASgMEg4KBnJvb21J", - "RBgDIAEoBBINCgVzdGF0ZRgEIAEoDRIRCgltYXhQbGF5ZXIYBSABKA0SDAoE", - "bW9kZRgGIAEoBRIQCghjYW5XYXRjaBgHIAEoBRIUCgxyb29tUHJvcGVydHkY", - "CCABKAwSEgoKY3JlYXRlRmxhZxgJIAEoDRISCgpDcmVhdGVUaW1lGAogASgE", - "IlQKC0pvaW5FeHRJbmZvEg4KBnVzZXJJRBgBIAEoDRITCgt1c2VyUHJvZmls", - "ZRgCIAEoDBIOCgZyb29tSUQYAyABKAQSEAoISm9pblR5cGUYBCABKA0iWgoS", - "U2V0Um9vbVByb3BlcnR5UmVxEg4KBmdhbWVJRBgBIAEoDRIOCgZyb29tSUQY", - "AiABKAQSDgoGdXNlcklEGAMgASgNEhQKDHJvb21Qcm9wZXJ0eRgEIAEoDCJm", - "ChJTZXRSb29tUHJvcGVydHlSc3ASGgoGc3RhdHVzGAEgASgOMgouRXJyb3JD", - "b2RlEg4KBnJvb21JRBgCIAEoBBIOCgZ1c2VySUQYAyABKA0SFAoMcm9vbVBy", - "b3BlcnR5GAQgASgMImUKCVdhdGNoSW5mbxISCgZyb29tSUQYASABKARCAjAB", - "Eg0KBXN0YXRlGAIgASgNEiMKDHdhdGNoU2V0dGluZxgDIAEoCzINLldhdGNo", - "U2V0dGluZxIQCghjdXJXYXRjaBgEIAEoDSJNCglXYXRjaFJvb20SHQoJd2F0", - "Y2hJbmZvGAEgASgLMgouV2F0Y2hJbmZvEiEKDHdhdGNoUGxheWVycxgCIAMo", - "CzILLlBsYXllckluZm8q2wMKCk12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RCglicmlnYWRlSUQYASABKA0S", + "GgoFdGVhbXMYAiADKAsyCy5UZWFtRGV0YWlsKtsDCgpNdnNHc0NtZElEEg4K", + "Ck12c0NtZE5vbmUQABITCg5NdnNKb2luUm9vbVJlcRCxCRITCg5NdnNKb2lu", + "Um9vbVJzcBCyCRIVChBNdnNDcmVhdGVSb29tUmVxELMJEhUKEE12c0NyZWF0", + "ZVJvb21Sc3AQtAkSFAoPTXZzTGVhdmVSb29tUmVxELUJEhQKD012c0xlYXZl", + "Um9vbVJzcBC2CRIYChNNdnNHZXRSb29tRGV0YWlsUmVxELkJEhgKE012c0dl", + "dFJvb21EZXRhaWxSc3AQugkSGQoUTXZzR2V0Um9vbURldGFpbFB1c2gQuwkS", + "EwoOTXZzSm9pbk92ZXJSZXEQvQkSEwoOTXZzSm9pbk92ZXJSc3AQvgkSGgoV", + "TXZzU2V0Um9vbVByb3BlcnR5UmVxEMMJEhoKFU12c1NldFJvb21Qcm9wZXJ0", + "eVJzcBDECRITCg5NdnNKb2luT3BlblJlcRDFCRITCg5NdnNKb2luT3BlblJz", + "cBDGCRIVChBNdnNLaWNrUGxheWVyUmVxEJcKEhUKEE12c0tpY2tQbGF5ZXJS", + "c3AQmAoSFwoSTXZzTmV0d29ya1N0YXRlUmVxEOAIEhcKEk12c05ldHdvcmtT", + "dGF0ZVJzcBDhCCpFCglSb29tU3RhdGUSEAoMUm9vbVN0YXRlTmlsEAASEQoN", + "Um9vbVN0YXRlT3BlbhABEhMKD1Jvb21TdGF0ZUNsb3NlZBACYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::ErrorcodeReflection.Descriptor, global::CommonReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::MvsGsCmdID), typeof(global::RoomState), }, new pbr::GeneratedClrTypeInfo[] { @@ -88,14 +94,17 @@ static GsmvsReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::PushMsg), global::PushMsg.Parser, new[]{ "UserID", "GameID", "RoomID", "Users", "CpProto" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::GetRoomDetailReq), global::GetRoomDetailReq.Parser, new[]{ "GameID", "RoomID", "LatestWatcherNum" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::GetRoomDetailRsp), global::GetRoomDetailRsp.Parser, new[]{ "Status", "RoomDetail" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::RoomDetail), global::RoomDetail.Parser, new[]{ "RoomID", "State", "MaxPlayer", "Mode", "CanWatch", "RoomProperty", "Owner", "CreateFlag", "PlayerInfos", "WatchRoom" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::RoomDetail), global::RoomDetail.Parser, new[]{ "RoomID", "State", "MaxPlayer", "Mode", "CanWatch", "RoomProperty", "Owner", "CreateFlag", "PlayerInfos", "WatchRoom", "Brigades" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::PlayerInfo), global::PlayerInfo.Parser, new[]{ "UserID", "UserProfile" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::CreateExtInfo), global::CreateExtInfo.Parser, new[]{ "UserID", "UserProfile", "RoomID", "State", "MaxPlayer", "Mode", "CanWatch", "RoomProperty", "CreateFlag", "CreateTime" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::JoinExtInfo), global::JoinExtInfo.Parser, new[]{ "UserID", "UserProfile", "RoomID", "JoinType" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::SetRoomPropertyReq), global::SetRoomPropertyReq.Parser, new[]{ "GameID", "RoomID", "UserID", "RoomProperty" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::SetRoomPropertyRsp), global::SetRoomPropertyRsp.Parser, new[]{ "Status", "RoomID", "UserID", "RoomProperty" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::WatchInfo), global::WatchInfo.Parser, new[]{ "RoomID", "State", "WatchSetting", "CurWatch" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::WatchRoom), global::WatchRoom.Parser, new[]{ "WatchInfo", "WatchPlayers" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::WatchRoom), global::WatchRoom.Parser, new[]{ "WatchInfo", "WatchPlayers" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::TeamInfo), global::TeamInfo.Parser, new[]{ "TeamID", "Password", "Capacity", "Mode", "Visibility", "Owner" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::TeamDetail), global::TeamDetail.Parser, new[]{ "TeamInfo", "Player" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BrigadeInfo), global::BrigadeInfo.Parser, new[]{ "BrigadeID", "Teams" }, null, null, null) })); } #endregion @@ -2295,6 +2304,7 @@ public RoomDetail(RoomDetail other) : this() { createFlag_ = other.createFlag_; playerInfos_ = other.playerInfos_.Clone(); WatchRoom = other.watchRoom_ != null ? other.WatchRoom.Clone() : null; + brigades_ = other.brigades_.Clone(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2417,6 +2427,16 @@ public uint CreateFlag { } } + /// Field number for the "brigades" field. + public const int BrigadesFieldNumber = 11; + private static readonly pb::FieldCodec _repeated_brigades_codec + = pb::FieldCodec.ForMessage(90, global::BrigadeInfo.Parser); + private readonly pbc::RepeatedField brigades_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Brigades { + get { return brigades_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as RoomDetail); @@ -2440,6 +2460,7 @@ public bool Equals(RoomDetail other) { if (CreateFlag != other.CreateFlag) return false; if(!playerInfos_.Equals(other.playerInfos_)) return false; if (!object.Equals(WatchRoom, other.WatchRoom)) return false; + if(!brigades_.Equals(other.brigades_)) return false; return true; } @@ -2456,6 +2477,7 @@ public override int GetHashCode() { if (CreateFlag != 0) hash ^= CreateFlag.GetHashCode(); hash ^= playerInfos_.GetHashCode(); if (watchRoom_ != null) hash ^= WatchRoom.GetHashCode(); + hash ^= brigades_.GetHashCode(); return hash; } @@ -2503,6 +2525,7 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(82); output.WriteMessage(WatchRoom); } + brigades_.WriteTo(output, _repeated_brigades_codec); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2536,6 +2559,7 @@ public int CalculateSize() { if (watchRoom_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(WatchRoom); } + size += brigades_.CalculateSize(_repeated_brigades_codec); return size; } @@ -2575,6 +2599,7 @@ public void MergeFrom(RoomDetail other) { } WatchRoom.MergeFrom(other.WatchRoom); } + brigades_.Add(other.brigades_); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2628,6 +2653,10 @@ public void MergeFrom(pb::CodedInputStream input) { input.ReadMessage(watchRoom_); break; } + case 90: { + brigades_.AddEntriesFrom(input, _repeated_brigades_codec); + break; + } } } } @@ -4157,6 +4186,564 @@ public void MergeFrom(pb::CodedInputStream input) { } +/// +//////////////////////////// 组队匹配相关的协议 start /////////////////////////// +/// +public sealed partial class TeamInfo : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TeamInfo()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::GsmvsReflection.Descriptor.MessageTypes[19]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TeamInfo() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TeamInfo(TeamInfo other) : this() { + teamID_ = other.teamID_; + password_ = other.password_; + capacity_ = other.capacity_; + mode_ = other.mode_; + visibility_ = other.visibility_; + owner_ = other.owner_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TeamInfo Clone() { + return new TeamInfo(this); + } + + /// Field number for the "teamID" field. + public const int TeamIDFieldNumber = 1; + private ulong teamID_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ulong TeamID { + get { return teamID_; } + set { + teamID_ = value; + } + } + + /// Field number for the "password" field. + public const int PasswordFieldNumber = 2; + private string password_ = ""; + /// + /// 密码,空表示无密码 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Password { + get { return password_; } + set { + password_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "capacity" field. + public const int CapacityFieldNumber = 3; + private uint capacity_; + /// + /// 队伍人数 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Capacity { + get { return capacity_; } + set { + capacity_ = value; + } + } + + /// Field number for the "mode" field. + public const int ModeFieldNumber = 4; + private int mode_; + /// + /// 游戏模式 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Mode { + get { return mode_; } + set { + mode_ = value; + } + } + + /// Field number for the "visibility" field. + public const int VisibilityFieldNumber = 5; + private int visibility_; + /// + /// 是否可见,0不可见、1可见 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Visibility { + get { return visibility_; } + set { + visibility_ = value; + } + } + + /// Field number for the "owner" field. + public const int OwnerFieldNumber = 6; + private uint owner_; + /// + /// 队长 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Owner { + get { return owner_; } + set { + owner_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as TeamInfo); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(TeamInfo other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TeamID != other.TeamID) return false; + if (Password != other.Password) return false; + if (Capacity != other.Capacity) return false; + if (Mode != other.Mode) return false; + if (Visibility != other.Visibility) return false; + if (Owner != other.Owner) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (TeamID != 0UL) hash ^= TeamID.GetHashCode(); + if (Password.Length != 0) hash ^= Password.GetHashCode(); + if (Capacity != 0) hash ^= Capacity.GetHashCode(); + if (Mode != 0) hash ^= Mode.GetHashCode(); + if (Visibility != 0) hash ^= Visibility.GetHashCode(); + if (Owner != 0) hash ^= Owner.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (TeamID != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(TeamID); + } + if (Password.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Password); + } + if (Capacity != 0) { + output.WriteRawTag(24); + output.WriteUInt32(Capacity); + } + if (Mode != 0) { + output.WriteRawTag(32); + output.WriteInt32(Mode); + } + if (Visibility != 0) { + output.WriteRawTag(40); + output.WriteInt32(Visibility); + } + if (Owner != 0) { + output.WriteRawTag(48); + output.WriteUInt32(Owner); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (TeamID != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(TeamID); + } + if (Password.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Password); + } + if (Capacity != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Capacity); + } + if (Mode != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Mode); + } + if (Visibility != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Visibility); + } + if (Owner != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Owner); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(TeamInfo other) { + if (other == null) { + return; + } + if (other.TeamID != 0UL) { + TeamID = other.TeamID; + } + if (other.Password.Length != 0) { + Password = other.Password; + } + if (other.Capacity != 0) { + Capacity = other.Capacity; + } + if (other.Mode != 0) { + Mode = other.Mode; + } + if (other.Visibility != 0) { + Visibility = other.Visibility; + } + if (other.Owner != 0) { + Owner = other.Owner; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 8: { + TeamID = input.ReadUInt64(); + break; + } + case 18: { + Password = input.ReadString(); + break; + } + case 24: { + Capacity = input.ReadUInt32(); + break; + } + case 32: { + Mode = input.ReadInt32(); + break; + } + case 40: { + Visibility = input.ReadInt32(); + break; + } + case 48: { + Owner = input.ReadUInt32(); + break; + } + } + } + } + +} + +public sealed partial class TeamDetail : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TeamDetail()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::GsmvsReflection.Descriptor.MessageTypes[20]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TeamDetail() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TeamDetail(TeamDetail other) : this() { + TeamInfo = other.teamInfo_ != null ? other.TeamInfo.Clone() : null; + player_ = other.player_.Clone(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TeamDetail Clone() { + return new TeamDetail(this); + } + + /// Field number for the "teamInfo" field. + public const int TeamInfoFieldNumber = 1; + private global::TeamInfo teamInfo_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::TeamInfo TeamInfo { + get { return teamInfo_; } + set { + teamInfo_ = value; + } + } + + /// Field number for the "player" field. + public const int PlayerFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_player_codec + = pb::FieldCodec.ForMessage(18, global::PlayerInfo.Parser); + private readonly pbc::RepeatedField player_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Player { + get { return player_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as TeamDetail); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(TeamDetail other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(TeamInfo, other.TeamInfo)) return false; + if(!player_.Equals(other.player_)) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (teamInfo_ != null) hash ^= TeamInfo.GetHashCode(); + hash ^= player_.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (teamInfo_ != null) { + output.WriteRawTag(10); + output.WriteMessage(TeamInfo); + } + player_.WriteTo(output, _repeated_player_codec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (teamInfo_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(TeamInfo); + } + size += player_.CalculateSize(_repeated_player_codec); + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(TeamDetail other) { + if (other == null) { + return; + } + if (other.teamInfo_ != null) { + if (teamInfo_ == null) { + teamInfo_ = new global::TeamInfo(); + } + TeamInfo.MergeFrom(other.TeamInfo); + } + player_.Add(other.player_); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 10: { + if (teamInfo_ == null) { + teamInfo_ = new global::TeamInfo(); + } + input.ReadMessage(teamInfo_); + break; + } + case 18: { + player_.AddEntriesFrom(input, _repeated_player_codec); + break; + } + } + } + } + +} + +/// +/// 大队 +/// +public sealed partial class BrigadeInfo : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BrigadeInfo()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::GsmvsReflection.Descriptor.MessageTypes[21]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BrigadeInfo() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BrigadeInfo(BrigadeInfo other) : this() { + brigadeID_ = other.brigadeID_; + teams_ = other.teams_.Clone(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BrigadeInfo Clone() { + return new BrigadeInfo(this); + } + + /// Field number for the "brigadeID" field. + public const int BrigadeIDFieldNumber = 1; + private uint brigadeID_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint BrigadeID { + get { return brigadeID_; } + set { + brigadeID_ = value; + } + } + + /// Field number for the "teams" field. + public const int TeamsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_teams_codec + = pb::FieldCodec.ForMessage(18, global::TeamDetail.Parser); + private readonly pbc::RepeatedField teams_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Teams { + get { return teams_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as BrigadeInfo); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(BrigadeInfo other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (BrigadeID != other.BrigadeID) return false; + if(!teams_.Equals(other.teams_)) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (BrigadeID != 0) hash ^= BrigadeID.GetHashCode(); + hash ^= teams_.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (BrigadeID != 0) { + output.WriteRawTag(8); + output.WriteUInt32(BrigadeID); + } + teams_.WriteTo(output, _repeated_teams_codec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (BrigadeID != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(BrigadeID); + } + size += teams_.CalculateSize(_repeated_teams_codec); + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(BrigadeInfo other) { + if (other == null) { + return; + } + if (other.BrigadeID != 0) { + BrigadeID = other.BrigadeID; + } + teams_.Add(other.teams_); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 8: { + BrigadeID = input.ReadUInt32(); + break; + } + case 18: { + teams_.AddEntriesFrom(input, _repeated_teams_codec); + break; + } + } + } + } + +} + #endregion