归档!
This commit is contained in:
@@ -24,6 +24,7 @@ public class PlayerManager : MonoBehaviour
|
||||
|
||||
private void Start()
|
||||
{
|
||||
SocketMessageManager.Instance.Subscribe(MessageID.LoginSuccess, OnLoginSuccess);
|
||||
SocketMessageManager.Instance.Subscribe(MessageID.EnterInstance, OnEnterInstance);
|
||||
SocketMessageManager.Instance.Subscribe(MessageID.Position, OnPosition);
|
||||
SocketManager.Instance.Connect();
|
||||
@@ -39,6 +40,15 @@ public class PlayerManager : MonoBehaviour
|
||||
return player;
|
||||
}
|
||||
|
||||
private void OnLoginSuccess(ByteString msg)
|
||||
{
|
||||
var loginSuccess = S2C_LoginSuccess.Parser.ParseFrom(msg);
|
||||
SocketManager.Instance.SendMessage(MessageID.EnterInstance, new C2S_EnterInstance
|
||||
{
|
||||
InstanceID = loginSuccess.InstanceID
|
||||
});
|
||||
}
|
||||
|
||||
private void OnEnterInstance(ByteString msg)
|
||||
{
|
||||
var enterInstance = S2C_EnterInstance.Parser.ParseFrom(msg);
|
||||
|
||||
@@ -1,6 +1,25 @@
|
||||
using System.Collections;
|
||||
using Google.Protobuf;
|
||||
using NativeWebSocket;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
[System.Serializable]
|
||||
public class LoginResponse
|
||||
{
|
||||
public int code;
|
||||
public string msg;
|
||||
public Data data;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class Data
|
||||
{
|
||||
public long usn;
|
||||
public string name;
|
||||
public string accessToken;
|
||||
public string refreshToken;
|
||||
}
|
||||
|
||||
public class SocketManager : MonoBehaviour
|
||||
{
|
||||
@@ -21,17 +40,12 @@ public class SocketManager : MonoBehaviour
|
||||
|
||||
public async void Connect()
|
||||
{
|
||||
// _ws = new WebSocket($"wss://www.hlsq.asia/ws/?token={Random.Range(1, 1000)}");
|
||||
_ws = new WebSocket($"ws://127.0.0.1:8501/?token={Random.Range(1, 1000)}");
|
||||
var token = await GetTokenAsync();
|
||||
|
||||
_ws.OnOpen += () =>
|
||||
{
|
||||
Debug.Log("Connection open!");
|
||||
SendMessage(MessageID.EnterInstance, new C2S_EnterInstance
|
||||
{
|
||||
InstanceID = 1
|
||||
});
|
||||
};
|
||||
// _ws = new WebSocket($"wss://www.hlsq.asia/ws/?token={Random.Range(1, 1000)}");
|
||||
_ws = new WebSocket($"ws://127.0.0.1:8501/?token={token}");
|
||||
|
||||
_ws.OnOpen += () => { Debug.Log("Connection open!"); };
|
||||
|
||||
_ws.OnError += (e) => { Debug.Log("Error! " + e); };
|
||||
|
||||
@@ -47,6 +61,28 @@ public class SocketManager : MonoBehaviour
|
||||
await _ws.Connect();
|
||||
}
|
||||
|
||||
private async System.Threading.Tasks.Task<string> GetTokenAsync()
|
||||
{
|
||||
string token = "";
|
||||
var tcs = new System.Threading.Tasks.TaskCompletionSource<string>();
|
||||
|
||||
StartCoroutine(HttpPost("http://127.0.0.1:8503/gw/login", "{\"phone\": \"1234\", \"code\": \"1234\"}", (resp) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var r = JsonUtility.FromJson<LoginResponse>(resp);
|
||||
token = r.data.accessToken;
|
||||
tcs.SetResult(token);
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
tcs.SetException(e);
|
||||
}
|
||||
}));
|
||||
|
||||
return await tcs.Task;
|
||||
}
|
||||
|
||||
public void SendMessage(MessageID id, IMessage msg)
|
||||
{
|
||||
var m = new Message
|
||||
@@ -57,6 +93,28 @@ public class SocketManager : MonoBehaviour
|
||||
_ws.Send(m.ToByteArray());
|
||||
}
|
||||
|
||||
public IEnumerator HttpPost(string url, string jsonData, System.Action<string> callback)
|
||||
{
|
||||
var request = new UnityWebRequest(url, "POST");
|
||||
var bodyRaw = System.Text.Encoding.UTF8.GetBytes(jsonData);
|
||||
request.uploadHandler = new UploadHandlerRaw(bodyRaw);
|
||||
request.downloadHandler = new DownloadHandlerBuffer();
|
||||
request.SetRequestHeader("Content-Type", "application/json");
|
||||
|
||||
yield return request.SendWebRequest();
|
||||
|
||||
if (request.result == UnityWebRequest.Result.Success)
|
||||
{
|
||||
callback?.Invoke(request.downloadHandler.text);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("HTTP POST Error: " + request.error);
|
||||
}
|
||||
|
||||
request.Dispose();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
#if !UNITY_WEBGL || UNITY_EDITOR
|
||||
|
||||
@@ -29,9 +29,10 @@ public static partial class ActionReflection {
|
||||
"aW9uGAMgASgOMgkuQWN0aW9uSUQSDAoERGlyWBgEIAEoERIMCgREaXJZGAUg",
|
||||
"ASgREg8KB1NraWxsSUQYBiABKAUiMQoMUG9zaXRpb25JbmZvEgsKA1VTThgB",
|
||||
"IAEoAxIJCgFYGAIgASgREgkKAVkYAyABKBEiKwoMUzJDX1Bvc2l0aW9uEhsK",
|
||||
"BEluZm8YASADKAsyDS5Qb3NpdGlvbkluZm8qNAoIQWN0aW9uSUQSEgoOQUNU",
|
||||
"SU9OX0lEX01PVkUQABIUChBBQ1RJT05fSURfQVRUQUNLEAFCF1oVY29tbW9u",
|
||||
"L3Byb3RvL3NjL3NjX3BiYgZwcm90bzM="));
|
||||
"BEluZm8YASADKAsyDS5Qb3NpdGlvbkluZm8qSwoIQWN0aW9uSUQSFQoRQUNU",
|
||||
"SU9OX0lEX0lOVkFMSUQQABISCg5BQ1RJT05fSURfTU9WRRABEhQKEEFDVElP",
|
||||
"Tl9JRF9BVFRBQ0sQAkIXWhVjb21tb24vcHJvdG8vc2Mvc2NfcGJiBnByb3Rv",
|
||||
"Mw=="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { global::ScCommonReflection.Descriptor, },
|
||||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ActionID), }, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
@@ -50,14 +51,15 @@ public static partial class ActionReflection {
|
||||
/// MESSAGE_ID_ACTION
|
||||
/// </summary>
|
||||
public enum ActionID {
|
||||
[pbr::OriginalName("ACTION_ID_INVALID")] Invalid = 0,
|
||||
/// <summary>
|
||||
/// 移动
|
||||
/// </summary>
|
||||
[pbr::OriginalName("ACTION_ID_MOVE")] Move = 0,
|
||||
[pbr::OriginalName("ACTION_ID_MOVE")] Move = 1,
|
||||
/// <summary>
|
||||
/// 攻击
|
||||
/// </summary>
|
||||
[pbr::OriginalName("ACTION_ID_ATTACK")] Attack = 1,
|
||||
[pbr::OriginalName("ACTION_ID_ATTACK")] Attack = 2,
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -537,7 +539,7 @@ public sealed partial class C2S_Action : pb::IMessage<C2S_Action>
|
||||
|
||||
/// <summary>Field number for the "Action" field.</summary>
|
||||
public const int ActionFieldNumber = 3;
|
||||
private global::ActionID action_ = global::ActionID.Move;
|
||||
private global::ActionID action_ = global::ActionID.Invalid;
|
||||
/// <summary>
|
||||
/// 指令ID
|
||||
/// </summary>
|
||||
@@ -625,7 +627,7 @@ public sealed partial class C2S_Action : pb::IMessage<C2S_Action>
|
||||
int hash = 1;
|
||||
if (Sequence != 0) hash ^= Sequence.GetHashCode();
|
||||
if (Timestamp != 0L) hash ^= Timestamp.GetHashCode();
|
||||
if (Action != global::ActionID.Move) hash ^= Action.GetHashCode();
|
||||
if (Action != global::ActionID.Invalid) hash ^= Action.GetHashCode();
|
||||
if (DirX != 0) hash ^= DirX.GetHashCode();
|
||||
if (DirY != 0) hash ^= DirY.GetHashCode();
|
||||
if (SkillID != 0) hash ^= SkillID.GetHashCode();
|
||||
@@ -655,7 +657,7 @@ public sealed partial class C2S_Action : pb::IMessage<C2S_Action>
|
||||
output.WriteRawTag(16);
|
||||
output.WriteInt64(Timestamp);
|
||||
}
|
||||
if (Action != global::ActionID.Move) {
|
||||
if (Action != global::ActionID.Invalid) {
|
||||
output.WriteRawTag(24);
|
||||
output.WriteEnum((int) Action);
|
||||
}
|
||||
@@ -689,7 +691,7 @@ public sealed partial class C2S_Action : pb::IMessage<C2S_Action>
|
||||
output.WriteRawTag(16);
|
||||
output.WriteInt64(Timestamp);
|
||||
}
|
||||
if (Action != global::ActionID.Move) {
|
||||
if (Action != global::ActionID.Invalid) {
|
||||
output.WriteRawTag(24);
|
||||
output.WriteEnum((int) Action);
|
||||
}
|
||||
@@ -721,7 +723,7 @@ public sealed partial class C2S_Action : pb::IMessage<C2S_Action>
|
||||
if (Timestamp != 0L) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Timestamp);
|
||||
}
|
||||
if (Action != global::ActionID.Move) {
|
||||
if (Action != global::ActionID.Invalid) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Action);
|
||||
}
|
||||
if (DirX != 0) {
|
||||
@@ -751,7 +753,7 @@ public sealed partial class C2S_Action : pb::IMessage<C2S_Action>
|
||||
if (other.Timestamp != 0L) {
|
||||
Timestamp = other.Timestamp;
|
||||
}
|
||||
if (other.Action != global::ActionID.Move) {
|
||||
if (other.Action != global::ActionID.Invalid) {
|
||||
Action = other.Action;
|
||||
}
|
||||
if (other.DirX != 0) {
|
||||
|
||||
@@ -23,11 +23,12 @@ public static partial class DefineReflection {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"CgxkZWZpbmUucHJvdG8aD3NjX2NvbW1vbi5wcm90byIyCgdNZXNzYWdlEhYK",
|
||||
"AklEGAEgASgOMgouTWVzc2FnZUlEEg8KB1BheWxvYWQYAiABKAwqcgoJTWVz",
|
||||
"c2FnZUlEEhYKEk1FU1NBR0VfSURfSU5WQUxJRBAAEh0KGU1FU1NBR0VfSURf",
|
||||
"RU5URVJfSU5TVEFOQ0UQARIVChFNRVNTQUdFX0lEX0FDVElPThACEhcKE01F",
|
||||
"U1NBR0VfSURfUE9TSVRJT04QA0IXWhVjb21tb24vcHJvdG8vc2Mvc2NfcGJi",
|
||||
"BnByb3RvMw=="));
|
||||
"AklEGAEgASgOMgouTWVzc2FnZUlEEg8KB1BheWxvYWQYAiABKAwqwgEKCU1l",
|
||||
"c3NhZ2VJRBIWChJNRVNTQUdFX0lEX0lOVkFMSUQQABIXChNNRVNTQUdFX0lE",
|
||||
"X0tJQ0tfT1VUEAESFwoTTUVTU0FHRV9JRF9RVUVVRV9VUBACEhwKGE1FU1NB",
|
||||
"R0VfSURfTE9HSU5fU1VDQ0VTUxADEh0KGU1FU1NBR0VfSURfRU5URVJfSU5T",
|
||||
"VEFOQ0UQZRIVChFNRVNTQUdFX0lEX0FDVElPThBmEhcKE01FU1NBR0VfSURf",
|
||||
"UE9TSVRJT04QZ0IXWhVjb21tb24vcHJvdG8vc2Mvc2NfcGJiBnByb3RvMw=="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { global::ScCommonReflection.Descriptor, },
|
||||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::MessageID), }, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
@@ -41,17 +42,29 @@ public static partial class DefineReflection {
|
||||
public enum MessageID {
|
||||
[pbr::OriginalName("MESSAGE_ID_INVALID")] Invalid = 0,
|
||||
/// <summary>
|
||||
/// 服务器踢人
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_KICK_OUT")] KickOut = 1,
|
||||
/// <summary>
|
||||
/// 排队中
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_QUEUE_UP")] QueueUp = 2,
|
||||
/// <summary>
|
||||
/// 登录成功
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_LOGIN_SUCCESS")] LoginSuccess = 3,
|
||||
/// <summary>
|
||||
/// 进入副本
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_ENTER_INSTANCE")] EnterInstance = 1,
|
||||
[pbr::OriginalName("MESSAGE_ID_ENTER_INSTANCE")] EnterInstance = 101,
|
||||
/// <summary>
|
||||
/// 指令
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_ACTION")] Action = 2,
|
||||
[pbr::OriginalName("MESSAGE_ID_ACTION")] Action = 102,
|
||||
/// <summary>
|
||||
/// 位置更新
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_POSITION")] Position = 3,
|
||||
[pbr::OriginalName("MESSAGE_ID_POSITION")] Position = 103,
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
661
Client/Point/Assets/Scripts/Proto/Service.cs
Normal file
661
Client/Point/Assets/Scripts/Proto/Service.cs
Normal file
@@ -0,0 +1,661 @@
|
||||
// <auto-generated>
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: service.proto
|
||||
// </auto-generated>
|
||||
#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;
|
||||
/// <summary>Holder for reflection information generated from service.proto</summary>
|
||||
public static partial class ServiceReflection {
|
||||
|
||||
#region Descriptor
|
||||
/// <summary>File descriptor for service.proto</summary>
|
||||
public static pbr::FileDescriptor Descriptor {
|
||||
get { return descriptor; }
|
||||
}
|
||||
private static pbr::FileDescriptor descriptor;
|
||||
|
||||
static ServiceReflection() {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"Cg1zZXJ2aWNlLnByb3RvGg9zY19jb21tb24ucHJvdG8iJQoLUzJDX0tpY2tP",
|
||||
"dXQSFgoCSUQYASABKA4yCi5LaWNrT3V0SUQiIwoLUzJDX1F1ZXVlVXASFAoM",
|
||||
"UXVldWVVcENvdW50GAEgASgFIiYKEFMyQ19Mb2dpblN1Y2Nlc3MSEgoKSW5z",
|
||||
"dGFuY2VJRBgBIAEoBSq+AQoJS2lja091dElEEhcKE0tJQ0tfT1VUX0lEX0lO",
|
||||
"VkFMSUQQABIfChtLSUNLX09VVF9JRF9EVVBMSUNBVEVfTE9HSU4QARIbChdL",
|
||||
"SUNLX09VVF9JRF9TRVJWRVJfQlVTWRACEhwKGEtJQ0tfT1VUX0lEX1NFUlZF",
|
||||
"Ul9DTE9TRRADEh0KGUtJQ0tfT1VUX0lEX1FVRVVFX1VQX0ZVTEwQBBIdChlL",
|
||||
"SUNLX09VVF9JRF9UT0tFTl9JTlZBTElEEAVCF1oVY29tbW9uL3Byb3RvL3Nj",
|
||||
"L3NjX3BiYgZwcm90bzM="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { global::ScCommonReflection.Descriptor, },
|
||||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::KickOutID), }, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::S2C_KickOut), global::S2C_KickOut.Parser, new[]{ "ID" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::S2C_QueueUp), global::S2C_QueueUp.Parser, new[]{ "QueueUpCount" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::S2C_LoginSuccess), global::S2C_LoginSuccess.Parser, new[]{ "InstanceID" }, null, null, null, null)
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Enums
|
||||
/// <summary>
|
||||
/// MESSAGE_ID_KICK_OUT
|
||||
/// </summary>
|
||||
public enum KickOutID {
|
||||
[pbr::OriginalName("KICK_OUT_ID_INVALID")] Invalid = 0,
|
||||
/// <summary>
|
||||
/// 重复登录
|
||||
/// </summary>
|
||||
[pbr::OriginalName("KICK_OUT_ID_DUPLICATE_LOGIN")] DuplicateLogin = 1,
|
||||
/// <summary>
|
||||
/// 服务器繁忙
|
||||
/// </summary>
|
||||
[pbr::OriginalName("KICK_OUT_ID_SERVER_BUSY")] ServerBusy = 2,
|
||||
/// <summary>
|
||||
/// 服务器关闭
|
||||
/// </summary>
|
||||
[pbr::OriginalName("KICK_OUT_ID_SERVER_CLOSE")] ServerClose = 3,
|
||||
/// <summary>
|
||||
/// 排队上限
|
||||
/// </summary>
|
||||
[pbr::OriginalName("KICK_OUT_ID_QUEUE_UP_FULL")] QueueUpFull = 4,
|
||||
/// <summary>
|
||||
/// Token无效
|
||||
/// </summary>
|
||||
[pbr::OriginalName("KICK_OUT_ID_TOKEN_INVALID")] TokenInvalid = 5,
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Messages
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class S2C_KickOut : pb::IMessage<S2C_KickOut>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<S2C_KickOut> _parser = new pb::MessageParser<S2C_KickOut>(() => new S2C_KickOut());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<S2C_KickOut> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::ServiceReflection.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 S2C_KickOut() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_KickOut(S2C_KickOut other) : this() {
|
||||
iD_ = other.iD_;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_KickOut Clone() {
|
||||
return new S2C_KickOut(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "ID" field.</summary>
|
||||
public const int IDFieldNumber = 1;
|
||||
private global::KickOutID iD_ = global::KickOutID.Invalid;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public global::KickOutID ID {
|
||||
get { return iD_; }
|
||||
set {
|
||||
iD_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as S2C_KickOut);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(S2C_KickOut other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
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 (ID != global::KickOutID.Invalid) 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 (ID != global::KickOutID.Invalid) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteEnum((int) 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 (ID != global::KickOutID.Invalid) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteEnum((int) 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 (ID != global::KickOutID.Invalid) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ID);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(S2C_KickOut other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.ID != global::KickOutID.Invalid) {
|
||||
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 8: {
|
||||
ID = (global::KickOutID) input.ReadEnum();
|
||||
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::KickOutID) input.ReadEnum();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MESSAGE_ID_QUEUE_UP
|
||||
/// </summary>
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class S2C_QueueUp : pb::IMessage<S2C_QueueUp>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<S2C_QueueUp> _parser = new pb::MessageParser<S2C_QueueUp>(() => new S2C_QueueUp());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<S2C_QueueUp> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::ServiceReflection.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_QueueUp() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_QueueUp(S2C_QueueUp other) : this() {
|
||||
queueUpCount_ = other.queueUpCount_;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_QueueUp Clone() {
|
||||
return new S2C_QueueUp(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "QueueUpCount" field.</summary>
|
||||
public const int QueueUpCountFieldNumber = 1;
|
||||
private int queueUpCount_;
|
||||
/// <summary>
|
||||
/// 排队人数
|
||||
/// </summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int QueueUpCount {
|
||||
get { return queueUpCount_; }
|
||||
set {
|
||||
queueUpCount_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as S2C_QueueUp);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(S2C_QueueUp other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (QueueUpCount != other.QueueUpCount) 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 (QueueUpCount != 0) hash ^= QueueUpCount.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 (QueueUpCount != 0) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt32(QueueUpCount);
|
||||
}
|
||||
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 (QueueUpCount != 0) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt32(QueueUpCount);
|
||||
}
|
||||
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 (QueueUpCount != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeInt32Size(QueueUpCount);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(S2C_QueueUp other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.QueueUpCount != 0) {
|
||||
QueueUpCount = other.QueueUpCount;
|
||||
}
|
||||
_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: {
|
||||
QueueUpCount = 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: {
|
||||
QueueUpCount = input.ReadInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MESSAGE_ID_LOGIN_SUCCESS
|
||||
/// </summary>
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class S2C_LoginSuccess : pb::IMessage<S2C_LoginSuccess>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<S2C_LoginSuccess> _parser = new pb::MessageParser<S2C_LoginSuccess>(() => new S2C_LoginSuccess());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<S2C_LoginSuccess> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::ServiceReflection.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 S2C_LoginSuccess() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_LoginSuccess(S2C_LoginSuccess other) : this() {
|
||||
instanceID_ = other.instanceID_;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_LoginSuccess Clone() {
|
||||
return new S2C_LoginSuccess(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "InstanceID" field.</summary>
|
||||
public const int InstanceIDFieldNumber = 1;
|
||||
private int instanceID_;
|
||||
/// <summary>
|
||||
/// 副本ID
|
||||
/// </summary>
|
||||
[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 S2C_LoginSuccess);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(S2C_LoginSuccess 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(S2C_LoginSuccess 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
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#endregion Designer generated code
|
||||
3
Client/Point/Assets/Scripts/Proto/Service.cs.meta
Normal file
3
Client/Point/Assets/Scripts/Proto/Service.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a51699186974d3e8a11d764e0e8c90d
|
||||
timeCreated: 1767689425
|
||||
@@ -29,9 +29,10 @@ public static partial class ActionReflection {
|
||||
"aW9uGAMgASgOMgkuQWN0aW9uSUQSDAoERGlyWBgEIAEoERIMCgREaXJZGAUg",
|
||||
"ASgREg8KB1NraWxsSUQYBiABKAUiMQoMUG9zaXRpb25JbmZvEgsKA1VTThgB",
|
||||
"IAEoAxIJCgFYGAIgASgREgkKAVkYAyABKBEiKwoMUzJDX1Bvc2l0aW9uEhsK",
|
||||
"BEluZm8YASADKAsyDS5Qb3NpdGlvbkluZm8qNAoIQWN0aW9uSUQSEgoOQUNU",
|
||||
"SU9OX0lEX01PVkUQABIUChBBQ1RJT05fSURfQVRUQUNLEAFCF1oVY29tbW9u",
|
||||
"L3Byb3RvL3NjL3NjX3BiYgZwcm90bzM="));
|
||||
"BEluZm8YASADKAsyDS5Qb3NpdGlvbkluZm8qSwoIQWN0aW9uSUQSFQoRQUNU",
|
||||
"SU9OX0lEX0lOVkFMSUQQABISCg5BQ1RJT05fSURfTU9WRRABEhQKEEFDVElP",
|
||||
"Tl9JRF9BVFRBQ0sQAkIXWhVjb21tb24vcHJvdG8vc2Mvc2NfcGJiBnByb3Rv",
|
||||
"Mw=="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { global::ScCommonReflection.Descriptor, },
|
||||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ActionID), }, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
@@ -50,14 +51,15 @@ public static partial class ActionReflection {
|
||||
/// MESSAGE_ID_ACTION
|
||||
/// </summary>
|
||||
public enum ActionID {
|
||||
[pbr::OriginalName("ACTION_ID_INVALID")] Invalid = 0,
|
||||
/// <summary>
|
||||
/// 移动
|
||||
/// </summary>
|
||||
[pbr::OriginalName("ACTION_ID_MOVE")] Move = 0,
|
||||
[pbr::OriginalName("ACTION_ID_MOVE")] Move = 1,
|
||||
/// <summary>
|
||||
/// 攻击
|
||||
/// </summary>
|
||||
[pbr::OriginalName("ACTION_ID_ATTACK")] Attack = 1,
|
||||
[pbr::OriginalName("ACTION_ID_ATTACK")] Attack = 2,
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -537,7 +539,7 @@ public sealed partial class C2S_Action : pb::IMessage<C2S_Action>
|
||||
|
||||
/// <summary>Field number for the "Action" field.</summary>
|
||||
public const int ActionFieldNumber = 3;
|
||||
private global::ActionID action_ = global::ActionID.Move;
|
||||
private global::ActionID action_ = global::ActionID.Invalid;
|
||||
/// <summary>
|
||||
/// 指令ID
|
||||
/// </summary>
|
||||
@@ -625,7 +627,7 @@ public sealed partial class C2S_Action : pb::IMessage<C2S_Action>
|
||||
int hash = 1;
|
||||
if (Sequence != 0) hash ^= Sequence.GetHashCode();
|
||||
if (Timestamp != 0L) hash ^= Timestamp.GetHashCode();
|
||||
if (Action != global::ActionID.Move) hash ^= Action.GetHashCode();
|
||||
if (Action != global::ActionID.Invalid) hash ^= Action.GetHashCode();
|
||||
if (DirX != 0) hash ^= DirX.GetHashCode();
|
||||
if (DirY != 0) hash ^= DirY.GetHashCode();
|
||||
if (SkillID != 0) hash ^= SkillID.GetHashCode();
|
||||
@@ -655,7 +657,7 @@ public sealed partial class C2S_Action : pb::IMessage<C2S_Action>
|
||||
output.WriteRawTag(16);
|
||||
output.WriteInt64(Timestamp);
|
||||
}
|
||||
if (Action != global::ActionID.Move) {
|
||||
if (Action != global::ActionID.Invalid) {
|
||||
output.WriteRawTag(24);
|
||||
output.WriteEnum((int) Action);
|
||||
}
|
||||
@@ -689,7 +691,7 @@ public sealed partial class C2S_Action : pb::IMessage<C2S_Action>
|
||||
output.WriteRawTag(16);
|
||||
output.WriteInt64(Timestamp);
|
||||
}
|
||||
if (Action != global::ActionID.Move) {
|
||||
if (Action != global::ActionID.Invalid) {
|
||||
output.WriteRawTag(24);
|
||||
output.WriteEnum((int) Action);
|
||||
}
|
||||
@@ -721,7 +723,7 @@ public sealed partial class C2S_Action : pb::IMessage<C2S_Action>
|
||||
if (Timestamp != 0L) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Timestamp);
|
||||
}
|
||||
if (Action != global::ActionID.Move) {
|
||||
if (Action != global::ActionID.Invalid) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Action);
|
||||
}
|
||||
if (DirX != 0) {
|
||||
@@ -751,7 +753,7 @@ public sealed partial class C2S_Action : pb::IMessage<C2S_Action>
|
||||
if (other.Timestamp != 0L) {
|
||||
Timestamp = other.Timestamp;
|
||||
}
|
||||
if (other.Action != global::ActionID.Move) {
|
||||
if (other.Action != global::ActionID.Invalid) {
|
||||
Action = other.Action;
|
||||
}
|
||||
if (other.DirX != 0) {
|
||||
|
||||
@@ -23,11 +23,12 @@ public static partial class DefineReflection {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"CgxkZWZpbmUucHJvdG8aD3NjX2NvbW1vbi5wcm90byIyCgdNZXNzYWdlEhYK",
|
||||
"AklEGAEgASgOMgouTWVzc2FnZUlEEg8KB1BheWxvYWQYAiABKAwqcgoJTWVz",
|
||||
"c2FnZUlEEhYKEk1FU1NBR0VfSURfSU5WQUxJRBAAEh0KGU1FU1NBR0VfSURf",
|
||||
"RU5URVJfSU5TVEFOQ0UQARIVChFNRVNTQUdFX0lEX0FDVElPThACEhcKE01F",
|
||||
"U1NBR0VfSURfUE9TSVRJT04QA0IXWhVjb21tb24vcHJvdG8vc2Mvc2NfcGJi",
|
||||
"BnByb3RvMw=="));
|
||||
"AklEGAEgASgOMgouTWVzc2FnZUlEEg8KB1BheWxvYWQYAiABKAwqwgEKCU1l",
|
||||
"c3NhZ2VJRBIWChJNRVNTQUdFX0lEX0lOVkFMSUQQABIXChNNRVNTQUdFX0lE",
|
||||
"X0tJQ0tfT1VUEAESFwoTTUVTU0FHRV9JRF9RVUVVRV9VUBACEhwKGE1FU1NB",
|
||||
"R0VfSURfTE9HSU5fU1VDQ0VTUxADEh0KGU1FU1NBR0VfSURfRU5URVJfSU5T",
|
||||
"VEFOQ0UQZRIVChFNRVNTQUdFX0lEX0FDVElPThBmEhcKE01FU1NBR0VfSURf",
|
||||
"UE9TSVRJT04QZ0IXWhVjb21tb24vcHJvdG8vc2Mvc2NfcGJiBnByb3RvMw=="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { global::ScCommonReflection.Descriptor, },
|
||||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::MessageID), }, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
@@ -41,17 +42,29 @@ public static partial class DefineReflection {
|
||||
public enum MessageID {
|
||||
[pbr::OriginalName("MESSAGE_ID_INVALID")] Invalid = 0,
|
||||
/// <summary>
|
||||
/// 服务器踢人
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_KICK_OUT")] KickOut = 1,
|
||||
/// <summary>
|
||||
/// 排队中
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_QUEUE_UP")] QueueUp = 2,
|
||||
/// <summary>
|
||||
/// 登录成功
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_LOGIN_SUCCESS")] LoginSuccess = 3,
|
||||
/// <summary>
|
||||
/// 进入副本
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_ENTER_INSTANCE")] EnterInstance = 1,
|
||||
[pbr::OriginalName("MESSAGE_ID_ENTER_INSTANCE")] EnterInstance = 101,
|
||||
/// <summary>
|
||||
/// 指令
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_ACTION")] Action = 2,
|
||||
[pbr::OriginalName("MESSAGE_ID_ACTION")] Action = 102,
|
||||
/// <summary>
|
||||
/// 位置更新
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_POSITION")] Position = 3,
|
||||
[pbr::OriginalName("MESSAGE_ID_POSITION")] Position = 103,
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
661
Public/Proto/ServerClient/gen/client/Service.cs
Normal file
661
Public/Proto/ServerClient/gen/client/Service.cs
Normal file
@@ -0,0 +1,661 @@
|
||||
// <auto-generated>
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: service.proto
|
||||
// </auto-generated>
|
||||
#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;
|
||||
/// <summary>Holder for reflection information generated from service.proto</summary>
|
||||
public static partial class ServiceReflection {
|
||||
|
||||
#region Descriptor
|
||||
/// <summary>File descriptor for service.proto</summary>
|
||||
public static pbr::FileDescriptor Descriptor {
|
||||
get { return descriptor; }
|
||||
}
|
||||
private static pbr::FileDescriptor descriptor;
|
||||
|
||||
static ServiceReflection() {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"Cg1zZXJ2aWNlLnByb3RvGg9zY19jb21tb24ucHJvdG8iJQoLUzJDX0tpY2tP",
|
||||
"dXQSFgoCSUQYASABKA4yCi5LaWNrT3V0SUQiIwoLUzJDX1F1ZXVlVXASFAoM",
|
||||
"UXVldWVVcENvdW50GAEgASgFIiYKEFMyQ19Mb2dpblN1Y2Nlc3MSEgoKSW5z",
|
||||
"dGFuY2VJRBgBIAEoBSq+AQoJS2lja091dElEEhcKE0tJQ0tfT1VUX0lEX0lO",
|
||||
"VkFMSUQQABIfChtLSUNLX09VVF9JRF9EVVBMSUNBVEVfTE9HSU4QARIbChdL",
|
||||
"SUNLX09VVF9JRF9TRVJWRVJfQlVTWRACEhwKGEtJQ0tfT1VUX0lEX1NFUlZF",
|
||||
"Ul9DTE9TRRADEh0KGUtJQ0tfT1VUX0lEX1FVRVVFX1VQX0ZVTEwQBBIdChlL",
|
||||
"SUNLX09VVF9JRF9UT0tFTl9JTlZBTElEEAVCF1oVY29tbW9uL3Byb3RvL3Nj",
|
||||
"L3NjX3BiYgZwcm90bzM="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { global::ScCommonReflection.Descriptor, },
|
||||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::KickOutID), }, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::S2C_KickOut), global::S2C_KickOut.Parser, new[]{ "ID" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::S2C_QueueUp), global::S2C_QueueUp.Parser, new[]{ "QueueUpCount" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::S2C_LoginSuccess), global::S2C_LoginSuccess.Parser, new[]{ "InstanceID" }, null, null, null, null)
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Enums
|
||||
/// <summary>
|
||||
/// MESSAGE_ID_KICK_OUT
|
||||
/// </summary>
|
||||
public enum KickOutID {
|
||||
[pbr::OriginalName("KICK_OUT_ID_INVALID")] Invalid = 0,
|
||||
/// <summary>
|
||||
/// 重复登录
|
||||
/// </summary>
|
||||
[pbr::OriginalName("KICK_OUT_ID_DUPLICATE_LOGIN")] DuplicateLogin = 1,
|
||||
/// <summary>
|
||||
/// 服务器繁忙
|
||||
/// </summary>
|
||||
[pbr::OriginalName("KICK_OUT_ID_SERVER_BUSY")] ServerBusy = 2,
|
||||
/// <summary>
|
||||
/// 服务器关闭
|
||||
/// </summary>
|
||||
[pbr::OriginalName("KICK_OUT_ID_SERVER_CLOSE")] ServerClose = 3,
|
||||
/// <summary>
|
||||
/// 排队上限
|
||||
/// </summary>
|
||||
[pbr::OriginalName("KICK_OUT_ID_QUEUE_UP_FULL")] QueueUpFull = 4,
|
||||
/// <summary>
|
||||
/// Token无效
|
||||
/// </summary>
|
||||
[pbr::OriginalName("KICK_OUT_ID_TOKEN_INVALID")] TokenInvalid = 5,
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Messages
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class S2C_KickOut : pb::IMessage<S2C_KickOut>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<S2C_KickOut> _parser = new pb::MessageParser<S2C_KickOut>(() => new S2C_KickOut());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<S2C_KickOut> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::ServiceReflection.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 S2C_KickOut() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_KickOut(S2C_KickOut other) : this() {
|
||||
iD_ = other.iD_;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_KickOut Clone() {
|
||||
return new S2C_KickOut(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "ID" field.</summary>
|
||||
public const int IDFieldNumber = 1;
|
||||
private global::KickOutID iD_ = global::KickOutID.Invalid;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public global::KickOutID ID {
|
||||
get { return iD_; }
|
||||
set {
|
||||
iD_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as S2C_KickOut);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(S2C_KickOut other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
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 (ID != global::KickOutID.Invalid) 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 (ID != global::KickOutID.Invalid) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteEnum((int) 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 (ID != global::KickOutID.Invalid) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteEnum((int) 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 (ID != global::KickOutID.Invalid) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ID);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(S2C_KickOut other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.ID != global::KickOutID.Invalid) {
|
||||
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 8: {
|
||||
ID = (global::KickOutID) input.ReadEnum();
|
||||
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::KickOutID) input.ReadEnum();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MESSAGE_ID_QUEUE_UP
|
||||
/// </summary>
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class S2C_QueueUp : pb::IMessage<S2C_QueueUp>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<S2C_QueueUp> _parser = new pb::MessageParser<S2C_QueueUp>(() => new S2C_QueueUp());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<S2C_QueueUp> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::ServiceReflection.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_QueueUp() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_QueueUp(S2C_QueueUp other) : this() {
|
||||
queueUpCount_ = other.queueUpCount_;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_QueueUp Clone() {
|
||||
return new S2C_QueueUp(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "QueueUpCount" field.</summary>
|
||||
public const int QueueUpCountFieldNumber = 1;
|
||||
private int queueUpCount_;
|
||||
/// <summary>
|
||||
/// 排队人数
|
||||
/// </summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int QueueUpCount {
|
||||
get { return queueUpCount_; }
|
||||
set {
|
||||
queueUpCount_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as S2C_QueueUp);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(S2C_QueueUp other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (QueueUpCount != other.QueueUpCount) 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 (QueueUpCount != 0) hash ^= QueueUpCount.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 (QueueUpCount != 0) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt32(QueueUpCount);
|
||||
}
|
||||
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 (QueueUpCount != 0) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt32(QueueUpCount);
|
||||
}
|
||||
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 (QueueUpCount != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeInt32Size(QueueUpCount);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(S2C_QueueUp other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.QueueUpCount != 0) {
|
||||
QueueUpCount = other.QueueUpCount;
|
||||
}
|
||||
_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: {
|
||||
QueueUpCount = 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: {
|
||||
QueueUpCount = input.ReadInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MESSAGE_ID_LOGIN_SUCCESS
|
||||
/// </summary>
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class S2C_LoginSuccess : pb::IMessage<S2C_LoginSuccess>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<S2C_LoginSuccess> _parser = new pb::MessageParser<S2C_LoginSuccess>(() => new S2C_LoginSuccess());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<S2C_LoginSuccess> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::ServiceReflection.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 S2C_LoginSuccess() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_LoginSuccess(S2C_LoginSuccess other) : this() {
|
||||
instanceID_ = other.instanceID_;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_LoginSuccess Clone() {
|
||||
return new S2C_LoginSuccess(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "InstanceID" field.</summary>
|
||||
public const int InstanceIDFieldNumber = 1;
|
||||
private int instanceID_;
|
||||
/// <summary>
|
||||
/// 副本ID
|
||||
/// </summary>
|
||||
[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 S2C_LoginSuccess);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(S2C_LoginSuccess 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(S2C_LoginSuccess 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
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#endregion Designer generated code
|
||||
@@ -25,19 +25,22 @@ const (
|
||||
type ActionID int32
|
||||
|
||||
const (
|
||||
ActionID_ACTION_ID_MOVE ActionID = 0 // 移动
|
||||
ActionID_ACTION_ID_ATTACK ActionID = 1 // 攻击
|
||||
ActionID_ACTION_ID_INVALID ActionID = 0
|
||||
ActionID_ACTION_ID_MOVE ActionID = 1 // 移动
|
||||
ActionID_ACTION_ID_ATTACK ActionID = 2 // 攻击
|
||||
)
|
||||
|
||||
// Enum value maps for ActionID.
|
||||
var (
|
||||
ActionID_name = map[int32]string{
|
||||
0: "ACTION_ID_MOVE",
|
||||
1: "ACTION_ID_ATTACK",
|
||||
0: "ACTION_ID_INVALID",
|
||||
1: "ACTION_ID_MOVE",
|
||||
2: "ACTION_ID_ATTACK",
|
||||
}
|
||||
ActionID_value = map[string]int32{
|
||||
"ACTION_ID_MOVE": 0,
|
||||
"ACTION_ID_ATTACK": 1,
|
||||
"ACTION_ID_INVALID": 0,
|
||||
"ACTION_ID_MOVE": 1,
|
||||
"ACTION_ID_ATTACK": 2,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -226,7 +229,7 @@ func (x *C2S_Action) GetAction() ActionID {
|
||||
if x != nil {
|
||||
return x.Action
|
||||
}
|
||||
return ActionID_ACTION_ID_MOVE
|
||||
return ActionID_ACTION_ID_INVALID
|
||||
}
|
||||
|
||||
func (x *C2S_Action) GetDirX() int32 {
|
||||
@@ -390,13 +393,14 @@ var file_action_proto_rawDesc = []byte{
|
||||
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,
|
||||
0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x2a, 0x4b, 0x0a, 0x08, 0x41,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x43, 0x54, 0x49, 0x4f,
|
||||
0x4e, 0x5f, 0x49, 0x44, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x12,
|
||||
0x0a, 0x0e, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x5f, 0x4d, 0x4f, 0x56, 0x45,
|
||||
0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x5f,
|
||||
0x41, 0x54, 0x54, 0x41, 0x43, 0x4b, 0x10, 0x02, 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 (
|
||||
|
||||
@@ -25,24 +25,33 @@ type MessageID int32
|
||||
|
||||
const (
|
||||
MessageID_MESSAGE_ID_INVALID MessageID = 0
|
||||
MessageID_MESSAGE_ID_ENTER_INSTANCE MessageID = 1 // 进入副本
|
||||
MessageID_MESSAGE_ID_ACTION MessageID = 2 // 指令
|
||||
MessageID_MESSAGE_ID_POSITION MessageID = 3 // 位置更新
|
||||
MessageID_MESSAGE_ID_KICK_OUT MessageID = 1 // 服务器踢人
|
||||
MessageID_MESSAGE_ID_QUEUE_UP MessageID = 2 // 排队中
|
||||
MessageID_MESSAGE_ID_LOGIN_SUCCESS MessageID = 3 // 登录成功
|
||||
MessageID_MESSAGE_ID_ENTER_INSTANCE MessageID = 101 // 进入副本
|
||||
MessageID_MESSAGE_ID_ACTION MessageID = 102 // 指令
|
||||
MessageID_MESSAGE_ID_POSITION MessageID = 103 // 位置更新
|
||||
)
|
||||
|
||||
// Enum value maps for MessageID.
|
||||
var (
|
||||
MessageID_name = map[int32]string{
|
||||
0: "MESSAGE_ID_INVALID",
|
||||
1: "MESSAGE_ID_ENTER_INSTANCE",
|
||||
2: "MESSAGE_ID_ACTION",
|
||||
3: "MESSAGE_ID_POSITION",
|
||||
0: "MESSAGE_ID_INVALID",
|
||||
1: "MESSAGE_ID_KICK_OUT",
|
||||
2: "MESSAGE_ID_QUEUE_UP",
|
||||
3: "MESSAGE_ID_LOGIN_SUCCESS",
|
||||
101: "MESSAGE_ID_ENTER_INSTANCE",
|
||||
102: "MESSAGE_ID_ACTION",
|
||||
103: "MESSAGE_ID_POSITION",
|
||||
}
|
||||
MessageID_value = map[string]int32{
|
||||
"MESSAGE_ID_INVALID": 0,
|
||||
"MESSAGE_ID_ENTER_INSTANCE": 1,
|
||||
"MESSAGE_ID_ACTION": 2,
|
||||
"MESSAGE_ID_POSITION": 3,
|
||||
"MESSAGE_ID_KICK_OUT": 1,
|
||||
"MESSAGE_ID_QUEUE_UP": 2,
|
||||
"MESSAGE_ID_LOGIN_SUCCESS": 3,
|
||||
"MESSAGE_ID_ENTER_INSTANCE": 101,
|
||||
"MESSAGE_ID_ACTION": 102,
|
||||
"MESSAGE_ID_POSITION": 103,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -137,16 +146,21 @@ var file_define_proto_rawDesc = []byte{
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||
0x49, 0x44, 0x52, 0x02, 0x49, 0x44, 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,
|
||||
0x2a, 0x72, 0x0a, 0x09, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x16, 0x0a,
|
||||
0x12, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x49, 0x4e, 0x56, 0x41,
|
||||
0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45,
|
||||
0x5f, 0x49, 0x44, 0x5f, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e,
|
||||
0x43, 0x45, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f,
|
||||
0x49, 0x44, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x4d,
|
||||
0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49,
|
||||
0x4f, 0x4e, 0x10, 0x03, 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,
|
||||
0x2a, 0xc2, 0x01, 0x0a, 0x09, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x16,
|
||||
0x0a, 0x12, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x49, 0x4e, 0x56,
|
||||
0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47,
|
||||
0x45, 0x5f, 0x49, 0x44, 0x5f, 0x4b, 0x49, 0x43, 0x4b, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12,
|
||||
0x17, 0x0a, 0x13, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x51, 0x55,
|
||||
0x45, 0x55, 0x45, 0x5f, 0x55, 0x50, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53,
|
||||
0x41, 0x47, 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x5f, 0x53, 0x55, 0x43,
|
||||
0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47,
|
||||
0x45, 0x5f, 0x49, 0x44, 0x5f, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41,
|
||||
0x4e, 0x43, 0x45, 0x10, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45,
|
||||
0x5f, 0x49, 0x44, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x66, 0x12, 0x17, 0x0a, 0x13,
|
||||
0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54,
|
||||
0x49, 0x4f, 0x4e, 0x10, 0x67, 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 (
|
||||
|
||||
@@ -0,0 +1,348 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.32.0
|
||||
// protoc v4.25.1
|
||||
// source: service.proto
|
||||
|
||||
package sc_pb
|
||||
|
||||
import (
|
||||
_ "common/proto/sc/sc_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)
|
||||
)
|
||||
|
||||
// MESSAGE_ID_KICK_OUT
|
||||
type KickOutID int32
|
||||
|
||||
const (
|
||||
KickOutID_KICK_OUT_ID_INVALID KickOutID = 0
|
||||
KickOutID_KICK_OUT_ID_DUPLICATE_LOGIN KickOutID = 1 // 重复登录
|
||||
KickOutID_KICK_OUT_ID_SERVER_BUSY KickOutID = 2 // 服务器繁忙
|
||||
KickOutID_KICK_OUT_ID_SERVER_CLOSE KickOutID = 3 // 服务器关闭
|
||||
KickOutID_KICK_OUT_ID_QUEUE_UP_FULL KickOutID = 4 // 排队上限
|
||||
KickOutID_KICK_OUT_ID_TOKEN_INVALID KickOutID = 5 // Token无效
|
||||
)
|
||||
|
||||
// Enum value maps for KickOutID.
|
||||
var (
|
||||
KickOutID_name = map[int32]string{
|
||||
0: "KICK_OUT_ID_INVALID",
|
||||
1: "KICK_OUT_ID_DUPLICATE_LOGIN",
|
||||
2: "KICK_OUT_ID_SERVER_BUSY",
|
||||
3: "KICK_OUT_ID_SERVER_CLOSE",
|
||||
4: "KICK_OUT_ID_QUEUE_UP_FULL",
|
||||
5: "KICK_OUT_ID_TOKEN_INVALID",
|
||||
}
|
||||
KickOutID_value = map[string]int32{
|
||||
"KICK_OUT_ID_INVALID": 0,
|
||||
"KICK_OUT_ID_DUPLICATE_LOGIN": 1,
|
||||
"KICK_OUT_ID_SERVER_BUSY": 2,
|
||||
"KICK_OUT_ID_SERVER_CLOSE": 3,
|
||||
"KICK_OUT_ID_QUEUE_UP_FULL": 4,
|
||||
"KICK_OUT_ID_TOKEN_INVALID": 5,
|
||||
}
|
||||
)
|
||||
|
||||
func (x KickOutID) Enum() *KickOutID {
|
||||
p := new(KickOutID)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x KickOutID) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (KickOutID) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_service_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (KickOutID) Type() protoreflect.EnumType {
|
||||
return &file_service_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x KickOutID) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use KickOutID.Descriptor instead.
|
||||
func (KickOutID) EnumDescriptor() ([]byte, []int) {
|
||||
return file_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type S2C_KickOut struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ID KickOutID `protobuf:"varint,1,opt,name=ID,proto3,enum=KickOutID" json:"ID,omitempty"`
|
||||
}
|
||||
|
||||
func (x *S2C_KickOut) Reset() {
|
||||
*x = S2C_KickOut{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *S2C_KickOut) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*S2C_KickOut) ProtoMessage() {}
|
||||
|
||||
func (x *S2C_KickOut) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_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 S2C_KickOut.ProtoReflect.Descriptor instead.
|
||||
func (*S2C_KickOut) Descriptor() ([]byte, []int) {
|
||||
return file_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *S2C_KickOut) GetID() KickOutID {
|
||||
if x != nil {
|
||||
return x.ID
|
||||
}
|
||||
return KickOutID_KICK_OUT_ID_INVALID
|
||||
}
|
||||
|
||||
// MESSAGE_ID_QUEUE_UP
|
||||
type S2C_QueueUp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
QueueUpCount int32 `protobuf:"varint,1,opt,name=QueueUpCount,proto3" json:"QueueUpCount,omitempty"` // 排队人数
|
||||
}
|
||||
|
||||
func (x *S2C_QueueUp) Reset() {
|
||||
*x = S2C_QueueUp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *S2C_QueueUp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*S2C_QueueUp) ProtoMessage() {}
|
||||
|
||||
func (x *S2C_QueueUp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_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 S2C_QueueUp.ProtoReflect.Descriptor instead.
|
||||
func (*S2C_QueueUp) Descriptor() ([]byte, []int) {
|
||||
return file_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *S2C_QueueUp) GetQueueUpCount() int32 {
|
||||
if x != nil {
|
||||
return x.QueueUpCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// MESSAGE_ID_LOGIN_SUCCESS
|
||||
type S2C_LoginSuccess struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
InstanceID int32 `protobuf:"varint,1,opt,name=InstanceID,proto3" json:"InstanceID,omitempty"` // 副本ID
|
||||
}
|
||||
|
||||
func (x *S2C_LoginSuccess) Reset() {
|
||||
*x = S2C_LoginSuccess{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *S2C_LoginSuccess) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*S2C_LoginSuccess) ProtoMessage() {}
|
||||
|
||||
func (x *S2C_LoginSuccess) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_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 S2C_LoginSuccess.ProtoReflect.Descriptor instead.
|
||||
func (*S2C_LoginSuccess) Descriptor() ([]byte, []int) {
|
||||
return file_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *S2C_LoginSuccess) GetInstanceID() int32 {
|
||||
if x != nil {
|
||||
return x.InstanceID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
||||
0x0f, 0x73, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x22, 0x29, 0x0a, 0x0b, 0x53, 0x32, 0x43, 0x5f, 0x4b, 0x69, 0x63, 0x6b, 0x4f, 0x75, 0x74, 0x12,
|
||||
0x1a, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x4b, 0x69,
|
||||
0x63, 0x6b, 0x4f, 0x75, 0x74, 0x49, 0x44, 0x52, 0x02, 0x49, 0x44, 0x22, 0x31, 0x0a, 0x0b, 0x53,
|
||||
0x32, 0x43, 0x5f, 0x51, 0x75, 0x65, 0x75, 0x65, 0x55, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x51, 0x75,
|
||||
0x65, 0x75, 0x65, 0x55, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x0c, 0x51, 0x75, 0x65, 0x75, 0x65, 0x55, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x32,
|
||||
0x0a, 0x10, 0x53, 0x32, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x75, 0x63, 0x63, 0x65,
|
||||
0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
|
||||
0x49, 0x44, 0x2a, 0xbe, 0x01, 0x0a, 0x09, 0x4b, 0x69, 0x63, 0x6b, 0x4f, 0x75, 0x74, 0x49, 0x44,
|
||||
0x12, 0x17, 0x0a, 0x13, 0x4b, 0x49, 0x43, 0x4b, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x49, 0x44, 0x5f,
|
||||
0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x4b, 0x49, 0x43,
|
||||
0x4b, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41,
|
||||
0x54, 0x45, 0x5f, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x4b, 0x49,
|
||||
0x43, 0x4b, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52,
|
||||
0x5f, 0x42, 0x55, 0x53, 0x59, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x4b, 0x49, 0x43, 0x4b, 0x5f,
|
||||
0x4f, 0x55, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x43, 0x4c,
|
||||
0x4f, 0x53, 0x45, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x4b, 0x49, 0x43, 0x4b, 0x5f, 0x4f, 0x55,
|
||||
0x54, 0x5f, 0x49, 0x44, 0x5f, 0x51, 0x55, 0x45, 0x55, 0x45, 0x5f, 0x55, 0x50, 0x5f, 0x46, 0x55,
|
||||
0x4c, 0x4c, 0x10, 0x04, 0x12, 0x1d, 0x0a, 0x19, 0x4b, 0x49, 0x43, 0x4b, 0x5f, 0x4f, 0x55, 0x54,
|
||||
0x5f, 0x49, 0x44, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49,
|
||||
0x44, 0x10, 0x05, 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 (
|
||||
file_service_proto_rawDescOnce sync.Once
|
||||
file_service_proto_rawDescData = file_service_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_service_proto_rawDescGZIP() []byte {
|
||||
file_service_proto_rawDescOnce.Do(func() {
|
||||
file_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_proto_rawDescData)
|
||||
})
|
||||
return file_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_service_proto_goTypes = []interface{}{
|
||||
(KickOutID)(0), // 0: KickOutID
|
||||
(*S2C_KickOut)(nil), // 1: S2C_KickOut
|
||||
(*S2C_QueueUp)(nil), // 2: S2C_QueueUp
|
||||
(*S2C_LoginSuccess)(nil), // 3: S2C_LoginSuccess
|
||||
}
|
||||
var file_service_proto_depIdxs = []int32{
|
||||
0, // 0: S2C_KickOut.ID:type_name -> KickOutID
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_service_proto_init() }
|
||||
func file_service_proto_init() {
|
||||
if File_service_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*S2C_KickOut); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*S2C_QueueUp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*S2C_LoginSuccess); 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_service_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_service_proto_goTypes,
|
||||
DependencyIndexes: file_service_proto_depIdxs,
|
||||
EnumInfos: file_service_proto_enumTypes,
|
||||
MessageInfos: file_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_service_proto = out.File
|
||||
file_service_proto_rawDesc = nil
|
||||
file_service_proto_goTypes = nil
|
||||
file_service_proto_depIdxs = nil
|
||||
}
|
||||
@@ -5,10 +5,10 @@ if not exist "./gen" (
|
||||
)
|
||||
|
||||
protoc --proto_path=./sources --go_out=./gen ./sources/*.proto
|
||||
xcopy "./gen/common" "../../../Server/common" /E /I /Y /Q
|
||||
@REM 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
|
||||
@REM xcopy "./gen/client" "../../../Client/Point/Assets/Scripts/Proto" /E /I /Y /Q
|
||||
@@ -13,8 +13,9 @@ message S2C_EnterInstance {
|
||||
|
||||
// MESSAGE_ID_ACTION
|
||||
enum ActionID {
|
||||
ACTION_ID_MOVE = 0; // 移动
|
||||
ACTION_ID_ATTACK = 1; // 攻击
|
||||
ACTION_ID_INVALID = 0;
|
||||
ACTION_ID_MOVE = 1; // 移动
|
||||
ACTION_ID_ATTACK = 2; // 攻击
|
||||
}
|
||||
message C2S_Action {
|
||||
uint32 Sequence = 1; // 指令序号
|
||||
|
||||
@@ -5,9 +5,12 @@ import "sc_common.proto";
|
||||
|
||||
enum MessageID {
|
||||
MESSAGE_ID_INVALID = 0;
|
||||
MESSAGE_ID_ENTER_INSTANCE = 1; // 进入副本
|
||||
MESSAGE_ID_ACTION = 2; // 指令
|
||||
MESSAGE_ID_POSITION = 3; // 位置更新
|
||||
MESSAGE_ID_KICK_OUT = 1; // 服务器踢人
|
||||
MESSAGE_ID_QUEUE_UP = 2; // 排队中
|
||||
MESSAGE_ID_LOGIN_SUCCESS = 3; // 登录成功
|
||||
MESSAGE_ID_ENTER_INSTANCE = 101; // 进入副本
|
||||
MESSAGE_ID_ACTION = 102; // 指令
|
||||
MESSAGE_ID_POSITION = 103; // 位置更新
|
||||
}
|
||||
|
||||
message Message {
|
||||
|
||||
27
Public/Proto/ServerClient/sources/service.proto
Normal file
27
Public/Proto/ServerClient/sources/service.proto
Normal file
@@ -0,0 +1,27 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "common/proto/sc/sc_pb";
|
||||
import "sc_common.proto";
|
||||
|
||||
// MESSAGE_ID_KICK_OUT
|
||||
enum KickOutID {
|
||||
KICK_OUT_ID_INVALID = 0;
|
||||
KICK_OUT_ID_DUPLICATE_LOGIN = 1; // 重复登录
|
||||
KICK_OUT_ID_SERVER_BUSY = 2; // 服务器繁忙
|
||||
KICK_OUT_ID_SERVER_CLOSE = 3; // 服务器关闭
|
||||
KICK_OUT_ID_QUEUE_UP_FULL = 4; // 排队上限
|
||||
KICK_OUT_ID_TOKEN_INVALID = 5; // Token无效
|
||||
}
|
||||
message S2C_KickOut {
|
||||
KickOutID ID = 1;
|
||||
}
|
||||
|
||||
// MESSAGE_ID_QUEUE_UP
|
||||
message S2C_QueueUp {
|
||||
int32 QueueUpCount = 1; // 排队人数
|
||||
}
|
||||
|
||||
// MESSAGE_ID_LOGIN_SUCCESS
|
||||
message S2C_LoginSuccess {
|
||||
int32 InstanceID = 1; // 副本ID
|
||||
}
|
||||
@@ -122,6 +122,91 @@ func (*ToClientResp) Descriptor() ([]byte, []int) {
|
||||
return file_service_gateway_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
type KickUserReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"`
|
||||
}
|
||||
|
||||
func (x *KickUserReq) Reset() {
|
||||
*x = KickUserReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_gateway_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *KickUserReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*KickUserReq) ProtoMessage() {}
|
||||
|
||||
func (x *KickUserReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_gateway_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 KickUserReq.ProtoReflect.Descriptor instead.
|
||||
func (*KickUserReq) Descriptor() ([]byte, []int) {
|
||||
return file_service_gateway_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *KickUserReq) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type KickUserResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *KickUserResp) Reset() {
|
||||
*x = KickUserResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_gateway_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *KickUserResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*KickUserResp) ProtoMessage() {}
|
||||
|
||||
func (x *KickUserResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_gateway_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 KickUserResp.ProtoReflect.Descriptor instead.
|
||||
func (*KickUserResp) Descriptor() ([]byte, []int) {
|
||||
return file_service_gateway_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
var File_service_gateway_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_service_gateway_proto_rawDesc = []byte{
|
||||
@@ -134,12 +219,18 @@ var file_service_gateway_proto_rawDesc = []byte{
|
||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f,
|
||||
0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61,
|
||||
0x64, 0x22, 0x0e, 0x0a, 0x0c, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x32, 0x36, 0x0a, 0x07, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x2b, 0x0a, 0x08,
|
||||
0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x0c, 0x2e, 0x54, 0x6f, 0x43, 0x6c, 0x69,
|
||||
0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e,
|
||||
0x74, 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,
|
||||
0x70, 0x22, 0x1f, 0x0a, 0x0b, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x55,
|
||||
0x53, 0x4e, 0x22, 0x0e, 0x0a, 0x0c, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
|
||||
0x73, 0x70, 0x32, 0x61, 0x0a, 0x07, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x2b, 0x0a,
|
||||
0x08, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x0c, 0x2e, 0x54, 0x6f, 0x43, 0x6c,
|
||||
0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65,
|
||||
0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x28, 0x01, 0x12, 0x29, 0x0a, 0x08, 0x4b, 0x69,
|
||||
0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0c, 0x2e, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65,
|
||||
0x72, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52,
|
||||
0x65, 0x73, 0x70, 0x22, 0x00, 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 (
|
||||
@@ -154,16 +245,20 @@ func file_service_gateway_proto_rawDescGZIP() []byte {
|
||||
return file_service_gateway_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_service_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_service_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_service_gateway_proto_goTypes = []interface{}{
|
||||
(*ToClientReq)(nil), // 0: ToClientReq
|
||||
(*ToClientResp)(nil), // 1: ToClientResp
|
||||
(*KickUserReq)(nil), // 2: KickUserReq
|
||||
(*KickUserResp)(nil), // 3: KickUserResp
|
||||
}
|
||||
var file_service_gateway_proto_depIdxs = []int32{
|
||||
0, // 0: Gateway.ToClient:input_type -> ToClientReq
|
||||
1, // 1: Gateway.ToClient:output_type -> ToClientResp
|
||||
1, // [1:2] is the sub-list for method output_type
|
||||
0, // [0:1] is the sub-list for method input_type
|
||||
2, // 1: Gateway.KickUser:input_type -> KickUserReq
|
||||
1, // 2: Gateway.ToClient:output_type -> ToClientResp
|
||||
3, // 3: Gateway.KickUser:output_type -> KickUserResp
|
||||
2, // [2:4] is the sub-list for method output_type
|
||||
0, // [0:2] 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
|
||||
@@ -199,6 +294,30 @@ func file_service_gateway_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_gateway_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*KickUserReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_gateway_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*KickUserResp); 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{
|
||||
@@ -206,7 +325,7 @@ func file_service_gateway_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_service_gateway_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
@@ -24,6 +24,7 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
type GatewayClient interface {
|
||||
// 发送消息到客户端
|
||||
ToClient(ctx context.Context, opts ...grpc.CallOption) (Gateway_ToClientClient, error)
|
||||
KickUser(ctx context.Context, in *KickUserReq, opts ...grpc.CallOption) (*KickUserResp, error)
|
||||
}
|
||||
|
||||
type gatewayClient struct {
|
||||
@@ -68,12 +69,22 @@ func (x *gatewayToClientClient) CloseAndRecv() (*ToClientResp, error) {
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *gatewayClient) KickUser(ctx context.Context, in *KickUserReq, opts ...grpc.CallOption) (*KickUserResp, error) {
|
||||
out := new(KickUserResp)
|
||||
err := c.cc.Invoke(ctx, "/Gateway/KickUser", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// GatewayServer is the server API for Gateway service.
|
||||
// All implementations must embed UnimplementedGatewayServer
|
||||
// for forward compatibility
|
||||
type GatewayServer interface {
|
||||
// 发送消息到客户端
|
||||
ToClient(Gateway_ToClientServer) error
|
||||
KickUser(context.Context, *KickUserReq) (*KickUserResp, error)
|
||||
mustEmbedUnimplementedGatewayServer()
|
||||
}
|
||||
|
||||
@@ -84,6 +95,9 @@ type UnimplementedGatewayServer struct {
|
||||
func (UnimplementedGatewayServer) ToClient(Gateway_ToClientServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method ToClient not implemented")
|
||||
}
|
||||
func (UnimplementedGatewayServer) KickUser(context.Context, *KickUserReq) (*KickUserResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method KickUser not implemented")
|
||||
}
|
||||
func (UnimplementedGatewayServer) mustEmbedUnimplementedGatewayServer() {}
|
||||
|
||||
// UnsafeGatewayServer may be embedded to opt out of forward compatibility for this service.
|
||||
@@ -123,13 +137,36 @@ func (x *gatewayToClientServer) Recv() (*ToClientReq, error) {
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func _Gateway_KickUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(KickUserReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(GatewayServer).KickUser(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Gateway/KickUser",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(GatewayServer).KickUser(ctx, req.(*KickUserReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Gateway_ServiceDesc is the grpc.ServiceDesc for Gateway service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Gateway_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "Gateway",
|
||||
HandlerType: (*GatewayServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "KickUser",
|
||||
Handler: _Gateway_KickUser_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "ToClient",
|
||||
|
||||
@@ -160,10 +160,8 @@ type LeaveReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,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"` // 副本唯一编号
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID
|
||||
UniqueNo int64 `protobuf:"varint,2,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
|
||||
}
|
||||
|
||||
func (x *LeaveReq) Reset() {
|
||||
@@ -205,20 +203,6 @@ func (x *LeaveReq) GetUSN() int64 {
|
||||
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
|
||||
@@ -408,13 +392,9 @@ var file_service_scene_proto_rawDesc = []byte{
|
||||
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,
|
||||
0x64, 0x22, 0x38, 0x0a, 0x08, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x55, 0x53, 0x4e, 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,
|
||||
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, 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,
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
],
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"KickUserResp": {
|
||||
"type": "object"
|
||||
},
|
||||
"ToClientResp": {
|
||||
"type": "object"
|
||||
},
|
||||
|
||||
@@ -11,4 +11,4 @@ protoc ^
|
||||
--grpc-gateway_out=./gen ^
|
||||
--openapiv2_out=./gen ^
|
||||
./sources/*.proto
|
||||
xcopy "./gen/common" "../../../Server/common" /E /I /Y /Q
|
||||
@REM xcopy "./gen/common" "../../../Server/common" /E /I /Y /Q
|
||||
@@ -6,6 +6,7 @@ import "ss_common.proto";
|
||||
service Gateway {
|
||||
// 发送消息到客户端
|
||||
rpc ToClient(stream ToClientReq) returns (ToClientResp) {}
|
||||
rpc KickUser(KickUserReq) returns (KickUserResp) {}
|
||||
}
|
||||
|
||||
message ToClientReq {
|
||||
@@ -15,4 +16,11 @@ message ToClientReq {
|
||||
}
|
||||
|
||||
message ToClientResp {
|
||||
}
|
||||
|
||||
message KickUserReq {
|
||||
int64 USN = 1;
|
||||
}
|
||||
|
||||
message KickUserResp {
|
||||
}
|
||||
@@ -24,9 +24,7 @@ message EnterResp {
|
||||
|
||||
message LeaveReq {
|
||||
int64 USN = 1; // 用户ID
|
||||
int64 GatewaySID = 2; // 网关服务ID
|
||||
int32 InstanceID = 3; // 副本ID
|
||||
int64 UniqueNo = 4; // 副本唯一编号
|
||||
int64 UniqueNo = 2; // 副本唯一编号
|
||||
}
|
||||
|
||||
message LeaveResp {
|
||||
|
||||
@@ -58,3 +58,7 @@ ssh -L 2379:localhost:2379 root@47.108.184.184 yT1vU8fH5mP0rQ6h
|
||||
registry命令:
|
||||
curl -XGET -u admin:pD4hC1jY1bB0pY4kF4tC http://127.0.0.1:5000/v2/_catalog
|
||||
curl -XGET -u admin:pD4hC1jY1bB0pY4kF4tC http://127.0.0.1:5000/v2/server-gateway/tags/list
|
||||
|
||||
ssh-keygen -t rsa -b 4096 -C "jenkins-to-aliyun" -f ~/.ssh/jenkins -N ""
|
||||
|
||||
mockgen -source ./proto/ss/grpc_pb/service_user_grpc.pb.go -destination ./proto/ss/grpc_pb/mocks/service_user_grpc.pb.go -package mocks
|
||||
|
||||
Reference in New Issue
Block a user