diff --git a/config/Config.go b/config/Config.go index 8224cf9..8b4296d 100644 --- a/config/Config.go +++ b/config/Config.go @@ -17,11 +17,6 @@ type ( ConsumerGroup string } - Game struct { - // Commands 命令列表 - Commands []string - } - config struct { // Log 日志配置 Log struct { @@ -47,13 +42,57 @@ type ( } // Zhg 指挥官PvP模式 Zhg struct { - Commands []string + Commands []string // 指令集 OutbreakCount int64 // 每次暴兵数量 OutbreakBaseCost int64 // 默认每次暴兵消耗积分(不限兵种) OutbreakCostDict map[int]int64 // 暴兵消耗积分表 } - Zhghz Game // 指挥官海战模式 - Zhgfb Game // 指挥官副本模式 + // Zhghz 指挥官海战模式 + Zhghz struct { + Commands []string + } + // Zhgfb 指挥官副本模式 + Zhgfb struct { + Commands []string + } + // Zhgzd 指挥官阵地模式 + Zhgzd struct { + Commands []string // 指令集 + + // CommandUnitDict 命令单位ID字典 + CommandUnitDict map[string]string + + // CommandCostDict 命令战略点消耗 + CommandCostDict map[string]struct { + Common int32 // 通用消耗 + Units map[string]int32 // 单位消耗 + } + + // 战略暴兵数量(兵种相关) + DispatchCountDict map[string]int32 + + // 礼物效果配置 + GiftEffect struct { + // StrategicMaximal 战略点上限配置 + StrategicMaximal struct { + GiftIds []int64 // 对应礼物ID列表 + Addon int32 // 增加上限值 + Limit int32 // 次数限制 + } + // StrategicRecover 战略点回复速度 + StrategicRecover struct { + GiftIds []int64 // 对应礼物ID + Addon int32 // 增加速度值 x每秒 + Duration int32 // 持续时间 秒 + Limit int32 // 次数限制 + } + // SupportSkill + SupportSkill []struct { + GiftIds []int64 // 对应礼物ID列表 (每次匹配一个) + SkillIds []string // 技能ID列表 + } + } + } } // RPC diff --git a/game/live_logic/zhgzd_handler.go b/game/live_logic/zhgzd_handler.go new file mode 100644 index 0000000..a27cbca --- /dev/null +++ b/game/live_logic/zhgzd_handler.go @@ -0,0 +1,221 @@ +package live_logic + +import ( + "dcg/config" + "dcg/game/manager" + pbCommon "dcg/game/pb/common" + pbGameZhgzd "dcg/game/pb/game/zhgzd" + pbMq "dcg/game/pb/mq" + pbRoom "dcg/game/pb/room" + "dcg/game/svc" + "dcg/pkg/cmd" + "math/rand" + "time" +) + +type ZhgzdGameLogic struct { + svcCtx *svc.ServiceContext + *LiveGameLogic +} + +func NewZhgzdLiveGameLogic(svcCtx *svc.ServiceContext) *LiveGameLogic { + resp := &ZhgzdGameLogic{ + svcCtx: svcCtx, + LiveGameLogic: NewLiveGameLogic(pbRoom.GameType_ZHGZD, cmd.NewCMDParser(false, config.Config.Game.Zhgzd.Commands...)), + } + resp.RegisterCMDHandler(resp.handleJoinGame, "j", "加入", "加入游戏") + resp.RegisterCMDHandler(resp.handleDispatch, "s1", "s2", "s3", "s4") + resp.RegisterCMDHandler(resp.handleChangeUnit, "c1", "c2", "c3", "c4") + resp.RegisterCMDHandler(resp.handleOutbreak, "s") + resp.RegisterCMDHandler(resp.handlePosition, "p0", "p1", "p2", "p3", "p4", "p5") + resp.RegisterCMDHandler(resp.handleWhere, "w", "我在哪") + resp.RegisterCMDHandler(resp.handleMode, "r1", "r2", "r3", "r4") + // gift + resp.RegisterGiftHandler(resp.handleGift) + return resp.LiveGameLogic +} + +func (h *ZhgzdGameLogic) handleJoinGame(roomId int64, _ string, user *pbCommon.PbUser) { + room, err := manager.GameManager.RoomByLiveRoomId(roomId) + if err != nil { + return + } + + room.Broadcast("game.join", &pbGameZhgzd.JoinGame{User: user}) +} + +func (h *ZhgzdGameLogic) handleDispatch(roomId int64, cmd string, user *pbCommon.PbUser) { + room, err := manager.GameManager.RoomByLiveRoomId(roomId) + if err != nil { + return + } + cmdRune := []rune(cmd) + if len(cmdRune) < 2 { + return + } + cmdType := string(cmdRune[0]) + unitType := string(cmdRune[1]) + + cfg := config.Config.Game.Zhgzd + unitId := cfg.CommandUnitDict[unitType] + count := cfg.DispatchCountDict[unitType] + var costSp int32 + if costCfg, ok := cfg.CommandCostDict[cmdType]; ok { + costSp = costCfg.Units[unitType] + } + + room.Broadcast("game.unit.dispatch", &pbGameZhgzd.DispatchUnit{ + User: user, + CostSp: costSp, + Id: unitId, + Count: count, + }) +} + +func (h *ZhgzdGameLogic) handleChangeUnit(roomId int64, cmd string, user *pbCommon.PbUser) { + room, err := manager.GameManager.RoomByLiveRoomId(roomId) + if err != nil { + return + } + cmdRune := []rune(cmd) + if len(cmdRune) < 2 { + return + } + cmdType := string(cmdRune[0]) + unitType := string(cmdRune[1]) + + cfg := config.Config.Game.Zhgzd + unitId := cfg.CommandUnitDict[unitType] + var costSp int32 + if costCfg, ok := cfg.CommandCostDict[cmdType]; ok { + costSp = costCfg.Common + } + + room.Broadcast("game.unit.change", &pbGameZhgzd.ChangeUnit{ + User: user, + CostSp: costSp, + Id: unitId, + }) +} + +func (h *ZhgzdGameLogic) handleOutbreak(roomId int64, cmd string, user *pbCommon.PbUser) { + room, err := manager.GameManager.RoomByLiveRoomId(roomId) + if err != nil { + return + } + cmdRune := []rune(cmd) + if len(cmdRune) < 1 { + return + } + cmdType := string(cmdRune[0]) + + cfg := config.Config.Game.Zhgzd + var costSp int32 + if costCfg, ok := cfg.CommandCostDict[cmdType]; ok { + costSp = costCfg.Common + } + + room.Broadcast("game.outbreak", &pbGameZhgzd.Outbreak{ + User: user, + CostSp: costSp, + }) +} + +func (h *ZhgzdGameLogic) handlePosition(roomId int64, cmd string, user *pbCommon.PbUser) { + room, err := manager.GameManager.RoomByLiveRoomId(roomId) + if err != nil { + return + } + + if len(cmd) < 2 { + return + } + pos := cmd[1] + + room.Broadcast("game.pos", &pbGameZhgzd.Position{ + User: user, + Position: string(pos), + }) +} + +func (h *ZhgzdGameLogic) handleWhere(roomId int64, _ string, user *pbCommon.PbUser) { + room, err := manager.GameManager.RoomByLiveRoomId(roomId) + if err != nil { + return + } + room.Broadcast("game.where", &pbGameZhgzd.Where{User: user}) +} + +func (h *ZhgzdGameLogic) handleMode(roomId int64, cmd string, user *pbCommon.PbUser) { + room, err := manager.GameManager.RoomByLiveRoomId(roomId) + if err != nil { + return + } + cmdRune := []rune(cmd) + if len(cmdRune) < 1 { + return + } + cmdType := string(cmdRune[0]) + + cfg := config.Config.Game.Zhgzd + var costSp int32 + if costCfg, ok := cfg.CommandCostDict[cmdType]; ok { + costSp = costCfg.Common + } + + room.Broadcast("game.mode", &pbGameZhgzd.PlayerMode{ + User: user, + Mode: string(cmdRune[1]), + CostSp: costSp, + }) +} + +func (h *ZhgzdGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) { + room, err := manager.GameManager.RoomByLiveRoomId(roomId) + if err != nil { + return + } + cfg := config.Config.Game.Zhgzd.GiftEffect + + // 战略点回复速度 + for _, id := range cfg.StrategicRecover.GiftIds { + if gift.GiftId == id { + room.Broadcast("game.sp", &pbGameZhgzd.StrategicPoint{ + User: user, + AddSpeed: cfg.StrategicRecover.Addon, + AddSpeedDuration: cfg.StrategicRecover.Duration, + }) + break + } + } + + // 战略点上限 + for _, id := range cfg.StrategicMaximal.GiftIds { + if gift.GiftId == id { + room.Broadcast("game.sp", &pbGameZhgzd.StrategicPoint{ + User: user, + AddLimit: cfg.StrategicMaximal.Addon, + }) + break + } + } + + // 支援技能 + for _, sCfg := range cfg.SupportSkill { + for _, id := range sCfg.GiftIds { + if gift.GiftId == id && len(sCfg.SkillIds) > 0 { + // skill 随机 + tmpSkill := sCfg.SkillIds[0] + if len(sCfg.SkillIds) > 1 { + rand.Seed(time.Now().UnixNano()) + tmpSkill = sCfg.SkillIds[rand.Intn(len(sCfg.SkillIds))] + } + room.Broadcast("game.support", &pbGameZhgzd.SupportSkill{ + User: user, + Id: tmpSkill, + }) + break + } + } + } +} diff --git a/game/pb/game/zhgzd/Command.cs b/game/pb/game/zhgzd/Command.cs new file mode 100644 index 0000000..9c31ad9 --- /dev/null +++ b/game/pb/game/zhgzd/Command.cs @@ -0,0 +1,2435 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: command.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Pb.Game.Zhgzd { + + /// Holder for reflection information generated from command.proto + public static partial class CommandReflection { + + #region Descriptor + /// File descriptor for command.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static CommandReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cg1jb21tYW5kLnByb3RvEg1wYi5nYW1lLnpoZ3pkGhNjb21tb24vY29tbW9u", + "LnByb3RvIisKCEpvaW5HYW1lEh8KBHVzZXIYASABKAsyES5wYi5jb21tb24u", + "UGJVc2VyIloKDERpc3BhdGNoVW5pdBIfCgR1c2VyGAEgASgLMhEucGIuY29t", + "bW9uLlBiVXNlchIOCgZjb3N0U3AYAiABKAUSCgoCaWQYAyABKAkSDQoFY291", + "bnQYBCABKAUiSQoKQ2hhbmdlVW5pdBIfCgR1c2VyGAEgASgLMhEucGIuY29t", + "bW9uLlBiVXNlchIOCgZjb3N0U3AYAiABKAUSCgoCaWQYAyABKAkiOwoIT3V0", + "YnJlYWsSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXISDgoGY29z", + "dFNwGAIgASgFIk0KCFBvc2l0aW9uEh8KBHVzZXIYASABKAsyES5wYi5jb21t", + "b24uUGJVc2VyEg4KBmNvc3RTcBgCIAEoBRIQCghwb3NpdGlvbhgDIAEoCSIo", + "CgVXaGVyZRIfCgR1c2VyGAEgASgLMhEucGIuY29tbW9uLlBiVXNlciJLCgpQ", + "bGF5ZXJNb2RlEh8KBHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyEg4K", + "BmNvc3RTcBgCIAEoBRIMCgRtb2RlGAMgASgJIm8KDlN0cmF0ZWdpY1BvaW50", + "Eh8KBHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyEhAKCGFkZExpbWl0", + "GAIgASgFEhAKCGFkZFNwZWVkGAMgASgFEhgKEGFkZFNwZWVkRHVyYXRpb24Y", + "BCABKAUiOwoMU3VwcG9ydFNraWxsEh8KBHVzZXIYASABKAsyES5wYi5jb21t", + "b24uUGJVc2VyEgoKAmlkGAIgASgJQiRaImRjZy9nYW1lL3BiL2dhbWUvemhn", + "emQ7cGJHYW1lWmhnemRiBnByb3RvMw==")); + 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.Zhgzd.JoinGame), global::Pb.Game.Zhgzd.JoinGame.Parser, new[]{ "User" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.DispatchUnit), global::Pb.Game.Zhgzd.DispatchUnit.Parser, new[]{ "User", "CostSp", "Id", "Count" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.ChangeUnit), global::Pb.Game.Zhgzd.ChangeUnit.Parser, new[]{ "User", "CostSp", "Id" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.Outbreak), global::Pb.Game.Zhgzd.Outbreak.Parser, new[]{ "User", "CostSp" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.Position), global::Pb.Game.Zhgzd.Position.Parser, new[]{ "User", "CostSp", "Position_" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.Where), global::Pb.Game.Zhgzd.Where.Parser, new[]{ "User" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.PlayerMode), global::Pb.Game.Zhgzd.PlayerMode.Parser, new[]{ "User", "CostSp", "Mode" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.StrategicPoint), global::Pb.Game.Zhgzd.StrategicPoint.Parser, new[]{ "User", "AddLimit", "AddSpeed", "AddSpeedDuration" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.SupportSkill), global::Pb.Game.Zhgzd.SupportSkill.Parser, new[]{ "User", "Id" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// 加入游戏 push -> game.join -> j + /// + public sealed partial class JoinGame : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new JoinGame()); + 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.Zhgzd.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 JoinGame() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JoinGame(JoinGame other) : this() { + user_ = other.user_ != null ? other.user_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JoinGame Clone() { + return new JoinGame(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; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as JoinGame); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(JoinGame other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(User, other.User)) 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 (_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 (_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 (_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 (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(JoinGame other) { + if (other == null) { + return; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); + } + _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; + } + } + } + #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; + } + } + } + } + #endif + + } + + /// + /// 战略出兵 push -> game.unit.dispatch -> s1/s2/s3/s4 + /// + public sealed partial class DispatchUnit : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DispatchUnit()); + 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.Zhgzd.CommandReflection.Descriptor.MessageTypes[1]; } + } + + [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 DispatchUnit() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DispatchUnit(DispatchUnit other) : this() { + user_ = other.user_ != null ? other.user_.Clone() : null; + costSp_ = other.costSp_; + id_ = other.id_; + count_ = other.count_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DispatchUnit Clone() { + return new DispatchUnit(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 "costSp" field. + public const int CostSpFieldNumber = 2; + private int costSp_; + /// + /// 消耗战略点量 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CostSp { + get { return costSp_; } + set { + costSp_ = value; + } + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 3; + private string id_ = ""; + /// + /// 0001-步兵,0004-骑兵,0003-弓箭手,0006-法师 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Id { + get { return id_; } + set { + id_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "count" field. + public const int CountFieldNumber = 4; + private int count_; + /// + /// 出兵数量 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Count { + get { return count_; } + set { + count_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DispatchUnit); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DispatchUnit other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(User, other.User)) return false; + if (CostSp != other.CostSp) return false; + if (Id != other.Id) return false; + if (Count != other.Count) 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 (CostSp != 0) hash ^= CostSp.GetHashCode(); + if (Id.Length != 0) hash ^= Id.GetHashCode(); + if (Count != 0) hash ^= Count.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 (CostSp != 0) { + output.WriteRawTag(16); + output.WriteInt32(CostSp); + } + if (Id.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Id); + } + if (Count != 0) { + output.WriteRawTag(32); + output.WriteInt32(Count); + } + 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 (CostSp != 0) { + output.WriteRawTag(16); + output.WriteInt32(CostSp); + } + if (Id.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Id); + } + if (Count != 0) { + output.WriteRawTag(32); + output.WriteInt32(Count); + } + 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 (CostSp != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(CostSp); + } + if (Id.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Id); + } + if (Count != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Count); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DispatchUnit other) { + if (other == null) { + return; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); + } + if (other.CostSp != 0) { + CostSp = other.CostSp; + } + if (other.Id.Length != 0) { + Id = other.Id; + } + if (other.Count != 0) { + Count = other.Count; + } + _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: { + CostSp = input.ReadInt32(); + break; + } + case 26: { + Id = input.ReadString(); + break; + } + case 32: { + Count = 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: { + CostSp = input.ReadInt32(); + break; + } + case 26: { + Id = input.ReadString(); + break; + } + case 32: { + Count = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + /// + /// 修改当前兵种 push -> game.unit.change -> c1/c2/c3/c4 + /// + public sealed partial class ChangeUnit : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeUnit()); + 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.Zhgzd.CommandReflection.Descriptor.MessageTypes[2]; } + } + + [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 ChangeUnit() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeUnit(ChangeUnit other) : this() { + user_ = other.user_ != null ? other.user_.Clone() : null; + costSp_ = other.costSp_; + id_ = other.id_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeUnit Clone() { + return new ChangeUnit(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 "costSp" field. + public const int CostSpFieldNumber = 2; + private int costSp_; + /// + /// 消耗战略点量 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CostSp { + get { return costSp_; } + set { + costSp_ = value; + } + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 3; + private string id_ = ""; + /// + /// 0001-步兵,0004-骑兵,0003-弓箭手,0006-法师 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Id { + get { return id_; } + set { + id_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ChangeUnit); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChangeUnit other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(User, other.User)) return false; + if (CostSp != other.CostSp) return false; + if (Id != other.Id) 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 (CostSp != 0) hash ^= CostSp.GetHashCode(); + if (Id.Length != 0) hash ^= Id.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 (CostSp != 0) { + output.WriteRawTag(16); + output.WriteInt32(CostSp); + } + if (Id.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Id); + } + 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 (CostSp != 0) { + output.WriteRawTag(16); + output.WriteInt32(CostSp); + } + if (Id.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Id); + } + 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 (CostSp != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(CostSp); + } + if (Id.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Id); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChangeUnit other) { + if (other == null) { + return; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); + } + if (other.CostSp != 0) { + CostSp = other.CostSp; + } + if (other.Id.Length != 0) { + Id = other.Id; + } + _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: { + CostSp = input.ReadInt32(); + break; + } + case 26: { + Id = input.ReadString(); + 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: { + CostSp = input.ReadInt32(); + break; + } + case 26: { + Id = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// 暴兵(征召模式) push -> game.outbreak -> s + /// + public sealed partial class Outbreak : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Outbreak()); + 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.Zhgzd.CommandReflection.Descriptor.MessageTypes[3]; } + } + + [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 Outbreak() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Outbreak(Outbreak other) : this() { + user_ = other.user_ != null ? other.user_.Clone() : null; + costSp_ = other.costSp_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Outbreak Clone() { + return new Outbreak(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 "costSp" field. + public const int CostSpFieldNumber = 2; + private int costSp_; + /// + /// 消耗战略点量 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CostSp { + get { return costSp_; } + set { + costSp_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Outbreak); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Outbreak other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(User, other.User)) return false; + if (CostSp != other.CostSp) 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 (CostSp != 0) hash ^= CostSp.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 (CostSp != 0) { + output.WriteRawTag(16); + output.WriteInt32(CostSp); + } + 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 (CostSp != 0) { + output.WriteRawTag(16); + output.WriteInt32(CostSp); + } + 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 (CostSp != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(CostSp); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Outbreak other) { + if (other == null) { + return; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); + } + if (other.CostSp != 0) { + CostSp = other.CostSp; + } + _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: { + CostSp = 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: { + CostSp = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + /// + /// 移动自己位置 push -> game.pos -> p1/p2/p3/p4/p5 + /// + public sealed partial class Position : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Position()); + 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.Zhgzd.CommandReflection.Descriptor.MessageTypes[4]; } + } + + [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 Position() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Position(Position other) : this() { + user_ = other.user_ != null ? other.user_.Clone() : null; + costSp_ = other.costSp_; + position_ = other.position_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Position Clone() { + return new Position(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 "costSp" field. + public const int CostSpFieldNumber = 2; + private int costSp_; + /// + /// 消耗战略点量 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CostSp { + get { return costSp_; } + set { + costSp_ = value; + } + } + + /// Field number for the "position" field. + public const int Position_FieldNumber = 3; + private string position_ = ""; + /// + /// 1-上兵营,2-中兵营,3-下兵营,4-上前哨战,5-下前哨战 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Position_ { + get { return position_; } + set { + position_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Position); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Position other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(User, other.User)) return false; + if (CostSp != other.CostSp) return false; + if (Position_ != other.Position_) 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 (CostSp != 0) hash ^= CostSp.GetHashCode(); + if (Position_.Length != 0) hash ^= Position_.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 (CostSp != 0) { + output.WriteRawTag(16); + output.WriteInt32(CostSp); + } + if (Position_.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Position_); + } + 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 (CostSp != 0) { + output.WriteRawTag(16); + output.WriteInt32(CostSp); + } + if (Position_.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Position_); + } + 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 (CostSp != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(CostSp); + } + if (Position_.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Position_); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Position other) { + if (other == null) { + return; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); + } + if (other.CostSp != 0) { + CostSp = other.CostSp; + } + if (other.Position_.Length != 0) { + Position_ = other.Position_; + } + _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: { + CostSp = input.ReadInt32(); + break; + } + case 26: { + Position_ = input.ReadString(); + 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: { + CostSp = input.ReadInt32(); + break; + } + case 26: { + Position_ = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// 查询位置 push -> game.where -> w + /// + public sealed partial class Where : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Where()); + 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.Zhgzd.CommandReflection.Descriptor.MessageTypes[5]; } + } + + [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 Where() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Where(Where other) : this() { + user_ = other.user_ != null ? other.user_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Where Clone() { + return new Where(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; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Where); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Where other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(User, other.User)) 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 (_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 (_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 (_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 (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Where other) { + if (other == null) { + return; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); + } + _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; + } + } + } + #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; + } + } + } + } + #endif + + } + + /// + /// 玩家模式 push -> game.mode -> r1/r2/r3/r4 + /// + public sealed partial class PlayerMode : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PlayerMode()); + 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.Zhgzd.CommandReflection.Descriptor.MessageTypes[6]; } + } + + [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 PlayerMode() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PlayerMode(PlayerMode other) : this() { + user_ = other.user_ != null ? other.user_.Clone() : null; + costSp_ = other.costSp_; + mode_ = other.mode_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PlayerMode Clone() { + return new PlayerMode(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 "costSp" field. + public const int CostSpFieldNumber = 2; + private int costSp_; + /// + /// 消耗战略点量 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CostSp { + get { return costSp_; } + set { + costSp_ = value; + } + } + + /// Field number for the "mode" field. + public const int ModeFieldNumber = 3; + private string mode_ = ""; + /// + /// 模式 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Mode { + get { return mode_; } + set { + mode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PlayerMode); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PlayerMode other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(User, other.User)) return false; + if (CostSp != other.CostSp) return false; + if (Mode != other.Mode) 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 (CostSp != 0) hash ^= CostSp.GetHashCode(); + if (Mode.Length != 0) hash ^= Mode.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 (CostSp != 0) { + output.WriteRawTag(16); + output.WriteInt32(CostSp); + } + if (Mode.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Mode); + } + 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 (CostSp != 0) { + output.WriteRawTag(16); + output.WriteInt32(CostSp); + } + if (Mode.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Mode); + } + 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 (CostSp != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(CostSp); + } + if (Mode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Mode); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PlayerMode other) { + if (other == null) { + return; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); + } + if (other.CostSp != 0) { + CostSp = other.CostSp; + } + if (other.Mode.Length != 0) { + Mode = other.Mode; + } + _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: { + CostSp = input.ReadInt32(); + break; + } + case 26: { + Mode = input.ReadString(); + 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: { + CostSp = input.ReadInt32(); + break; + } + case 26: { + Mode = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// 战略点调整 push -> game.sp -> 礼物效果 + /// + public sealed partial class StrategicPoint : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StrategicPoint()); + 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.Zhgzd.CommandReflection.Descriptor.MessageTypes[7]; } + } + + [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 StrategicPoint() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StrategicPoint(StrategicPoint other) : this() { + user_ = other.user_ != null ? other.user_.Clone() : null; + addLimit_ = other.addLimit_; + addSpeed_ = other.addSpeed_; + addSpeedDuration_ = other.addSpeedDuration_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StrategicPoint Clone() { + return new StrategicPoint(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 "addLimit" field. + public const int AddLimitFieldNumber = 2; + private int addLimit_; + /// + /// 提高上限N点 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int AddLimit { + get { return addLimit_; } + set { + addLimit_ = value; + } + } + + /// Field number for the "addSpeed" field. + public const int AddSpeedFieldNumber = 3; + private int addSpeed_; + /// + /// 提高每秒恢复速度 N(整数) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int AddSpeed { + get { return addSpeed_; } + set { + addSpeed_ = value; + } + } + + /// Field number for the "addSpeedDuration" field. + public const int AddSpeedDurationFieldNumber = 4; + private int addSpeedDuration_; + /// + /// 提高每秒恢复速度 (N秒) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int AddSpeedDuration { + get { return addSpeedDuration_; } + set { + addSpeedDuration_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as StrategicPoint); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(StrategicPoint other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(User, other.User)) return false; + if (AddLimit != other.AddLimit) return false; + if (AddSpeed != other.AddSpeed) return false; + if (AddSpeedDuration != other.AddSpeedDuration) 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 (AddLimit != 0) hash ^= AddLimit.GetHashCode(); + if (AddSpeed != 0) hash ^= AddSpeed.GetHashCode(); + if (AddSpeedDuration != 0) hash ^= AddSpeedDuration.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 (AddLimit != 0) { + output.WriteRawTag(16); + output.WriteInt32(AddLimit); + } + if (AddSpeed != 0) { + output.WriteRawTag(24); + output.WriteInt32(AddSpeed); + } + if (AddSpeedDuration != 0) { + output.WriteRawTag(32); + output.WriteInt32(AddSpeedDuration); + } + 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 (AddLimit != 0) { + output.WriteRawTag(16); + output.WriteInt32(AddLimit); + } + if (AddSpeed != 0) { + output.WriteRawTag(24); + output.WriteInt32(AddSpeed); + } + if (AddSpeedDuration != 0) { + output.WriteRawTag(32); + output.WriteInt32(AddSpeedDuration); + } + 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 (AddLimit != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(AddLimit); + } + if (AddSpeed != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(AddSpeed); + } + if (AddSpeedDuration != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(AddSpeedDuration); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(StrategicPoint other) { + if (other == null) { + return; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); + } + if (other.AddLimit != 0) { + AddLimit = other.AddLimit; + } + if (other.AddSpeed != 0) { + AddSpeed = other.AddSpeed; + } + if (other.AddSpeedDuration != 0) { + AddSpeedDuration = other.AddSpeedDuration; + } + _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: { + AddLimit = input.ReadInt32(); + break; + } + case 24: { + AddSpeed = input.ReadInt32(); + break; + } + case 32: { + AddSpeedDuration = 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: { + AddLimit = input.ReadInt32(); + break; + } + case 24: { + AddSpeed = input.ReadInt32(); + break; + } + case 32: { + AddSpeedDuration = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + /// + /// 支援技能 push -> game.support -> 礼物效果 + /// + public sealed partial class SupportSkill : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SupportSkill()); + 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.Zhgzd.CommandReflection.Descriptor.MessageTypes[8]; } + } + + [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 SupportSkill() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SupportSkill(SupportSkill other) : this() { + user_ = other.user_ != null ? other.user_.Clone() : null; + id_ = other.id_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SupportSkill Clone() { + return new SupportSkill(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 "id" field. + public const int IdFieldNumber = 2; + private string id_ = ""; + /// + /// 技能ID S0001/S0002/S0003/S0005 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Id { + get { return id_; } + set { + id_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SupportSkill); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SupportSkill other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(User, other.User)) return false; + if (Id != other.Id) 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 (Id.Length != 0) hash ^= Id.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 (Id.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Id); + } + 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 (Id.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Id); + } + 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 (Id.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Id); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SupportSkill other) { + if (other == null) { + return; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); + } + if (other.Id.Length != 0) { + Id = other.Id; + } + _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 18: { + Id = input.ReadString(); + 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 18: { + Id = input.ReadString(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/game/pb/game/zhgzd/command.pb.go b/game/pb/game/zhgzd/command.pb.go new file mode 100644 index 0000000..c76a07a --- /dev/null +++ b/game/pb/game/zhgzd/command.pb.go @@ -0,0 +1,806 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: game/zhgzd/command.proto + +package pbGameZhgzd + +import ( + common "dcg/game/pb/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// 加入游戏 push -> game.join -> j +type JoinGame struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` +} + +func (x *JoinGame) Reset() { + *x = JoinGame{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhgzd_command_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JoinGame) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JoinGame) ProtoMessage() {} + +func (x *JoinGame) ProtoReflect() protoreflect.Message { + mi := &file_game_zhgzd_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 JoinGame.ProtoReflect.Descriptor instead. +func (*JoinGame) Descriptor() ([]byte, []int) { + return file_game_zhgzd_command_proto_rawDescGZIP(), []int{0} +} + +func (x *JoinGame) GetUser() *common.PbUser { + if x != nil { + return x.User + } + return nil +} + +// 战略出兵 push -> game.unit.dispatch -> s1/s2/s3/s4 +type DispatchUnit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + CostSp int32 `protobuf:"varint,2,opt,name=costSp,proto3" json:"costSp,omitempty"` // 消耗战略点量 + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` // 0001-步兵,0004-骑兵,0003-弓箭手,0006-法师 + Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` // 出兵数量 +} + +func (x *DispatchUnit) Reset() { + *x = DispatchUnit{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhgzd_command_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DispatchUnit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DispatchUnit) ProtoMessage() {} + +func (x *DispatchUnit) ProtoReflect() protoreflect.Message { + mi := &file_game_zhgzd_command_proto_msgTypes[1] + 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 DispatchUnit.ProtoReflect.Descriptor instead. +func (*DispatchUnit) Descriptor() ([]byte, []int) { + return file_game_zhgzd_command_proto_rawDescGZIP(), []int{1} +} + +func (x *DispatchUnit) GetUser() *common.PbUser { + if x != nil { + return x.User + } + return nil +} + +func (x *DispatchUnit) GetCostSp() int32 { + if x != nil { + return x.CostSp + } + return 0 +} + +func (x *DispatchUnit) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DispatchUnit) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +// 修改当前兵种 push -> game.unit.change -> c1/c2/c3/c4 +type ChangeUnit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + CostSp int32 `protobuf:"varint,2,opt,name=costSp,proto3" json:"costSp,omitempty"` // 消耗战略点量 + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` // 0001-步兵,0004-骑兵,0003-弓箭手,0006-法师 +} + +func (x *ChangeUnit) Reset() { + *x = ChangeUnit{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhgzd_command_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangeUnit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeUnit) ProtoMessage() {} + +func (x *ChangeUnit) ProtoReflect() protoreflect.Message { + mi := &file_game_zhgzd_command_proto_msgTypes[2] + 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 ChangeUnit.ProtoReflect.Descriptor instead. +func (*ChangeUnit) Descriptor() ([]byte, []int) { + return file_game_zhgzd_command_proto_rawDescGZIP(), []int{2} +} + +func (x *ChangeUnit) GetUser() *common.PbUser { + if x != nil { + return x.User + } + return nil +} + +func (x *ChangeUnit) GetCostSp() int32 { + if x != nil { + return x.CostSp + } + return 0 +} + +func (x *ChangeUnit) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// 暴兵(征召模式) push -> game.outbreak -> s +type Outbreak struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + CostSp int32 `protobuf:"varint,2,opt,name=costSp,proto3" json:"costSp,omitempty"` // 消耗战略点量 +} + +func (x *Outbreak) Reset() { + *x = Outbreak{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhgzd_command_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Outbreak) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Outbreak) ProtoMessage() {} + +func (x *Outbreak) ProtoReflect() protoreflect.Message { + mi := &file_game_zhgzd_command_proto_msgTypes[3] + 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 Outbreak.ProtoReflect.Descriptor instead. +func (*Outbreak) Descriptor() ([]byte, []int) { + return file_game_zhgzd_command_proto_rawDescGZIP(), []int{3} +} + +func (x *Outbreak) GetUser() *common.PbUser { + if x != nil { + return x.User + } + return nil +} + +func (x *Outbreak) GetCostSp() int32 { + if x != nil { + return x.CostSp + } + return 0 +} + +// 移动自己位置 push -> game.pos -> p1/p2/p3/p4/p5 +type Position struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + CostSp int32 `protobuf:"varint,2,opt,name=costSp,proto3" json:"costSp,omitempty"` // 消耗战略点量 + Position string `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` // 1-上兵营,2-中兵营,3-下兵营,4-上前哨战,5-下前哨战 +} + +func (x *Position) Reset() { + *x = Position{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhgzd_command_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Position) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Position) ProtoMessage() {} + +func (x *Position) ProtoReflect() protoreflect.Message { + mi := &file_game_zhgzd_command_proto_msgTypes[4] + 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 Position.ProtoReflect.Descriptor instead. +func (*Position) Descriptor() ([]byte, []int) { + return file_game_zhgzd_command_proto_rawDescGZIP(), []int{4} +} + +func (x *Position) GetUser() *common.PbUser { + if x != nil { + return x.User + } + return nil +} + +func (x *Position) GetCostSp() int32 { + if x != nil { + return x.CostSp + } + return 0 +} + +func (x *Position) GetPosition() string { + if x != nil { + return x.Position + } + return "" +} + +// 查询位置 push -> game.where -> w +type Where struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` +} + +func (x *Where) Reset() { + *x = Where{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhgzd_command_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Where) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Where) ProtoMessage() {} + +func (x *Where) ProtoReflect() protoreflect.Message { + mi := &file_game_zhgzd_command_proto_msgTypes[5] + 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 Where.ProtoReflect.Descriptor instead. +func (*Where) Descriptor() ([]byte, []int) { + return file_game_zhgzd_command_proto_rawDescGZIP(), []int{5} +} + +func (x *Where) GetUser() *common.PbUser { + if x != nil { + return x.User + } + return nil +} + +// 玩家模式 push -> game.mode -> r1/r2/r3/r4 +type PlayerMode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + CostSp int32 `protobuf:"varint,2,opt,name=costSp,proto3" json:"costSp,omitempty"` // 消耗战略点量 + Mode string `protobuf:"bytes,3,opt,name=mode,proto3" json:"mode,omitempty"` // 模式 +} + +func (x *PlayerMode) Reset() { + *x = PlayerMode{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhgzd_command_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlayerMode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerMode) ProtoMessage() {} + +func (x *PlayerMode) ProtoReflect() protoreflect.Message { + mi := &file_game_zhgzd_command_proto_msgTypes[6] + 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 PlayerMode.ProtoReflect.Descriptor instead. +func (*PlayerMode) Descriptor() ([]byte, []int) { + return file_game_zhgzd_command_proto_rawDescGZIP(), []int{6} +} + +func (x *PlayerMode) GetUser() *common.PbUser { + if x != nil { + return x.User + } + return nil +} + +func (x *PlayerMode) GetCostSp() int32 { + if x != nil { + return x.CostSp + } + return 0 +} + +func (x *PlayerMode) GetMode() string { + if x != nil { + return x.Mode + } + return "" +} + +// 战略点调整 push -> game.sp -> 礼物效果 +type StrategicPoint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + AddLimit int32 `protobuf:"varint,2,opt,name=addLimit,proto3" json:"addLimit,omitempty"` // 提高上限N点 + AddSpeed int32 `protobuf:"varint,3,opt,name=addSpeed,proto3" json:"addSpeed,omitempty"` // 提高每秒恢复速度 N(整数) + AddSpeedDuration int32 `protobuf:"varint,4,opt,name=addSpeedDuration,proto3" json:"addSpeedDuration,omitempty"` // 提高每秒恢复速度 (N秒) +} + +func (x *StrategicPoint) Reset() { + *x = StrategicPoint{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhgzd_command_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StrategicPoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StrategicPoint) ProtoMessage() {} + +func (x *StrategicPoint) ProtoReflect() protoreflect.Message { + mi := &file_game_zhgzd_command_proto_msgTypes[7] + 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 StrategicPoint.ProtoReflect.Descriptor instead. +func (*StrategicPoint) Descriptor() ([]byte, []int) { + return file_game_zhgzd_command_proto_rawDescGZIP(), []int{7} +} + +func (x *StrategicPoint) GetUser() *common.PbUser { + if x != nil { + return x.User + } + return nil +} + +func (x *StrategicPoint) GetAddLimit() int32 { + if x != nil { + return x.AddLimit + } + return 0 +} + +func (x *StrategicPoint) GetAddSpeed() int32 { + if x != nil { + return x.AddSpeed + } + return 0 +} + +func (x *StrategicPoint) GetAddSpeedDuration() int32 { + if x != nil { + return x.AddSpeedDuration + } + return 0 +} + +// 支援技能 push -> game.support -> 礼物效果 +type SupportSkill struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // 技能ID S0001/S0002/S0003/S0005 +} + +func (x *SupportSkill) Reset() { + *x = SupportSkill{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhgzd_command_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SupportSkill) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SupportSkill) ProtoMessage() {} + +func (x *SupportSkill) ProtoReflect() protoreflect.Message { + mi := &file_game_zhgzd_command_proto_msgTypes[8] + 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 SupportSkill.ProtoReflect.Descriptor instead. +func (*SupportSkill) Descriptor() ([]byte, []int) { + return file_game_zhgzd_command_proto_rawDescGZIP(), []int{8} +} + +func (x *SupportSkill) GetUser() *common.PbUser { + if x != nil { + return x.User + } + return nil +} + +func (x *SupportSkill) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_game_zhgzd_command_proto protoreflect.FileDescriptor + +var file_game_zhgzd_command_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x7a, 0x68, 0x67, 0x7a, 0x64, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x70, 0x62, 0x2e, 0x67, + 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x7a, 0x64, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x31, + 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, 0x22, 0x73, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 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, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x73, 0x74, + 0x53, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x6f, 0x73, 0x74, 0x53, 0x70, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x5b, 0x0a, 0x0a, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 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, 0x16, 0x0a, 0x06, 0x63, + 0x6f, 0x73, 0x74, 0x53, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x6f, 0x73, + 0x74, 0x53, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x49, 0x0a, 0x08, 0x4f, 0x75, 0x74, 0x62, 0x72, 0x65, 0x61, 0x6b, 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, 0x63, 0x6f, 0x73, 0x74, 0x53, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x6f, 0x73, 0x74, 0x53, 0x70, 0x22, 0x65, + 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 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, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x73, 0x74, 0x53, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x63, 0x6f, 0x73, 0x74, 0x53, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, 0x05, 0x57, 0x68, 0x65, 0x72, 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, 0x22, 0x5f, 0x0a, 0x0a, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, + 0x6f, 0x64, 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, 0x16, 0x0a, 0x06, 0x63, 0x6f, + 0x73, 0x74, 0x53, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x6f, 0x73, 0x74, + 0x53, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x69, 0x63, 0x50, 0x6f, 0x69, 0x6e, 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, 0x1a, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x61, 0x64, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x61, 0x64, 0x64, 0x53, 0x70, 0x65, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x61, 0x64, 0x64, 0x53, 0x70, 0x65, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x61, 0x64, 0x64, 0x53, + 0x70, 0x65, 0x65, 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x10, 0x61, 0x64, 0x64, 0x53, 0x70, 0x65, 0x65, 0x64, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x45, 0x0a, 0x0c, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x53, + 0x6b, 0x69, 0x6c, 0x6c, 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, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x42, 0x24, 0x5a, 0x22, 0x64, + 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, + 0x7a, 0x68, 0x67, 0x7a, 0x64, 0x3b, 0x70, 0x62, 0x47, 0x61, 0x6d, 0x65, 0x5a, 0x68, 0x67, 0x7a, + 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_game_zhgzd_command_proto_rawDescOnce sync.Once + file_game_zhgzd_command_proto_rawDescData = file_game_zhgzd_command_proto_rawDesc +) + +func file_game_zhgzd_command_proto_rawDescGZIP() []byte { + file_game_zhgzd_command_proto_rawDescOnce.Do(func() { + file_game_zhgzd_command_proto_rawDescData = protoimpl.X.CompressGZIP(file_game_zhgzd_command_proto_rawDescData) + }) + return file_game_zhgzd_command_proto_rawDescData +} + +var file_game_zhgzd_command_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_game_zhgzd_command_proto_goTypes = []interface{}{ + (*JoinGame)(nil), // 0: pb.game.zhgzd.JoinGame + (*DispatchUnit)(nil), // 1: pb.game.zhgzd.DispatchUnit + (*ChangeUnit)(nil), // 2: pb.game.zhgzd.ChangeUnit + (*Outbreak)(nil), // 3: pb.game.zhgzd.Outbreak + (*Position)(nil), // 4: pb.game.zhgzd.Position + (*Where)(nil), // 5: pb.game.zhgzd.Where + (*PlayerMode)(nil), // 6: pb.game.zhgzd.PlayerMode + (*StrategicPoint)(nil), // 7: pb.game.zhgzd.StrategicPoint + (*SupportSkill)(nil), // 8: pb.game.zhgzd.SupportSkill + (*common.PbUser)(nil), // 9: pb.common.PbUser +} +var file_game_zhgzd_command_proto_depIdxs = []int32{ + 9, // 0: pb.game.zhgzd.JoinGame.user:type_name -> pb.common.PbUser + 9, // 1: pb.game.zhgzd.DispatchUnit.user:type_name -> pb.common.PbUser + 9, // 2: pb.game.zhgzd.ChangeUnit.user:type_name -> pb.common.PbUser + 9, // 3: pb.game.zhgzd.Outbreak.user:type_name -> pb.common.PbUser + 9, // 4: pb.game.zhgzd.Position.user:type_name -> pb.common.PbUser + 9, // 5: pb.game.zhgzd.Where.user:type_name -> pb.common.PbUser + 9, // 6: pb.game.zhgzd.PlayerMode.user:type_name -> pb.common.PbUser + 9, // 7: pb.game.zhgzd.StrategicPoint.user:type_name -> pb.common.PbUser + 9, // 8: pb.game.zhgzd.SupportSkill.user:type_name -> pb.common.PbUser + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_game_zhgzd_command_proto_init() } +func file_game_zhgzd_command_proto_init() { + if File_game_zhgzd_command_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_game_zhgzd_command_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JoinGame); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_zhgzd_command_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DispatchUnit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_zhgzd_command_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChangeUnit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_zhgzd_command_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Outbreak); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_zhgzd_command_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Position); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_zhgzd_command_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Where); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_zhgzd_command_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlayerMode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_zhgzd_command_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StrategicPoint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_zhgzd_command_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SupportSkill); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_game_zhgzd_command_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_game_zhgzd_command_proto_goTypes, + DependencyIndexes: file_game_zhgzd_command_proto_depIdxs, + MessageInfos: file_game_zhgzd_command_proto_msgTypes, + }.Build() + File_game_zhgzd_command_proto = out.File + file_game_zhgzd_command_proto_rawDesc = nil + file_game_zhgzd_command_proto_goTypes = nil + file_game_zhgzd_command_proto_depIdxs = nil +} diff --git a/game/pb/game/zhgzd/command.proto b/game/pb/game/zhgzd/command.proto new file mode 100644 index 0000000..6a15e70 --- /dev/null +++ b/game/pb/game/zhgzd/command.proto @@ -0,0 +1,73 @@ +syntax = "proto3"; + +package pb.game.zhgzd; + +import "common/common.proto"; + +option go_package = "dcg/game/pb/game/zhgzd;pbGameZhgzd"; + +// 加入游戏 push -> game.join -> j +message JoinGame { + pb.common.PbUser user = 1; +} + +// 战略出兵 push -> game.unit.dispatch -> s1/s2/s3/s4 +message DispatchUnit { + pb.common.PbUser user = 1; + int32 costSp = 2; // 消耗战略点量 + + string id = 3; // 0001-步兵,0004-骑兵,0003-弓箭手,0006-法师 + int32 count = 4; // 出兵数量 +} + +// 修改当前兵种 push -> game.unit.change -> c1/c2/c3/c4 +message ChangeUnit { + pb.common.PbUser user = 1; + int32 costSp = 2; // 消耗战略点量 + + string id = 3; // 0001-步兵,0004-骑兵,0003-弓箭手,0006-法师 +} + +// 暴兵(征召模式) push -> game.outbreak -> s +message Outbreak { + pb.common.PbUser user = 1; + int32 costSp = 2; // 消耗战略点量 +} + +// 移动自己位置 push -> game.pos -> p1/p2/p3/p4/p5 +message Position { + pb.common.PbUser user = 1; + int32 costSp = 2; // 消耗战略点量 + + string position = 3;// 1-上兵营,2-中兵营,3-下兵营,4-上前哨战,5-下前哨战 +} + +// 查询位置 push -> game.where -> w +message Where { + pb.common.PbUser user = 1; +} + +// 玩家模式 push -> game.mode -> r1/r2/r3/r4 +message PlayerMode { + pb.common.PbUser user = 1; + int32 costSp = 2; // 消耗战略点量 + + string mode = 3; // 模式 +} + +/////////////////// 礼物效果 + +// 战略点调整 push -> game.sp -> 礼物效果 +message StrategicPoint { + pb.common.PbUser user = 1; + int32 addLimit = 2; // 提高上限N点 + + int32 addSpeed = 3; // 提高每秒恢复速度 N(整数) + int32 addSpeedDuration = 4; // 提高每秒恢复速度 (N秒) +} + +// 支援技能 push -> game.support -> 礼物效果 +message SupportSkill { + pb.common.PbUser user = 1; + string id = 2; // 技能ID S0001/S0002/S0003/S0005 +} \ No newline at end of file diff --git a/game/pb/game/zhgzd/genCSharp.bat b/game/pb/game/zhgzd/genCSharp.bat new file mode 100644 index 0000000..61ff858 --- /dev/null +++ b/game/pb/game/zhgzd/genCSharp.bat @@ -0,0 +1 @@ +protoc --csharp_out=. --proto_path=. --proto_path=../../ *.proto \ No newline at end of file