diff --git a/Public/Proto/ServerClient/gen/client/Action.cs b/Public/Proto/ServerClient/gen/client/Action.cs
new file mode 100644
index 0000000..8a8dbda
--- /dev/null
+++ b/Public/Proto/ServerClient/gen/client/Action.cs
@@ -0,0 +1,1300 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: action.proto
+//
+#pragma warning disable 1591, 0612, 3021, 8981
+#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;
+/// Holder for reflection information generated from action.proto
+public static partial class ActionReflection {
+
+ #region Descriptor
+ /// File descriptor for action.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static ActionReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "CgxhY3Rpb24ucHJvdG8aD3NjX2NvbW1vbi5wcm90byInChFDMlNfRW50ZXJJ",
+ "bnN0YW5jZRISCgpJbnN0YW5jZUlEGAEgASgFIjAKEVMyQ19FbnRlckluc3Rh",
+ "bmNlEhsKBEluZm8YASABKAsyDS5Qb3NpdGlvbkluZm8ieQoKQzJTX0FjdGlv",
+ "bhIQCghTZXF1ZW5jZRgBIAEoDRIRCglUaW1lc3RhbXAYAiABKAMSGQoGQWN0",
+ "aW9uGAMgASgOMgkuQWN0aW9uSUQSDAoERGlyWBgEIAEoERIMCgREaXJZGAUg",
+ "ASgREg8KB1NraWxsSUQYBiABKAUiMQoMUG9zaXRpb25JbmZvEgsKA1VJRBgB",
+ "IAEoBRIJCgFYGAIgASgREgkKAVkYAyABKBEiKwoMUzJDX1Bvc2l0aW9uEhsK",
+ "BEluZm8YASADKAsyDS5Qb3NpdGlvbkluZm8qNAoIQWN0aW9uSUQSEgoOQUNU",
+ "SU9OX0lEX01PVkUQABIUChBBQ1RJT05fSURfQVRUQUNLEAFCF1oVY29tbW9u",
+ "L3Byb3RvL3NjL3NjX3BiYgZwcm90bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::ScCommonReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ActionID), }, null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::C2S_EnterInstance), global::C2S_EnterInstance.Parser, new[]{ "InstanceID" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::S2C_EnterInstance), global::S2C_EnterInstance.Parser, new[]{ "Info" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::C2S_Action), global::C2S_Action.Parser, new[]{ "Sequence", "Timestamp", "Action", "DirX", "DirY", "SkillID" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::PositionInfo), global::PositionInfo.Parser, new[]{ "UID", "X", "Y" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::S2C_Position), global::S2C_Position.Parser, new[]{ "Info" }, null, null, null, null)
+ }));
+ }
+ #endregion
+
+}
+#region Enums
+///
+/// MESSAGE_ID_ACTION
+///
+public enum ActionID {
+ ///
+ /// 移动
+ ///
+ [pbr::OriginalName("ACTION_ID_MOVE")] Move = 0,
+ ///
+ /// 攻击
+ ///
+ [pbr::OriginalName("ACTION_ID_ATTACK")] Attack = 1,
+}
+
+#endregion
+
+#region Messages
+///
+/// MESSAGE_ID_ENTER_INSTANCE
+///
+[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+public sealed partial class C2S_EnterInstance : pb::IMessage
+#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+#endif
+{
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new C2S_EnterInstance());
+ 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::ActionReflection.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 C2S_EnterInstance() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public C2S_EnterInstance(C2S_EnterInstance other) : this() {
+ instanceID_ = other.instanceID_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public C2S_EnterInstance Clone() {
+ return new C2S_EnterInstance(this);
+ }
+
+ /// Field number for the "InstanceID" field.
+ public const int InstanceIDFieldNumber = 1;
+ private int instanceID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int InstanceID {
+ get { return instanceID_; }
+ set {
+ instanceID_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as C2S_EnterInstance);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(C2S_EnterInstance other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (InstanceID != other.InstanceID) 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 (InstanceID != 0) hash ^= InstanceID.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 (InstanceID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(InstanceID);
+ }
+ 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 (InstanceID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(InstanceID);
+ }
+ 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 (InstanceID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(InstanceID);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(C2S_EnterInstance other) {
+ if (other == null) {
+ return;
+ }
+ if (other.InstanceID != 0) {
+ InstanceID = other.InstanceID;
+ }
+ _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 8: {
+ InstanceID = 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 8: {
+ InstanceID = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+}
+
+[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+public sealed partial class S2C_EnterInstance : pb::IMessage
+#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+#endif
+{
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new S2C_EnterInstance());
+ 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::ActionReflection.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 S2C_EnterInstance() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public S2C_EnterInstance(S2C_EnterInstance other) : this() {
+ info_ = other.info_ != null ? other.info_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public S2C_EnterInstance Clone() {
+ return new S2C_EnterInstance(this);
+ }
+
+ /// Field number for the "Info" field.
+ public const int InfoFieldNumber = 1;
+ private global::PositionInfo info_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::PositionInfo Info {
+ get { return info_; }
+ set {
+ info_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as S2C_EnterInstance);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(S2C_EnterInstance other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(Info, other.Info)) 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 (info_ != null) hash ^= Info.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 (info_ != null) {
+ output.WriteRawTag(10);
+ output.WriteMessage(Info);
+ }
+ 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 (info_ != null) {
+ output.WriteRawTag(10);
+ output.WriteMessage(Info);
+ }
+ 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 (info_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Info);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(S2C_EnterInstance other) {
+ if (other == null) {
+ return;
+ }
+ if (other.info_ != null) {
+ if (info_ == null) {
+ Info = new global::PositionInfo();
+ }
+ Info.MergeFrom(other.Info);
+ }
+ _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 (info_ == null) {
+ Info = new global::PositionInfo();
+ }
+ input.ReadMessage(Info);
+ 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 (info_ == null) {
+ Info = new global::PositionInfo();
+ }
+ input.ReadMessage(Info);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+}
+
+[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+public sealed partial class C2S_Action : pb::IMessage
+#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+#endif
+{
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new C2S_Action());
+ 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::ActionReflection.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 C2S_Action() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public C2S_Action(C2S_Action other) : this() {
+ sequence_ = other.sequence_;
+ timestamp_ = other.timestamp_;
+ action_ = other.action_;
+ dirX_ = other.dirX_;
+ dirY_ = other.dirY_;
+ skillID_ = other.skillID_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public C2S_Action Clone() {
+ return new C2S_Action(this);
+ }
+
+ /// Field number for the "Sequence" field.
+ public const int SequenceFieldNumber = 1;
+ private uint sequence_;
+ ///
+ /// 指令序号
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public uint Sequence {
+ get { return sequence_; }
+ set {
+ sequence_ = value;
+ }
+ }
+
+ /// Field number for the "Timestamp" field.
+ public const int TimestampFieldNumber = 2;
+ private long timestamp_;
+ ///
+ /// 时间戳(毫秒)
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public long Timestamp {
+ get { return timestamp_; }
+ set {
+ timestamp_ = value;
+ }
+ }
+
+ /// Field number for the "Action" field.
+ public const int ActionFieldNumber = 3;
+ private global::ActionID action_ = global::ActionID.Move;
+ ///
+ /// 指令ID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::ActionID Action {
+ get { return action_; }
+ set {
+ action_ = value;
+ }
+ }
+
+ /// Field number for the "DirX" field.
+ public const int DirXFieldNumber = 4;
+ private int dirX_;
+ ///
+ /// 移动-X方向(×100 缩放)
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int DirX {
+ get { return dirX_; }
+ set {
+ dirX_ = value;
+ }
+ }
+
+ /// Field number for the "DirY" field.
+ public const int DirYFieldNumber = 5;
+ private int dirY_;
+ ///
+ /// 移动-Y方向(×100 缩放)
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int DirY {
+ get { return dirY_; }
+ set {
+ dirY_ = value;
+ }
+ }
+
+ /// Field number for the "SkillID" field.
+ public const int SkillIDFieldNumber = 6;
+ private int skillID_;
+ ///
+ /// 攻击-技能ID
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int SkillID {
+ get { return skillID_; }
+ set {
+ skillID_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as C2S_Action);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(C2S_Action other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Sequence != other.Sequence) return false;
+ if (Timestamp != other.Timestamp) return false;
+ if (Action != other.Action) return false;
+ if (DirX != other.DirX) return false;
+ if (DirY != other.DirY) return false;
+ if (SkillID != other.SkillID) 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 (Sequence != 0) hash ^= Sequence.GetHashCode();
+ if (Timestamp != 0L) hash ^= Timestamp.GetHashCode();
+ if (Action != global::ActionID.Move) hash ^= Action.GetHashCode();
+ if (DirX != 0) hash ^= DirX.GetHashCode();
+ if (DirY != 0) hash ^= DirY.GetHashCode();
+ if (SkillID != 0) hash ^= SkillID.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 (Sequence != 0) {
+ output.WriteRawTag(8);
+ output.WriteUInt32(Sequence);
+ }
+ if (Timestamp != 0L) {
+ output.WriteRawTag(16);
+ output.WriteInt64(Timestamp);
+ }
+ if (Action != global::ActionID.Move) {
+ output.WriteRawTag(24);
+ output.WriteEnum((int) Action);
+ }
+ if (DirX != 0) {
+ output.WriteRawTag(32);
+ output.WriteSInt32(DirX);
+ }
+ if (DirY != 0) {
+ output.WriteRawTag(40);
+ output.WriteSInt32(DirY);
+ }
+ if (SkillID != 0) {
+ output.WriteRawTag(48);
+ output.WriteInt32(SkillID);
+ }
+ 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 (Sequence != 0) {
+ output.WriteRawTag(8);
+ output.WriteUInt32(Sequence);
+ }
+ if (Timestamp != 0L) {
+ output.WriteRawTag(16);
+ output.WriteInt64(Timestamp);
+ }
+ if (Action != global::ActionID.Move) {
+ output.WriteRawTag(24);
+ output.WriteEnum((int) Action);
+ }
+ if (DirX != 0) {
+ output.WriteRawTag(32);
+ output.WriteSInt32(DirX);
+ }
+ if (DirY != 0) {
+ output.WriteRawTag(40);
+ output.WriteSInt32(DirY);
+ }
+ if (SkillID != 0) {
+ output.WriteRawTag(48);
+ output.WriteInt32(SkillID);
+ }
+ 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 (Sequence != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Sequence);
+ }
+ if (Timestamp != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(Timestamp);
+ }
+ if (Action != global::ActionID.Move) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Action);
+ }
+ if (DirX != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeSInt32Size(DirX);
+ }
+ if (DirY != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeSInt32Size(DirY);
+ }
+ if (SkillID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(SkillID);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(C2S_Action other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Sequence != 0) {
+ Sequence = other.Sequence;
+ }
+ if (other.Timestamp != 0L) {
+ Timestamp = other.Timestamp;
+ }
+ if (other.Action != global::ActionID.Move) {
+ Action = other.Action;
+ }
+ if (other.DirX != 0) {
+ DirX = other.DirX;
+ }
+ if (other.DirY != 0) {
+ DirY = other.DirY;
+ }
+ if (other.SkillID != 0) {
+ SkillID = other.SkillID;
+ }
+ _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 8: {
+ Sequence = input.ReadUInt32();
+ break;
+ }
+ case 16: {
+ Timestamp = input.ReadInt64();
+ break;
+ }
+ case 24: {
+ Action = (global::ActionID) input.ReadEnum();
+ break;
+ }
+ case 32: {
+ DirX = input.ReadSInt32();
+ break;
+ }
+ case 40: {
+ DirY = input.ReadSInt32();
+ break;
+ }
+ case 48: {
+ SkillID = 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 8: {
+ Sequence = input.ReadUInt32();
+ break;
+ }
+ case 16: {
+ Timestamp = input.ReadInt64();
+ break;
+ }
+ case 24: {
+ Action = (global::ActionID) input.ReadEnum();
+ break;
+ }
+ case 32: {
+ DirX = input.ReadSInt32();
+ break;
+ }
+ case 40: {
+ DirY = input.ReadSInt32();
+ break;
+ }
+ case 48: {
+ SkillID = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+}
+
+///
+/// MESSAGE_ID_POSITION
+///
+[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+public sealed partial class PositionInfo : pb::IMessage
+#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+#endif
+{
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PositionInfo());
+ 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::ActionReflection.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 PositionInfo() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public PositionInfo(PositionInfo other) : this() {
+ uID_ = other.uID_;
+ x_ = other.x_;
+ y_ = other.y_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public PositionInfo Clone() {
+ return new PositionInfo(this);
+ }
+
+ /// Field number for the "UID" field.
+ public const int UIDFieldNumber = 1;
+ private int uID_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int UID {
+ get { return uID_; }
+ set {
+ uID_ = value;
+ }
+ }
+
+ /// Field number for the "X" field.
+ public const int XFieldNumber = 2;
+ private int x_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int X {
+ get { return x_; }
+ set {
+ x_ = value;
+ }
+ }
+
+ /// Field number for the "Y" field.
+ public const int YFieldNumber = 3;
+ private int y_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int Y {
+ get { return y_; }
+ set {
+ y_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as PositionInfo);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(PositionInfo other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (UID != other.UID) return false;
+ if (X != other.X) return false;
+ if (Y != other.Y) 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 (UID != 0) hash ^= UID.GetHashCode();
+ if (X != 0) hash ^= X.GetHashCode();
+ if (Y != 0) hash ^= Y.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 (UID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(UID);
+ }
+ if (X != 0) {
+ output.WriteRawTag(16);
+ output.WriteSInt32(X);
+ }
+ if (Y != 0) {
+ output.WriteRawTag(24);
+ output.WriteSInt32(Y);
+ }
+ 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 (UID != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(UID);
+ }
+ if (X != 0) {
+ output.WriteRawTag(16);
+ output.WriteSInt32(X);
+ }
+ if (Y != 0) {
+ output.WriteRawTag(24);
+ output.WriteSInt32(Y);
+ }
+ 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 (UID != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(UID);
+ }
+ if (X != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeSInt32Size(X);
+ }
+ if (Y != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeSInt32Size(Y);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(PositionInfo other) {
+ if (other == null) {
+ return;
+ }
+ if (other.UID != 0) {
+ UID = other.UID;
+ }
+ if (other.X != 0) {
+ X = other.X;
+ }
+ if (other.Y != 0) {
+ Y = other.Y;
+ }
+ _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 8: {
+ UID = input.ReadInt32();
+ break;
+ }
+ case 16: {
+ X = input.ReadSInt32();
+ break;
+ }
+ case 24: {
+ Y = input.ReadSInt32();
+ 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 8: {
+ UID = input.ReadInt32();
+ break;
+ }
+ case 16: {
+ X = input.ReadSInt32();
+ break;
+ }
+ case 24: {
+ Y = input.ReadSInt32();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+}
+
+[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+public sealed partial class S2C_Position : pb::IMessage
+#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+#endif
+{
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new S2C_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::ActionReflection.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 S2C_Position() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public S2C_Position(S2C_Position other) : this() {
+ info_ = other.info_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public S2C_Position Clone() {
+ return new S2C_Position(this);
+ }
+
+ /// Field number for the "Info" field.
+ public const int InfoFieldNumber = 1;
+ private static readonly pb::FieldCodec _repeated_info_codec
+ = pb::FieldCodec.ForMessage(10, global::PositionInfo.Parser);
+ private readonly pbc::RepeatedField info_ = new pbc::RepeatedField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::RepeatedField Info {
+ get { return info_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as S2C_Position);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(S2C_Position other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!info_.Equals(other.info_)) 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;
+ hash ^= info_.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
+ info_.WriteTo(output, _repeated_info_codec);
+ 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) {
+ info_.WriteTo(ref output, _repeated_info_codec);
+ 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;
+ size += info_.CalculateSize(_repeated_info_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(S2C_Position other) {
+ if (other == null) {
+ return;
+ }
+ info_.Add(other.info_);
+ _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: {
+ info_.AddEntriesFrom(input, _repeated_info_codec);
+ 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: {
+ info_.AddEntriesFrom(ref input, _repeated_info_codec);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+}
+
+#endregion
+
+
+#endregion Designer generated code
diff --git a/Public/Proto/ServerClient/gen/client/Define.cs b/Public/Proto/ServerClient/gen/client/Define.cs
new file mode 100644
index 0000000..9846b6a
--- /dev/null
+++ b/Public/Proto/ServerClient/gen/client/Define.cs
@@ -0,0 +1,290 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: define.proto
+//
+#pragma warning disable 1591, 0612, 3021, 8981
+#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;
+/// Holder for reflection information generated from define.proto
+public static partial class DefineReflection {
+
+ #region Descriptor
+ /// File descriptor for define.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static DefineReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "CgxkZWZpbmUucHJvdG8aD3NjX2NvbW1vbi5wcm90byIyCgdNZXNzYWdlEhYK",
+ "AklEGAEgASgOMgouTWVzc2FnZUlEEg8KB1BheWxvYWQYAiABKAwqcgoJTWVz",
+ "c2FnZUlEEhYKEk1FU1NBR0VfSURfSU5WQUxJRBAAEh0KGU1FU1NBR0VfSURf",
+ "RU5URVJfSU5TVEFOQ0UQARIVChFNRVNTQUdFX0lEX0FDVElPThACEhcKE01F",
+ "U1NBR0VfSURfUE9TSVRJT04QA0IXWhVjb21tb24vcHJvdG8vc2Mvc2NfcGJi",
+ "BnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::ScCommonReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::MessageID), }, null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Message), global::Message.Parser, new[]{ "ID", "Payload" }, null, null, null, null)
+ }));
+ }
+ #endregion
+
+}
+#region Enums
+public enum MessageID {
+ [pbr::OriginalName("MESSAGE_ID_INVALID")] Invalid = 0,
+ ///
+ /// 进入副本
+ ///
+ [pbr::OriginalName("MESSAGE_ID_ENTER_INSTANCE")] EnterInstance = 1,
+ ///
+ /// 指令
+ ///
+ [pbr::OriginalName("MESSAGE_ID_ACTION")] Action = 2,
+ ///
+ /// 位置更新
+ ///
+ [pbr::OriginalName("MESSAGE_ID_POSITION")] Position = 3,
+}
+
+#endregion
+
+#region Messages
+[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+public sealed partial class Message : pb::IMessage
+#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+#endif
+{
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Message());
+ 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::DefineReflection.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 Message() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public Message(Message other) : this() {
+ iD_ = other.iD_;
+ payload_ = other.payload_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public Message Clone() {
+ return new Message(this);
+ }
+
+ /// Field number for the "ID" field.
+ public const int IDFieldNumber = 1;
+ private global::MessageID iD_ = global::MessageID.Invalid;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::MessageID ID {
+ get { return iD_; }
+ set {
+ iD_ = value;
+ }
+ }
+
+ /// Field number for the "Payload" field.
+ public const int PayloadFieldNumber = 2;
+ private pb::ByteString payload_ = pb::ByteString.Empty;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pb::ByteString Payload {
+ get { return payload_; }
+ set {
+ payload_ = 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 Message);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(Message other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (ID != other.ID) return false;
+ if (Payload != other.Payload) 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 (ID != global::MessageID.Invalid) hash ^= ID.GetHashCode();
+ if (Payload.Length != 0) hash ^= Payload.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 (ID != global::MessageID.Invalid) {
+ output.WriteRawTag(8);
+ output.WriteEnum((int) ID);
+ }
+ if (Payload.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(Payload);
+ }
+ 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 (ID != global::MessageID.Invalid) {
+ output.WriteRawTag(8);
+ output.WriteEnum((int) ID);
+ }
+ if (Payload.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(Payload);
+ }
+ 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 (ID != global::MessageID.Invalid) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ID);
+ }
+ if (Payload.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(Payload);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(Message other) {
+ if (other == null) {
+ return;
+ }
+ if (other.ID != global::MessageID.Invalid) {
+ ID = other.ID;
+ }
+ if (other.Payload.Length != 0) {
+ Payload = other.Payload;
+ }
+ _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 8: {
+ ID = (global::MessageID) input.ReadEnum();
+ break;
+ }
+ case 18: {
+ Payload = input.ReadBytes();
+ 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 8: {
+ ID = (global::MessageID) input.ReadEnum();
+ break;
+ }
+ case 18: {
+ Payload = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+}
+
+#endregion
+
+
+#endregion Designer generated code
diff --git a/Public/Proto/ServerClient/gen/client/ScCommon.cs b/Public/Proto/ServerClient/gen/client/ScCommon.cs
new file mode 100644
index 0000000..fed1db3
--- /dev/null
+++ b/Public/Proto/ServerClient/gen/client/ScCommon.cs
@@ -0,0 +1,35 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: sc_common.proto
+//
+#pragma warning disable 1591, 0612, 3021, 8981
+#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;
+/// Holder for reflection information generated from sc_common.proto
+public static partial class ScCommonReflection {
+
+ #region Descriptor
+ /// File descriptor for sc_common.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static ScCommonReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Cg9zY19jb21tb24ucHJvdG9CG1oZY29tbW9uL3Byb3RvL3NjL3NjX2NvbW1v",
+ "bmIGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, null, null));
+ }
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Public/Proto/ServerClient/gen/common/proto/sc/sc_pb/action.pb.go b/Public/Proto/ServerClient/gen/common/proto/sc/sc_pb/action.pb.go
index cb9977a..13d5ccc 100644
--- a/Public/Proto/ServerClient/gen/common/proto/sc/sc_pb/action.pb.go
+++ b/Public/Proto/ServerClient/gen/common/proto/sc/sc_pb/action.pb.go
@@ -25,19 +25,19 @@ const (
type ActionID int32
const (
- ActionID_ACTION_ID_MOVE ActionID = 0 // 0-15都是移动指令
- ActionID_ACTION_ID_ATTACK ActionID = 16 // 攻击指令
+ ActionID_ACTION_ID_MOVE ActionID = 0 // 移动
+ ActionID_ACTION_ID_ATTACK ActionID = 1 // 攻击
)
// Enum value maps for ActionID.
var (
ActionID_name = map[int32]string{
- 0: "ACTION_ID_MOVE",
- 16: "ACTION_ID_ATTACK",
+ 0: "ACTION_ID_MOVE",
+ 1: "ACTION_ID_ATTACK",
}
ActionID_value = map[string]int32{
"ACTION_ID_MOVE": 0,
- "ACTION_ID_ATTACK": 16,
+ "ACTION_ID_ATTACK": 1,
}
)
@@ -168,8 +168,12 @@ type C2S_Action struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Action ActionID `protobuf:"varint,1,opt,name=Action,proto3,enum=ActionID" json:"Action,omitempty"` // 指令ID
- Payload []byte `protobuf:"bytes,2,opt,name=Payload,proto3" json:"Payload,omitempty"` // 指令数据
+ Sequence uint32 `protobuf:"varint,1,opt,name=Sequence,proto3" json:"Sequence,omitempty"` // 指令序号
+ Timestamp int64 `protobuf:"varint,2,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` // 时间戳(毫秒)
+ Action ActionID `protobuf:"varint,3,opt,name=Action,proto3,enum=ActionID" json:"Action,omitempty"` // 指令ID
+ DirX int32 `protobuf:"zigzag32,4,opt,name=DirX,proto3" json:"DirX,omitempty"` // 移动-X方向(×100 缩放)
+ DirY int32 `protobuf:"zigzag32,5,opt,name=DirY,proto3" json:"DirY,omitempty"` // 移动-Y方向(×100 缩放)
+ SkillID int32 `protobuf:"varint,6,opt,name=SkillID,proto3" json:"SkillID,omitempty"` // 攻击-技能ID
}
func (x *C2S_Action) Reset() {
@@ -204,6 +208,20 @@ func (*C2S_Action) Descriptor() ([]byte, []int) {
return file_action_proto_rawDescGZIP(), []int{2}
}
+func (x *C2S_Action) GetSequence() uint32 {
+ if x != nil {
+ return x.Sequence
+ }
+ return 0
+}
+
+func (x *C2S_Action) GetTimestamp() int64 {
+ if x != nil {
+ return x.Timestamp
+ }
+ return 0
+}
+
func (x *C2S_Action) GetAction() ActionID {
if x != nil {
return x.Action
@@ -211,11 +229,25 @@ func (x *C2S_Action) GetAction() ActionID {
return ActionID_ACTION_ID_MOVE
}
-func (x *C2S_Action) GetPayload() []byte {
+func (x *C2S_Action) GetDirX() int32 {
if x != nil {
- return x.Payload
+ return x.DirX
}
- return nil
+ return 0
+}
+
+func (x *C2S_Action) GetDirY() int32 {
+ if x != nil {
+ return x.DirY
+ }
+ return 0
+}
+
+func (x *C2S_Action) GetSkillID() int32 {
+ if x != nil {
+ return x.SkillID
+ }
+ return 0
}
// MESSAGE_ID_POSITION
@@ -224,9 +256,9 @@ type PositionInfo struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- UID int32 `protobuf:"varint,1,opt,name=UID,proto3" json:"UID,omitempty"`
- X float64 `protobuf:"fixed64,2,opt,name=X,proto3" json:"X,omitempty"`
- Y float64 `protobuf:"fixed64,3,opt,name=Y,proto3" json:"Y,omitempty"`
+ UID int32 `protobuf:"varint,1,opt,name=UID,proto3" json:"UID,omitempty"`
+ X int32 `protobuf:"zigzag32,2,opt,name=X,proto3" json:"X,omitempty"`
+ Y int32 `protobuf:"zigzag32,3,opt,name=Y,proto3" json:"Y,omitempty"`
}
func (x *PositionInfo) Reset() {
@@ -268,14 +300,14 @@ func (x *PositionInfo) GetUID() int32 {
return 0
}
-func (x *PositionInfo) GetX() float64 {
+func (x *PositionInfo) GetX() int32 {
if x != nil {
return x.X
}
return 0
}
-func (x *PositionInfo) GetY() float64 {
+func (x *PositionInfo) GetY() int32 {
if x != nil {
return x.Y
}
@@ -340,24 +372,31 @@ var file_action_proto_rawDesc = []byte{
0x63, 0x65, 0x49, 0x44, 0x22, 0x36, 0x0a, 0x11, 0x53, 0x32, 0x43, 0x5f, 0x45, 0x6e, 0x74, 0x65,
0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x49, 0x6e, 0x66,
0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69,
- 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x49, 0x0a, 0x0a,
- 0x43, 0x32, 0x53, 0x5f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x06, 0x41, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x41, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a,
- 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
- 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x3c, 0x0a, 0x0c, 0x50, 0x6f, 0x73, 0x69, 0x74,
- 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x49, 0x44, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x55, 0x49, 0x44, 0x12, 0x0c, 0x0a, 0x01, 0x58, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x58, 0x12, 0x0c, 0x0a, 0x01, 0x59, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x01, 0x52, 0x01, 0x59, 0x22, 0x31, 0x0a, 0x0c, 0x53, 0x32, 0x43, 0x5f, 0x50, 0x6f, 0x73,
- 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e,
- 0x66, 0x6f, 0x52, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x2a, 0x34, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49,
- 0x44, 0x5f, 0x4d, 0x4f, 0x56, 0x45, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x43, 0x54, 0x49,
- 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x5f, 0x41, 0x54, 0x54, 0x41, 0x43, 0x4b, 0x10, 0x10, 0x42, 0x17,
- 0x5a, 0x15, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73,
- 0x63, 0x2f, 0x73, 0x63, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xab, 0x01, 0x0a,
+ 0x0a, 0x43, 0x32, 0x53, 0x5f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x53,
+ 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x53,
+ 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x73,
+ 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x54, 0x69, 0x6d, 0x65,
+ 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x21, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44,
+ 0x52, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x69, 0x72, 0x58,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x04, 0x44, 0x69, 0x72, 0x58, 0x12, 0x12, 0x0a, 0x04,
+ 0x44, 0x69, 0x72, 0x59, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, 0x52, 0x04, 0x44, 0x69, 0x72, 0x59,
+ 0x12, 0x18, 0x0a, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28,
+ 0x05, 0x52, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x22, 0x3c, 0x0a, 0x0c, 0x50, 0x6f,
+ 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x49,
+ 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x55, 0x49, 0x44, 0x12, 0x0c, 0x0a, 0x01,
+ 0x58, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x01, 0x58, 0x12, 0x0c, 0x0a, 0x01, 0x59, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x01, 0x59, 0x22, 0x31, 0x0a, 0x0c, 0x53, 0x32, 0x43, 0x5f,
+ 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f,
+ 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x2a, 0x34, 0x0a, 0x08, 0x41,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x43, 0x54, 0x49, 0x4f,
+ 0x4e, 0x5f, 0x49, 0x44, 0x5f, 0x4d, 0x4f, 0x56, 0x45, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x41,
+ 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x5f, 0x41, 0x54, 0x54, 0x41, 0x43, 0x4b, 0x10,
+ 0x01, 0x42, 0x17, 0x5a, 0x15, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x2f, 0x73, 0x63, 0x2f, 0x73, 0x63, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x33,
}
var (
diff --git a/Public/Proto/ServerClient/gen_proto.bat b/Public/Proto/ServerClient/gen_proto.bat
index 3865bb2..077ecff 100644
--- a/Public/Proto/ServerClient/gen_proto.bat
+++ b/Public/Proto/ServerClient/gen_proto.bat
@@ -1,4 +1,14 @@
@echo off
+if not exist "./gen" (
+ mkdir "./gen"
+)
+
protoc --proto_path=./sources --go_out=./gen ./sources/*.proto
-xcopy "./gen/common" "../../../Server/common" /E /I /Y /Q
\ No newline at end of file
+xcopy "./gen/common" "../../../Server/common" /E /I /Y /Q
+
+if not exist "./gen/client" (
+ mkdir "./gen/client"
+)
+protoc --proto_path=./sources --csharp_out=./gen/client ./sources/*.proto
+xcopy "./gen/client" "../../../Client/Point/Assets/Scripts/Proto" /E /I /Y /Q
\ No newline at end of file
diff --git a/Public/Proto/ServerClient/sources/action.proto b/Public/Proto/ServerClient/sources/action.proto
index ad65d54..00e287b 100644
--- a/Public/Proto/ServerClient/sources/action.proto
+++ b/Public/Proto/ServerClient/sources/action.proto
@@ -13,19 +13,23 @@ message S2C_EnterInstance {
// MESSAGE_ID_ACTION
enum ActionID {
- ACTION_ID_MOVE = 0; // 0-15都是移动指令
- ACTION_ID_ATTACK = 16; // 攻击指令
+ ACTION_ID_MOVE = 0; // 移动
+ ACTION_ID_ATTACK = 1; // 攻击
}
message C2S_Action {
- ActionID Action = 1; // 指令ID
- bytes Payload = 2; // 指令数据
+ uint32 Sequence = 1; // 指令序号
+ int64 Timestamp = 2; // 时间戳(毫秒)
+ ActionID Action = 3; // 指令ID
+ sint32 DirX = 4; // 移动-X方向(×100 缩放)
+ sint32 DirY = 5; // 移动-Y方向(×100 缩放)
+ int32 SkillID = 6; // 攻击-技能ID
}
// MESSAGE_ID_POSITION
message PositionInfo {
int32 UID = 1;
- double X = 2;
- double Y = 3;
+ sint32 X = 2;
+ sint32 Y = 3;
}
message S2C_Position {
repeated PositionInfo Info = 1;
diff --git a/Public/Proto/ServerInternal/gen/common/proto/ss/grpc_pb/service_scene.pb.go b/Public/Proto/ServerInternal/gen/common/proto/ss/grpc_pb/service_scene.pb.go
index a1d0386..ec32954 100644
--- a/Public/Proto/ServerInternal/gen/common/proto/ss/grpc_pb/service_scene.pb.go
+++ b/Public/Proto/ServerInternal/gen/common/proto/ss/grpc_pb/service_scene.pb.go
@@ -89,8 +89,10 @@ type EnterResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- SceneSID int64 `protobuf:"varint,1,opt,name=SceneSID,proto3" json:"SceneSID,omitempty"` // 场景服务ID
- UniqueNo int64 `protobuf:"varint,2,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
+ SceneSID int64 `protobuf:"varint,1,opt,name=SceneSID,proto3" json:"SceneSID,omitempty"` // 场景服务ID
+ UniqueNo int64 `protobuf:"varint,2,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
+ MessageID int32 `protobuf:"varint,3,opt,name=MessageID,proto3" json:"MessageID,omitempty"` // 发送给客户端的消息ID
+ Payload []byte `protobuf:"bytes,4,opt,name=Payload,proto3" json:"Payload,omitempty"` // 消息负载
}
func (x *EnterResp) Reset() {
@@ -139,21 +141,146 @@ func (x *EnterResp) GetUniqueNo() int64 {
return 0
}
+func (x *EnterResp) GetMessageID() int32 {
+ if x != nil {
+ return x.MessageID
+ }
+ return 0
+}
+
+func (x *EnterResp) GetPayload() []byte {
+ if x != nil {
+ return x.Payload
+ }
+ return nil
+}
+
+type LeaveReq struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ UID int32 `protobuf:"varint,1,opt,name=UID,proto3" json:"UID,omitempty"` // 用户ID
+ GatewaySID int64 `protobuf:"varint,2,opt,name=GatewaySID,proto3" json:"GatewaySID,omitempty"` // 网关服务ID
+ InstanceID int32 `protobuf:"varint,3,opt,name=InstanceID,proto3" json:"InstanceID,omitempty"` // 副本ID
+ UniqueNo int64 `protobuf:"varint,4,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
+}
+
+func (x *LeaveReq) Reset() {
+ *x = LeaveReq{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_service_scene_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LeaveReq) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LeaveReq) ProtoMessage() {}
+
+func (x *LeaveReq) ProtoReflect() protoreflect.Message {
+ mi := &file_service_scene_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 LeaveReq.ProtoReflect.Descriptor instead.
+func (*LeaveReq) Descriptor() ([]byte, []int) {
+ return file_service_scene_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *LeaveReq) GetUID() int32 {
+ if x != nil {
+ return x.UID
+ }
+ return 0
+}
+
+func (x *LeaveReq) GetGatewaySID() int64 {
+ if x != nil {
+ return x.GatewaySID
+ }
+ return 0
+}
+
+func (x *LeaveReq) GetInstanceID() int32 {
+ if x != nil {
+ return x.InstanceID
+ }
+ return 0
+}
+
+func (x *LeaveReq) GetUniqueNo() int64 {
+ if x != nil {
+ return x.UniqueNo
+ }
+ return 0
+}
+
+type LeaveResp struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *LeaveResp) Reset() {
+ *x = LeaveResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_service_scene_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LeaveResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LeaveResp) ProtoMessage() {}
+
+func (x *LeaveResp) ProtoReflect() protoreflect.Message {
+ mi := &file_service_scene_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 LeaveResp.ProtoReflect.Descriptor instead.
+func (*LeaveResp) Descriptor() ([]byte, []int) {
+ return file_service_scene_proto_rawDescGZIP(), []int{3}
+}
+
type ActionReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- UniqueNo int64 `protobuf:"varint,1,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
- UID int32 `protobuf:"varint,2,opt,name=UID,proto3" json:"UID,omitempty"` // 用户ID
- Action int32 `protobuf:"varint,3,opt,name=Action,proto3" json:"Action,omitempty"` // 动作ID
- Payload []byte `protobuf:"bytes,4,opt,name=Payload,proto3" json:"Payload,omitempty"` // 动作数据
+ UniqueNo int64 `protobuf:"varint,1,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
+ UID int32 `protobuf:"varint,2,opt,name=UID,proto3" json:"UID,omitempty"` // 用户ID
+ Action int32 `protobuf:"varint,3,opt,name=Action,proto3" json:"Action,omitempty"` // 指令ID
+ DirX int32 `protobuf:"zigzag32,4,opt,name=DirX,proto3" json:"DirX,omitempty"` // 移动-X方向(×1000 缩放)
+ DirY int32 `protobuf:"zigzag32,5,opt,name=DirY,proto3" json:"DirY,omitempty"` // 移动-Y方向(×1000 缩放)
+ SkillID int32 `protobuf:"varint,6,opt,name=SkillID,proto3" json:"SkillID,omitempty"` // 攻击-技能ID
}
func (x *ActionReq) Reset() {
*x = ActionReq{}
if protoimpl.UnsafeEnabled {
- mi := &file_service_scene_proto_msgTypes[2]
+ mi := &file_service_scene_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -166,7 +293,7 @@ func (x *ActionReq) String() string {
func (*ActionReq) ProtoMessage() {}
func (x *ActionReq) ProtoReflect() protoreflect.Message {
- mi := &file_service_scene_proto_msgTypes[2]
+ mi := &file_service_scene_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -179,7 +306,7 @@ func (x *ActionReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use ActionReq.ProtoReflect.Descriptor instead.
func (*ActionReq) Descriptor() ([]byte, []int) {
- return file_service_scene_proto_rawDescGZIP(), []int{2}
+ return file_service_scene_proto_rawDescGZIP(), []int{4}
}
func (x *ActionReq) GetUniqueNo() int64 {
@@ -203,11 +330,25 @@ func (x *ActionReq) GetAction() int32 {
return 0
}
-func (x *ActionReq) GetPayload() []byte {
+func (x *ActionReq) GetDirX() int32 {
if x != nil {
- return x.Payload
+ return x.DirX
}
- return nil
+ return 0
+}
+
+func (x *ActionReq) GetDirY() int32 {
+ if x != nil {
+ return x.DirY
+ }
+ return 0
+}
+
+func (x *ActionReq) GetSkillID() int32 {
+ if x != nil {
+ return x.SkillID
+ }
+ return 0
}
type ActionResp struct {
@@ -219,7 +360,7 @@ type ActionResp struct {
func (x *ActionResp) Reset() {
*x = ActionResp{}
if protoimpl.UnsafeEnabled {
- mi := &file_service_scene_proto_msgTypes[3]
+ mi := &file_service_scene_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -232,7 +373,7 @@ func (x *ActionResp) String() string {
func (*ActionResp) ProtoMessage() {}
func (x *ActionResp) ProtoReflect() protoreflect.Message {
- mi := &file_service_scene_proto_msgTypes[3]
+ mi := &file_service_scene_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -245,7 +386,7 @@ func (x *ActionResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use ActionResp.ProtoReflect.Descriptor instead.
func (*ActionResp) Descriptor() ([]byte, []int) {
- return file_service_scene_proto_rawDescGZIP(), []int{3}
+ return file_service_scene_proto_rawDescGZIP(), []int{5}
}
var File_service_scene_proto protoreflect.FileDescriptor
@@ -259,26 +400,43 @@ var file_service_scene_proto_rawDesc = []byte{
0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61,
0x79, 0x53, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,
- 0x63, 0x65, 0x49, 0x44, 0x22, 0x43, 0x0a, 0x09, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73,
+ 0x63, 0x65, 0x49, 0x44, 0x22, 0x7b, 0x0a, 0x09, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73,
0x70, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x53, 0x49, 0x44, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x08, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x53, 0x49, 0x44, 0x12, 0x1a, 0x0a,
0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
- 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x22, 0x6b, 0x0a, 0x09, 0x41, 0x63, 0x74,
+ 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x65,
+ 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f,
+ 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61,
+ 0x64, 0x22, 0x78, 0x0a, 0x08, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a,
+ 0x03, 0x55, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x55, 0x49, 0x44, 0x12,
+ 0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x49, 0x44, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x03, 0x52, 0x0a, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x49, 0x44, 0x12,
+ 0x1e, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x05, 0x52, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x12,
+ 0x1a, 0x0a, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x03, 0x52, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x22, 0x0b, 0x0a, 0x09, 0x4c,
+ 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x93, 0x01, 0x0a, 0x09, 0x41, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65,
0x4e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65,
0x4e, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x03, 0x55, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07,
- 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50,
- 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x0c, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x52, 0x65, 0x73, 0x70, 0x32, 0x50, 0x0a, 0x05, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x12, 0x20, 0x0a,
- 0x05, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x09, 0x2e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65,
- 0x71, 0x1a, 0x0a, 0x2e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12,
- 0x25, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x2e, 0x41, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x0b, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
- 0x73, 0x70, 0x22, 0x00, 0x28, 0x01, 0x42, 0x19, 0x5a, 0x17, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
- 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x70,
- 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04,
+ 0x44, 0x69, 0x72, 0x58, 0x18, 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x04, 0x44, 0x69, 0x72, 0x58,
+ 0x12, 0x12, 0x0a, 0x04, 0x44, 0x69, 0x72, 0x59, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, 0x52, 0x04,
+ 0x44, 0x69, 0x72, 0x59, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x18,
+ 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x22, 0x0c,
+ 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x32, 0x72, 0x0a, 0x05,
+ 0x53, 0x63, 0x65, 0x6e, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x09,
+ 0x2e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x45, 0x6e, 0x74, 0x65,
+ 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x20, 0x0a, 0x05, 0x4c, 0x65, 0x61, 0x76, 0x65,
+ 0x12, 0x09, 0x2e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x4c, 0x65,
+ 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x25, 0x0a, 0x06, 0x41, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a,
+ 0x0b, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x28, 0x01,
+ 0x42, 0x19, 0x5a, 0x17, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x2f, 0x73, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x33,
}
var (
@@ -293,20 +451,24 @@ func file_service_scene_proto_rawDescGZIP() []byte {
return file_service_scene_proto_rawDescData
}
-var file_service_scene_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_service_scene_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_service_scene_proto_goTypes = []interface{}{
(*EnterReq)(nil), // 0: EnterReq
(*EnterResp)(nil), // 1: EnterResp
- (*ActionReq)(nil), // 2: ActionReq
- (*ActionResp)(nil), // 3: ActionResp
+ (*LeaveReq)(nil), // 2: LeaveReq
+ (*LeaveResp)(nil), // 3: LeaveResp
+ (*ActionReq)(nil), // 4: ActionReq
+ (*ActionResp)(nil), // 5: ActionResp
}
var file_service_scene_proto_depIdxs = []int32{
0, // 0: Scene.Enter:input_type -> EnterReq
- 2, // 1: Scene.Action:input_type -> ActionReq
- 1, // 2: Scene.Enter:output_type -> EnterResp
- 3, // 3: Scene.Action:output_type -> ActionResp
- 2, // [2:4] is the sub-list for method output_type
- 0, // [0:2] is the sub-list for method input_type
+ 2, // 1: Scene.Leave:input_type -> LeaveReq
+ 4, // 2: Scene.Action:input_type -> ActionReq
+ 1, // 3: Scene.Enter:output_type -> EnterResp
+ 3, // 4: Scene.Leave:output_type -> LeaveResp
+ 5, // 5: Scene.Action:output_type -> ActionResp
+ 3, // [3:6] is the sub-list for method output_type
+ 0, // [0:3] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
@@ -343,7 +505,7 @@ func file_service_scene_proto_init() {
}
}
file_service_scene_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ActionReq); i {
+ switch v := v.(*LeaveReq); i {
case 0:
return &v.state
case 1:
@@ -355,6 +517,30 @@ func file_service_scene_proto_init() {
}
}
file_service_scene_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LeaveResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_service_scene_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ActionReq); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_service_scene_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ActionResp); i {
case 0:
return &v.state
@@ -373,7 +559,7 @@ func file_service_scene_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_scene_proto_rawDesc,
NumEnums: 0,
- NumMessages: 4,
+ NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/Public/Proto/ServerInternal/gen/common/proto/ss/grpc_pb/service_scene_grpc.pb.go b/Public/Proto/ServerInternal/gen/common/proto/ss/grpc_pb/service_scene_grpc.pb.go
index 6a7dfe0..b2063a3 100644
--- a/Public/Proto/ServerInternal/gen/common/proto/ss/grpc_pb/service_scene_grpc.pb.go
+++ b/Public/Proto/ServerInternal/gen/common/proto/ss/grpc_pb/service_scene_grpc.pb.go
@@ -23,6 +23,7 @@ const _ = grpc.SupportPackageIsVersion7
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type SceneClient interface {
Enter(ctx context.Context, in *EnterReq, opts ...grpc.CallOption) (*EnterResp, error)
+ Leave(ctx context.Context, in *LeaveReq, opts ...grpc.CallOption) (*LeaveResp, error)
Action(ctx context.Context, opts ...grpc.CallOption) (Scene_ActionClient, error)
}
@@ -43,6 +44,15 @@ func (c *sceneClient) Enter(ctx context.Context, in *EnterReq, opts ...grpc.Call
return out, nil
}
+func (c *sceneClient) Leave(ctx context.Context, in *LeaveReq, opts ...grpc.CallOption) (*LeaveResp, error) {
+ out := new(LeaveResp)
+ err := c.cc.Invoke(ctx, "/Scene/Leave", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
func (c *sceneClient) Action(ctx context.Context, opts ...grpc.CallOption) (Scene_ActionClient, error) {
stream, err := c.cc.NewStream(ctx, &Scene_ServiceDesc.Streams[0], "/Scene/Action", opts...)
if err != nil {
@@ -82,6 +92,7 @@ func (x *sceneActionClient) CloseAndRecv() (*ActionResp, error) {
// for forward compatibility
type SceneServer interface {
Enter(context.Context, *EnterReq) (*EnterResp, error)
+ Leave(context.Context, *LeaveReq) (*LeaveResp, error)
Action(Scene_ActionServer) error
mustEmbedUnimplementedSceneServer()
}
@@ -93,6 +104,9 @@ type UnimplementedSceneServer struct {
func (UnimplementedSceneServer) Enter(context.Context, *EnterReq) (*EnterResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method Enter not implemented")
}
+func (UnimplementedSceneServer) Leave(context.Context, *LeaveReq) (*LeaveResp, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method Leave not implemented")
+}
func (UnimplementedSceneServer) Action(Scene_ActionServer) error {
return status.Errorf(codes.Unimplemented, "method Action not implemented")
}
@@ -127,6 +141,24 @@ func _Scene_Enter_Handler(srv interface{}, ctx context.Context, dec func(interfa
return interceptor(ctx, in, info, handler)
}
+func _Scene_Leave_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(LeaveReq)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SceneServer).Leave(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/Scene/Leave",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SceneServer).Leave(ctx, req.(*LeaveReq))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _Scene_Action_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(SceneServer).Action(&sceneActionServer{stream})
}
@@ -164,6 +196,10 @@ var Scene_ServiceDesc = grpc.ServiceDesc{
MethodName: "Enter",
Handler: _Scene_Enter_Handler,
},
+ {
+ MethodName: "Leave",
+ Handler: _Scene_Leave_Handler,
+ },
},
Streams: []grpc.StreamDesc{
{
diff --git a/Public/Proto/ServerInternal/gen_proto.bat b/Public/Proto/ServerInternal/gen_proto.bat
index be4b620..d975972 100644
--- a/Public/Proto/ServerInternal/gen_proto.bat
+++ b/Public/Proto/ServerInternal/gen_proto.bat
@@ -1,4 +1,8 @@
@echo off
+if not exist "./gen" (
+ mkdir "./gen"
+)
+
protoc --proto_path=./sources --go_out=./gen --go-grpc_out=./gen ./sources/*.proto
xcopy "./gen/common" "../../../Server/common" /E /I /Y /Q
\ No newline at end of file
diff --git a/Public/Proto/ServerInternal/sources/service_scene.proto b/Public/Proto/ServerInternal/sources/service_scene.proto
index 1fdd9b5..6cce012 100644
--- a/Public/Proto/ServerInternal/sources/service_scene.proto
+++ b/Public/Proto/ServerInternal/sources/service_scene.proto
@@ -5,6 +5,7 @@ import "ss_common.proto";
service Scene {
rpc Enter(EnterReq) returns (EnterResp) {}
+ rpc Leave(LeaveReq) returns (LeaveResp) {}
rpc Action(stream ActionReq) returns (ActionResp) {}
}
@@ -17,13 +18,27 @@ message EnterReq {
message EnterResp {
int64 SceneSID = 1; // 场景服务ID
int64 UniqueNo = 2; // 副本唯一编号
+ int32 MessageID = 3; // 发送给客户端的消息ID
+ bytes Payload = 4; // 消息负载
+}
+
+message LeaveReq {
+ int32 UID = 1; // 用户ID
+ int64 GatewaySID = 2; // 网关服务ID
+ int32 InstanceID = 3; // 副本ID
+ int64 UniqueNo = 4; // 副本唯一编号
+}
+
+message LeaveResp {
}
message ActionReq {
int64 UniqueNo = 1; // 副本唯一编号
int32 UID = 2; // 用户ID
- int32 Action = 3; // 动作ID
- bytes Payload = 4; // 动作数据
+ int32 Action = 3; // 指令ID
+ sint32 DirX = 4; // 移动-X方向(×1000 缩放)
+ sint32 DirY = 5; // 移动-Y方向(×1000 缩放)
+ int32 SkillID = 6; // 攻击-技能ID
}
message ActionResp {
diff --git a/Server/gateway/grpc_server/server/server.go b/Server/gateway/grpc_server/server/server.go
index d0a2754..29539e1 100644
--- a/Server/gateway/grpc_server/server/server.go
+++ b/Server/gateway/grpc_server/server/server.go
@@ -27,7 +27,6 @@ func (s *Server) ToClient(server grpc_pb.Gateway_ToClientServer) error {
client.WriteBytes(sc_pb.MessageID(args.MessageID), args.Payload)
}
} else {
- if client := ws_handler.UserMgr.GetByUID(int(args.UID)); client != nil {
if client := ws_handler.UserMgr.GetByUID(args.UID); client != nil {
client.WriteBytes(sc_pb.MessageID(args.MessageID), args.Payload)
}