From c5ca9066236c4958683d9035ec998cdd3237ff2c Mon Sep 17 00:00:00 2001 From: NorthLan <6995syu@163.com> Date: Thu, 13 Oct 2022 22:08:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=B6=85=E7=BA=A7?= =?UTF-8?q?=E6=8C=87=E4=BB=A4=EF=BC=8C=E6=8E=A7=E5=88=B6=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E9=87=8D=E5=BC=80=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/live_logic/zhgmang_handler.go | 5 + game/pb/game/zhgmang/Command.cs | 296 ++++++++++++++++++++++++--- game/pb/game/zhgmang/command.pb.go | 316 ++++++++++++++++++----------- game/pb/game/zhgmang/command.proto | 6 + game/pb/routes.go | 1 + 5 files changed, 477 insertions(+), 147 deletions(-) diff --git a/game/live_logic/zhgmang_handler.go b/game/live_logic/zhgmang_handler.go index eb10c97..f8b83e7 100644 --- a/game/live_logic/zhgmang_handler.go +++ b/game/live_logic/zhgmang_handler.go @@ -210,6 +210,11 @@ func (h *ZhgmangGameLogic) handleMockGift(liveRoom *LiveRoom, _ string, content h.randomAddon(room, user, int(count)) case "hb": h.redPackAddon(room, user, int(count)) + case "重开": + room.Broadcast(pb.PushZhgmangGameOver, &pbGameZhgMang.GameOver{ + User: user, + Team: int32(count), + }) default: h.goldSpeedUp(room, user, float64(count)) } diff --git a/game/pb/game/zhgmang/Command.cs b/game/pb/game/zhgmang/Command.cs index 3821ee6..f17b216 100644 --- a/game/pb/game/zhgmang/Command.cs +++ b/game/pb/game/zhgmang/Command.cs @@ -25,24 +25,27 @@ namespace Pb.Game.Zhgmang { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "ChpnYW1lL3poZ21hbmcvY29tbWFuZC5wcm90bxIPcGIuZ2FtZS56aGdtYW5n", - "GhNjb21tb24vY29tbW9uLnByb3RvIkIKCEpvaW5HYW1lEh8KBHVzZXIYASAB", - "KAsyES5wYi5jb21tb24uUGJVc2VyEhUKDW5vYmlsaXR5TGV2ZWwYAiABKAUi", - "OAoHQWRkVW5pdBIfCgR1c2VyGAEgASgLMhEucGIuY29tbW9uLlBiVXNlchIM", - "CgRjYXJkGAIgASgFIioKB0xldmVsVXASHwoEdXNlchgBIAEoCzIRLnBiLmNv", - "bW1vbi5QYlVzZXIiOgoHU3BlZWRVcBIfCgR1c2VyGAEgASgLMhEucGIuY29t", - "bW9uLlBiVXNlchIOCgZzZWNvbmQYAiABKAUiLgoLQ2xlYXJTY3JlZW4SHwoE", - "dXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXIiJgoDR291Eh8KBHVzZXIY", - "ASABKAsyES5wYi5jb21tb24uUGJVc2VyIiYKA1J1YRIfCgR1c2VyGAEgASgL", - "MhEucGIuY29tbW9uLlBiVXNlciIuCgtSYW5kb21BZGRvbhIfCgR1c2VyGAEg", - "ASgLMhEucGIuY29tbW9uLlBiVXNlciIvCgxSZWRQYWNrQWRkb24SHwoEdXNl", - "chgBIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXIiJgoDV2FpEh8KBHVzZXIYASAB", - "KAsyES5wYi5jb21tb24uUGJVc2VyImoKDFVzZXJRdWVyeU1zZxIfCgR1c2Vy", - "GAEgASgLMhEucGIuY29tbW9uLlBiVXNlcho5CghSYW5rSXRlbRIQCghyYW5r", - "VHlwZRgBIAEoBRINCgVzY29yZRgCIAEoAxIMCgRyYW5rGAMgASgFQihaJmRj", - "Zy9nYW1lL3BiL2dhbWUvemhnbWFuZztwYkdhbWVaaGdNYW5nYgZwcm90bzM=")); + "GhNjb21tb24vY29tbW9uLnByb3RvIjkKCEdhbWVPdmVyEh8KBHVzZXIYASAB", + "KAsyES5wYi5jb21tb24uUGJVc2VyEgwKBHRlYW0YAiABKAUiQgoISm9pbkdh", + "bWUSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXISFQoNbm9iaWxp", + "dHlMZXZlbBgCIAEoBSI4CgdBZGRVbml0Eh8KBHVzZXIYASABKAsyES5wYi5j", + "b21tb24uUGJVc2VyEgwKBGNhcmQYAiABKAUiKgoHTGV2ZWxVcBIfCgR1c2Vy", + "GAEgASgLMhEucGIuY29tbW9uLlBiVXNlciI6CgdTcGVlZFVwEh8KBHVzZXIY", + "ASABKAsyES5wYi5jb21tb24uUGJVc2VyEg4KBnNlY29uZBgCIAEoBSIuCgtD", + "bGVhclNjcmVlbhIfCgR1c2VyGAEgASgLMhEucGIuY29tbW9uLlBiVXNlciIm", + "CgNHb3USHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXIiJgoDUnVh", + "Eh8KBHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyIi4KC1JhbmRvbUFk", + "ZG9uEh8KBHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyIi8KDFJlZFBh", + "Y2tBZGRvbhIfCgR1c2VyGAEgASgLMhEucGIuY29tbW9uLlBiVXNlciImCgNX", + "YWkSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXIiagoMVXNlclF1", + "ZXJ5TXNnEh8KBHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyGjkKCFJh", + "bmtJdGVtEhAKCHJhbmtUeXBlGAEgASgFEg0KBXNjb3JlGAIgASgDEgwKBHJh", + "bmsYAyABKAVCKFomZGNnL2dhbWUvcGIvZ2FtZS96aGdtYW5nO3BiR2FtZVpo", + "Z01hbmdiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Pb.Common.CommonReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgmang.GameOver), global::Pb.Game.Zhgmang.GameOver.Parser, new[]{ "User", "Team" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgmang.JoinGame), global::Pb.Game.Zhgmang.JoinGame.Parser, new[]{ "User", "NobilityLevel" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgmang.AddUnit), global::Pb.Game.Zhgmang.AddUnit.Parser, new[]{ "User", "Card" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgmang.LevelUp), global::Pb.Game.Zhgmang.LevelUp.Parser, new[]{ "User" }, null, null, null, null), @@ -60,6 +63,247 @@ namespace Pb.Game.Zhgmang { } #region Messages + /// + /// 强制游戏结束 + /// + public sealed partial class GameOver : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GameOver()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GameOver() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GameOver(GameOver other) : this() { + user_ = other.user_ != null ? other.user_.Clone() : null; + team_ = other.team_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GameOver Clone() { + return new GameOver(this); + } + + /// Field number for the "user" field. + public const int UserFieldNumber = 1; + private global::Pb.Common.PbUser user_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Pb.Common.PbUser User { + get { return user_; } + set { + user_ = value; + } + } + + /// Field number for the "team" field. + public const int TeamFieldNumber = 2; + private int team_; + /// + /// 哪边赢? + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Team { + get { return team_; } + set { + team_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GameOver); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GameOver other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(User, other.User)) return false; + if (Team != other.Team) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (user_ != null) hash ^= User.GetHashCode(); + if (Team != 0) hash ^= Team.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (user_ != null) { + output.WriteRawTag(10); + output.WriteMessage(User); + } + if (Team != 0) { + output.WriteRawTag(16); + output.WriteInt32(Team); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (user_ != null) { + output.WriteRawTag(10); + output.WriteMessage(User); + } + if (Team != 0) { + output.WriteRawTag(16); + output.WriteInt32(Team); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (user_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); + } + if (Team != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Team); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GameOver other) { + if (other == null) { + return; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); + } + if (other.Team != 0) { + Team = other.Team; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); + break; + } + case 16: { + Team = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); + break; + } + case 16: { + Team = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + /// /// 加入游戏(指令j) push -> game.join /// @@ -77,7 +321,7 @@ namespace Pb.Game.Zhgmang { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[0]; } + get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -318,7 +562,7 @@ namespace Pb.Game.Zhgmang { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[1]; } + get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[2]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -559,7 +803,7 @@ namespace Pb.Game.Zhgmang { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[2]; } + get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[3]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -760,7 +1004,7 @@ namespace Pb.Game.Zhgmang { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[3]; } + get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[4]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1001,7 +1245,7 @@ namespace Pb.Game.Zhgmang { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[4]; } + get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[5]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1202,7 +1446,7 @@ namespace Pb.Game.Zhgmang { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[5]; } + get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[6]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1403,7 +1647,7 @@ namespace Pb.Game.Zhgmang { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[6]; } + get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[7]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1604,7 +1848,7 @@ namespace Pb.Game.Zhgmang { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[7]; } + get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[8]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1805,7 +2049,7 @@ namespace Pb.Game.Zhgmang { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[8]; } + get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[9]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2006,7 +2250,7 @@ namespace Pb.Game.Zhgmang { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[9]; } + get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[10]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2207,7 +2451,7 @@ namespace Pb.Game.Zhgmang { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[10]; } + get { return global::Pb.Game.Zhgmang.CommandReflection.Descriptor.MessageTypes[11]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] diff --git a/game/pb/game/zhgmang/command.pb.go b/game/pb/game/zhgmang/command.pb.go index f3e008c..b486023 100644 --- a/game/pb/game/zhgmang/command.pb.go +++ b/game/pb/game/zhgmang/command.pb.go @@ -21,6 +21,62 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// 强制游戏结束 +type GameOver struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + Team int32 `protobuf:"varint,2,opt,name=team,proto3" json:"team,omitempty"` // 哪边赢? +} + +func (x *GameOver) Reset() { + *x = GameOver{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhgmang_command_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GameOver) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GameOver) ProtoMessage() {} + +func (x *GameOver) ProtoReflect() protoreflect.Message { + mi := &file_game_zhgmang_command_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GameOver.ProtoReflect.Descriptor instead. +func (*GameOver) Descriptor() ([]byte, []int) { + return file_game_zhgmang_command_proto_rawDescGZIP(), []int{0} +} + +func (x *GameOver) GetUser() *common.PbUser { + if x != nil { + return x.User + } + return nil +} + +func (x *GameOver) GetTeam() int32 { + if x != nil { + return x.Team + } + return 0 +} + // 加入游戏(指令j) push -> game.join type JoinGame struct { state protoimpl.MessageState @@ -34,7 +90,7 @@ type JoinGame struct { func (x *JoinGame) Reset() { *x = JoinGame{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhgmang_command_proto_msgTypes[0] + mi := &file_game_zhgmang_command_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +103,7 @@ func (x *JoinGame) String() string { func (*JoinGame) ProtoMessage() {} func (x *JoinGame) ProtoReflect() protoreflect.Message { - mi := &file_game_zhgmang_command_proto_msgTypes[0] + mi := &file_game_zhgmang_command_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +116,7 @@ func (x *JoinGame) ProtoReflect() protoreflect.Message { // Deprecated: Use JoinGame.ProtoReflect.Descriptor instead. func (*JoinGame) Descriptor() ([]byte, []int) { - return file_game_zhgmang_command_proto_rawDescGZIP(), []int{0} + return file_game_zhgmang_command_proto_rawDescGZIP(), []int{1} } func (x *JoinGame) GetUser() *common.PbUser { @@ -90,7 +146,7 @@ type AddUnit struct { func (x *AddUnit) Reset() { *x = AddUnit{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhgmang_command_proto_msgTypes[1] + mi := &file_game_zhgmang_command_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -103,7 +159,7 @@ func (x *AddUnit) String() string { func (*AddUnit) ProtoMessage() {} func (x *AddUnit) ProtoReflect() protoreflect.Message { - mi := &file_game_zhgmang_command_proto_msgTypes[1] + mi := &file_game_zhgmang_command_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -116,7 +172,7 @@ func (x *AddUnit) ProtoReflect() protoreflect.Message { // Deprecated: Use AddUnit.ProtoReflect.Descriptor instead. func (*AddUnit) Descriptor() ([]byte, []int) { - return file_game_zhgmang_command_proto_rawDescGZIP(), []int{1} + return file_game_zhgmang_command_proto_rawDescGZIP(), []int{2} } func (x *AddUnit) GetUser() *common.PbUser { @@ -145,7 +201,7 @@ type LevelUp struct { func (x *LevelUp) Reset() { *x = LevelUp{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhgmang_command_proto_msgTypes[2] + mi := &file_game_zhgmang_command_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -158,7 +214,7 @@ func (x *LevelUp) String() string { func (*LevelUp) ProtoMessage() {} func (x *LevelUp) ProtoReflect() protoreflect.Message { - mi := &file_game_zhgmang_command_proto_msgTypes[2] + mi := &file_game_zhgmang_command_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -171,7 +227,7 @@ func (x *LevelUp) ProtoReflect() protoreflect.Message { // Deprecated: Use LevelUp.ProtoReflect.Descriptor instead. func (*LevelUp) Descriptor() ([]byte, []int) { - return file_game_zhgmang_command_proto_rawDescGZIP(), []int{2} + return file_game_zhgmang_command_proto_rawDescGZIP(), []int{3} } func (x *LevelUp) GetUser() *common.PbUser { @@ -194,7 +250,7 @@ type SpeedUp struct { func (x *SpeedUp) Reset() { *x = SpeedUp{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhgmang_command_proto_msgTypes[3] + mi := &file_game_zhgmang_command_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -207,7 +263,7 @@ func (x *SpeedUp) String() string { func (*SpeedUp) ProtoMessage() {} func (x *SpeedUp) ProtoReflect() protoreflect.Message { - mi := &file_game_zhgmang_command_proto_msgTypes[3] + mi := &file_game_zhgmang_command_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -220,7 +276,7 @@ func (x *SpeedUp) ProtoReflect() protoreflect.Message { // Deprecated: Use SpeedUp.ProtoReflect.Descriptor instead. func (*SpeedUp) Descriptor() ([]byte, []int) { - return file_game_zhgmang_command_proto_rawDescGZIP(), []int{3} + return file_game_zhgmang_command_proto_rawDescGZIP(), []int{4} } func (x *SpeedUp) GetUser() *common.PbUser { @@ -249,7 +305,7 @@ type ClearScreen struct { func (x *ClearScreen) Reset() { *x = ClearScreen{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhgmang_command_proto_msgTypes[4] + mi := &file_game_zhgmang_command_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -262,7 +318,7 @@ func (x *ClearScreen) String() string { func (*ClearScreen) ProtoMessage() {} func (x *ClearScreen) ProtoReflect() protoreflect.Message { - mi := &file_game_zhgmang_command_proto_msgTypes[4] + mi := &file_game_zhgmang_command_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -275,7 +331,7 @@ func (x *ClearScreen) ProtoReflect() protoreflect.Message { // Deprecated: Use ClearScreen.ProtoReflect.Descriptor instead. func (*ClearScreen) Descriptor() ([]byte, []int) { - return file_game_zhgmang_command_proto_rawDescGZIP(), []int{4} + return file_game_zhgmang_command_proto_rawDescGZIP(), []int{5} } func (x *ClearScreen) GetUser() *common.PbUser { @@ -297,7 +353,7 @@ type Gou struct { func (x *Gou) Reset() { *x = Gou{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhgmang_command_proto_msgTypes[5] + mi := &file_game_zhgmang_command_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -310,7 +366,7 @@ func (x *Gou) String() string { func (*Gou) ProtoMessage() {} func (x *Gou) ProtoReflect() protoreflect.Message { - mi := &file_game_zhgmang_command_proto_msgTypes[5] + mi := &file_game_zhgmang_command_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -323,7 +379,7 @@ func (x *Gou) ProtoReflect() protoreflect.Message { // Deprecated: Use Gou.ProtoReflect.Descriptor instead. func (*Gou) Descriptor() ([]byte, []int) { - return file_game_zhgmang_command_proto_rawDescGZIP(), []int{5} + return file_game_zhgmang_command_proto_rawDescGZIP(), []int{6} } func (x *Gou) GetUser() *common.PbUser { @@ -345,7 +401,7 @@ type Rua struct { func (x *Rua) Reset() { *x = Rua{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhgmang_command_proto_msgTypes[6] + mi := &file_game_zhgmang_command_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -358,7 +414,7 @@ func (x *Rua) String() string { func (*Rua) ProtoMessage() {} func (x *Rua) ProtoReflect() protoreflect.Message { - mi := &file_game_zhgmang_command_proto_msgTypes[6] + mi := &file_game_zhgmang_command_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -371,7 +427,7 @@ func (x *Rua) ProtoReflect() protoreflect.Message { // Deprecated: Use Rua.ProtoReflect.Descriptor instead. func (*Rua) Descriptor() ([]byte, []int) { - return file_game_zhgmang_command_proto_rawDescGZIP(), []int{6} + return file_game_zhgmang_command_proto_rawDescGZIP(), []int{7} } func (x *Rua) GetUser() *common.PbUser { @@ -393,7 +449,7 @@ type RandomAddon struct { func (x *RandomAddon) Reset() { *x = RandomAddon{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhgmang_command_proto_msgTypes[7] + mi := &file_game_zhgmang_command_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -406,7 +462,7 @@ func (x *RandomAddon) String() string { func (*RandomAddon) ProtoMessage() {} func (x *RandomAddon) ProtoReflect() protoreflect.Message { - mi := &file_game_zhgmang_command_proto_msgTypes[7] + mi := &file_game_zhgmang_command_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -419,7 +475,7 @@ func (x *RandomAddon) ProtoReflect() protoreflect.Message { // Deprecated: Use RandomAddon.ProtoReflect.Descriptor instead. func (*RandomAddon) Descriptor() ([]byte, []int) { - return file_game_zhgmang_command_proto_rawDescGZIP(), []int{7} + return file_game_zhgmang_command_proto_rawDescGZIP(), []int{8} } func (x *RandomAddon) GetUser() *common.PbUser { @@ -441,7 +497,7 @@ type RedPackAddon struct { func (x *RedPackAddon) Reset() { *x = RedPackAddon{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhgmang_command_proto_msgTypes[8] + mi := &file_game_zhgmang_command_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -454,7 +510,7 @@ func (x *RedPackAddon) String() string { func (*RedPackAddon) ProtoMessage() {} func (x *RedPackAddon) ProtoReflect() protoreflect.Message { - mi := &file_game_zhgmang_command_proto_msgTypes[8] + mi := &file_game_zhgmang_command_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -467,7 +523,7 @@ func (x *RedPackAddon) ProtoReflect() protoreflect.Message { // Deprecated: Use RedPackAddon.ProtoReflect.Descriptor instead. func (*RedPackAddon) Descriptor() ([]byte, []int) { - return file_game_zhgmang_command_proto_rawDescGZIP(), []int{8} + return file_game_zhgmang_command_proto_rawDescGZIP(), []int{9} } func (x *RedPackAddon) GetUser() *common.PbUser { @@ -489,7 +545,7 @@ type Wai struct { func (x *Wai) Reset() { *x = Wai{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhgmang_command_proto_msgTypes[9] + mi := &file_game_zhgmang_command_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -502,7 +558,7 @@ func (x *Wai) String() string { func (*Wai) ProtoMessage() {} func (x *Wai) ProtoReflect() protoreflect.Message { - mi := &file_game_zhgmang_command_proto_msgTypes[9] + mi := &file_game_zhgmang_command_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -515,7 +571,7 @@ func (x *Wai) ProtoReflect() protoreflect.Message { // Deprecated: Use Wai.ProtoReflect.Descriptor instead. func (*Wai) Descriptor() ([]byte, []int) { - return file_game_zhgmang_command_proto_rawDescGZIP(), []int{9} + return file_game_zhgmang_command_proto_rawDescGZIP(), []int{10} } func (x *Wai) GetUser() *common.PbUser { @@ -537,7 +593,7 @@ type UserQueryMsg struct { func (x *UserQueryMsg) Reset() { *x = UserQueryMsg{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhgmang_command_proto_msgTypes[10] + mi := &file_game_zhgmang_command_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -550,7 +606,7 @@ func (x *UserQueryMsg) String() string { func (*UserQueryMsg) ProtoMessage() {} func (x *UserQueryMsg) ProtoReflect() protoreflect.Message { - mi := &file_game_zhgmang_command_proto_msgTypes[10] + mi := &file_game_zhgmang_command_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -563,7 +619,7 @@ func (x *UserQueryMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use UserQueryMsg.ProtoReflect.Descriptor instead. func (*UserQueryMsg) Descriptor() ([]byte, []int) { - return file_game_zhgmang_command_proto_rawDescGZIP(), []int{10} + return file_game_zhgmang_command_proto_rawDescGZIP(), []int{11} } func (x *UserQueryMsg) GetUser() *common.PbUser { @@ -587,7 +643,7 @@ type UserQueryMsg_RankItem struct { func (x *UserQueryMsg_RankItem) Reset() { *x = UserQueryMsg_RankItem{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhgmang_command_proto_msgTypes[11] + mi := &file_game_zhgmang_command_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -600,7 +656,7 @@ func (x *UserQueryMsg_RankItem) String() string { func (*UserQueryMsg_RankItem) ProtoMessage() {} func (x *UserQueryMsg_RankItem) ProtoReflect() protoreflect.Message { - mi := &file_game_zhgmang_command_proto_msgTypes[11] + mi := &file_game_zhgmang_command_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -613,7 +669,7 @@ func (x *UserQueryMsg_RankItem) ProtoReflect() protoreflect.Message { // Deprecated: Use UserQueryMsg_RankItem.ProtoReflect.Descriptor instead. func (*UserQueryMsg_RankItem) Descriptor() ([]byte, []int) { - return file_game_zhgmang_command_proto_rawDescGZIP(), []int{10, 0} + return file_game_zhgmang_command_proto_rawDescGZIP(), []int{11, 0} } func (x *UserQueryMsg_RankItem) GetRankType() int32 { @@ -644,55 +700,59 @@ var file_game_zhgmang_command_proto_rawDesc = []byte{ 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x6d, 0x61, 0x6e, 0x67, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x08, 0x4a, 0x6f, 0x69, 0x6e, 0x47, 0x61, 0x6d, 0x65, 0x12, 0x25, - 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6e, 0x6f, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x44, 0x0a, 0x07, 0x41, - 0x64, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x12, 0x0a, - 0x04, 0x63, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x61, 0x72, - 0x64, 0x22, 0x30, 0x0a, 0x07, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x55, 0x70, 0x12, 0x25, 0x0a, 0x04, - 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x22, 0x48, 0x0a, 0x07, 0x53, 0x70, 0x65, 0x65, 0x64, 0x55, 0x70, 0x12, 0x25, + 0x74, 0x6f, 0x22, 0x45, 0x0a, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x34, 0x0a, - 0x0b, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x12, 0x25, 0x0a, 0x04, + 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x57, 0x0a, 0x08, 0x4a, 0x6f, 0x69, + 0x6e, 0x47, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, + 0x6e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x22, 0x44, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x25, 0x0a, + 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, + 0x75, 0x73, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x04, 0x63, 0x61, 0x72, 0x64, 0x22, 0x30, 0x0a, 0x07, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x55, 0x70, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x48, 0x0a, 0x07, 0x53, 0x70, + 0x65, 0x65, 0x64, 0x55, 0x70, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x34, 0x0a, 0x0b, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x53, 0x63, 0x72, + 0x65, 0x65, 0x6e, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x2c, 0x0a, 0x03, 0x47, 0x6f, + 0x75, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x2c, 0x0a, 0x03, 0x52, 0x75, 0x61, 0x12, + 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x34, 0x0a, 0x0b, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, + 0x41, 0x64, 0x64, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x35, 0x0a, 0x0c, + 0x52, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x41, 0x64, 0x64, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x22, 0x2c, 0x0a, 0x03, 0x47, 0x6f, 0x75, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, + 0x73, 0x65, 0x72, 0x22, 0x2c, 0x0a, 0x03, 0x57, 0x61, 0x69, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, - 0x72, 0x22, 0x2c, 0x0a, 0x03, 0x52, 0x75, 0x61, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, - 0x34, 0x0a, 0x0b, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x6f, 0x6e, 0x12, 0x25, - 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x35, 0x0a, 0x0c, 0x52, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, - 0x41, 0x64, 0x64, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x2c, 0x0a, 0x03, - 0x57, 0x61, 0x69, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x87, 0x01, 0x0a, 0x0c, 0x55, - 0x73, 0x65, 0x72, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, - 0x65, 0x72, 0x1a, 0x50, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1a, - 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, - 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, - 0x72, 0x61, 0x6e, 0x6b, 0x42, 0x28, 0x5a, 0x26, 0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, - 0x2f, 0x70, 0x62, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x7a, 0x68, 0x67, 0x6d, 0x61, 0x6e, 0x67, - 0x3b, 0x70, 0x62, 0x47, 0x61, 0x6d, 0x65, 0x5a, 0x68, 0x67, 0x4d, 0x61, 0x6e, 0x67, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x22, 0x87, 0x01, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, + 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x1a, 0x50, 0x0a, 0x08, 0x52, 0x61, 0x6e, + 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x42, 0x28, 0x5a, 0x26, 0x64, + 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, + 0x7a, 0x68, 0x67, 0x6d, 0x61, 0x6e, 0x67, 0x3b, 0x70, 0x62, 0x47, 0x61, 0x6d, 0x65, 0x5a, 0x68, + 0x67, 0x4d, 0x61, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -707,39 +767,41 @@ func file_game_zhgmang_command_proto_rawDescGZIP() []byte { return file_game_zhgmang_command_proto_rawDescData } -var file_game_zhgmang_command_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_game_zhgmang_command_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_game_zhgmang_command_proto_goTypes = []interface{}{ - (*JoinGame)(nil), // 0: pb.game.zhgmang.JoinGame - (*AddUnit)(nil), // 1: pb.game.zhgmang.AddUnit - (*LevelUp)(nil), // 2: pb.game.zhgmang.LevelUp - (*SpeedUp)(nil), // 3: pb.game.zhgmang.SpeedUp - (*ClearScreen)(nil), // 4: pb.game.zhgmang.ClearScreen - (*Gou)(nil), // 5: pb.game.zhgmang.Gou - (*Rua)(nil), // 6: pb.game.zhgmang.Rua - (*RandomAddon)(nil), // 7: pb.game.zhgmang.RandomAddon - (*RedPackAddon)(nil), // 8: pb.game.zhgmang.RedPackAddon - (*Wai)(nil), // 9: pb.game.zhgmang.Wai - (*UserQueryMsg)(nil), // 10: pb.game.zhgmang.UserQueryMsg - (*UserQueryMsg_RankItem)(nil), // 11: pb.game.zhgmang.UserQueryMsg.RankItem - (*common.PbUser)(nil), // 12: pb.common.PbUser + (*GameOver)(nil), // 0: pb.game.zhgmang.GameOver + (*JoinGame)(nil), // 1: pb.game.zhgmang.JoinGame + (*AddUnit)(nil), // 2: pb.game.zhgmang.AddUnit + (*LevelUp)(nil), // 3: pb.game.zhgmang.LevelUp + (*SpeedUp)(nil), // 4: pb.game.zhgmang.SpeedUp + (*ClearScreen)(nil), // 5: pb.game.zhgmang.ClearScreen + (*Gou)(nil), // 6: pb.game.zhgmang.Gou + (*Rua)(nil), // 7: pb.game.zhgmang.Rua + (*RandomAddon)(nil), // 8: pb.game.zhgmang.RandomAddon + (*RedPackAddon)(nil), // 9: pb.game.zhgmang.RedPackAddon + (*Wai)(nil), // 10: pb.game.zhgmang.Wai + (*UserQueryMsg)(nil), // 11: pb.game.zhgmang.UserQueryMsg + (*UserQueryMsg_RankItem)(nil), // 12: pb.game.zhgmang.UserQueryMsg.RankItem + (*common.PbUser)(nil), // 13: pb.common.PbUser } var file_game_zhgmang_command_proto_depIdxs = []int32{ - 12, // 0: pb.game.zhgmang.JoinGame.user:type_name -> pb.common.PbUser - 12, // 1: pb.game.zhgmang.AddUnit.user:type_name -> pb.common.PbUser - 12, // 2: pb.game.zhgmang.LevelUp.user:type_name -> pb.common.PbUser - 12, // 3: pb.game.zhgmang.SpeedUp.user:type_name -> pb.common.PbUser - 12, // 4: pb.game.zhgmang.ClearScreen.user:type_name -> pb.common.PbUser - 12, // 5: pb.game.zhgmang.Gou.user:type_name -> pb.common.PbUser - 12, // 6: pb.game.zhgmang.Rua.user:type_name -> pb.common.PbUser - 12, // 7: pb.game.zhgmang.RandomAddon.user:type_name -> pb.common.PbUser - 12, // 8: pb.game.zhgmang.RedPackAddon.user:type_name -> pb.common.PbUser - 12, // 9: pb.game.zhgmang.Wai.user:type_name -> pb.common.PbUser - 12, // 10: pb.game.zhgmang.UserQueryMsg.user:type_name -> pb.common.PbUser - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 13, // 0: pb.game.zhgmang.GameOver.user:type_name -> pb.common.PbUser + 13, // 1: pb.game.zhgmang.JoinGame.user:type_name -> pb.common.PbUser + 13, // 2: pb.game.zhgmang.AddUnit.user:type_name -> pb.common.PbUser + 13, // 3: pb.game.zhgmang.LevelUp.user:type_name -> pb.common.PbUser + 13, // 4: pb.game.zhgmang.SpeedUp.user:type_name -> pb.common.PbUser + 13, // 5: pb.game.zhgmang.ClearScreen.user:type_name -> pb.common.PbUser + 13, // 6: pb.game.zhgmang.Gou.user:type_name -> pb.common.PbUser + 13, // 7: pb.game.zhgmang.Rua.user:type_name -> pb.common.PbUser + 13, // 8: pb.game.zhgmang.RandomAddon.user:type_name -> pb.common.PbUser + 13, // 9: pb.game.zhgmang.RedPackAddon.user:type_name -> pb.common.PbUser + 13, // 10: pb.game.zhgmang.Wai.user:type_name -> pb.common.PbUser + 13, // 11: pb.game.zhgmang.UserQueryMsg.user:type_name -> pb.common.PbUser + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_game_zhgmang_command_proto_init() } @@ -749,7 +811,7 @@ func file_game_zhgmang_command_proto_init() { } if !protoimpl.UnsafeEnabled { file_game_zhgmang_command_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JoinGame); i { + switch v := v.(*GameOver); i { case 0: return &v.state case 1: @@ -761,7 +823,7 @@ func file_game_zhgmang_command_proto_init() { } } file_game_zhgmang_command_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddUnit); i { + switch v := v.(*JoinGame); i { case 0: return &v.state case 1: @@ -773,7 +835,7 @@ func file_game_zhgmang_command_proto_init() { } } file_game_zhgmang_command_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LevelUp); i { + switch v := v.(*AddUnit); i { case 0: return &v.state case 1: @@ -785,7 +847,7 @@ func file_game_zhgmang_command_proto_init() { } } file_game_zhgmang_command_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SpeedUp); i { + switch v := v.(*LevelUp); i { case 0: return &v.state case 1: @@ -797,7 +859,7 @@ func file_game_zhgmang_command_proto_init() { } } file_game_zhgmang_command_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClearScreen); i { + switch v := v.(*SpeedUp); i { case 0: return &v.state case 1: @@ -809,7 +871,7 @@ func file_game_zhgmang_command_proto_init() { } } file_game_zhgmang_command_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Gou); i { + switch v := v.(*ClearScreen); i { case 0: return &v.state case 1: @@ -821,7 +883,7 @@ func file_game_zhgmang_command_proto_init() { } } file_game_zhgmang_command_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Rua); i { + switch v := v.(*Gou); i { case 0: return &v.state case 1: @@ -833,7 +895,7 @@ func file_game_zhgmang_command_proto_init() { } } file_game_zhgmang_command_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RandomAddon); i { + switch v := v.(*Rua); i { case 0: return &v.state case 1: @@ -845,7 +907,7 @@ func file_game_zhgmang_command_proto_init() { } } file_game_zhgmang_command_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RedPackAddon); i { + switch v := v.(*RandomAddon); i { case 0: return &v.state case 1: @@ -857,7 +919,7 @@ func file_game_zhgmang_command_proto_init() { } } file_game_zhgmang_command_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Wai); i { + switch v := v.(*RedPackAddon); i { case 0: return &v.state case 1: @@ -869,7 +931,7 @@ func file_game_zhgmang_command_proto_init() { } } file_game_zhgmang_command_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserQueryMsg); i { + switch v := v.(*Wai); i { case 0: return &v.state case 1: @@ -881,6 +943,18 @@ func file_game_zhgmang_command_proto_init() { } } file_game_zhgmang_command_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserQueryMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_zhgmang_command_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserQueryMsg_RankItem); i { case 0: return &v.state @@ -899,7 +973,7 @@ func file_game_zhgmang_command_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_game_zhgmang_command_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/game/pb/game/zhgmang/command.proto b/game/pb/game/zhgmang/command.proto index 68c4bd0..9bde12d 100644 --- a/game/pb/game/zhgmang/command.proto +++ b/game/pb/game/zhgmang/command.proto @@ -6,6 +6,12 @@ import "common/common.proto"; option go_package = "dcg/game/pb/game/zhgmang;pbGameZhgMang"; +// 强制游戏结束 +message GameOver { + pb.common.PbUser user = 1; + int32 team = 2; // 哪边赢? +} + // 加入游戏(指令j) push -> game.join message JoinGame{ pb.common.PbUser user = 1; diff --git a/game/pb/routes.go b/game/pb/routes.go index add1fec..63412bd 100644 --- a/game/pb/routes.go +++ b/game/pb/routes.go @@ -64,6 +64,7 @@ const ( PushZhgmangWai = "game.w" PushZhgmangGou = "game.gou" PushZhgmangRua = "game.rua" + PushZhgmangGameOver = "game.gg" PushZhgmangLevelUp = "game.levelUp" PushZhgmangGoldSpeedUp = "game.goldSpeedUp"