Files
Main/Assets/Code/Logic/_NetMessage/Messages/heartEx.cs
2025-01-25 04:38:09 +08:00

221 lines
6.6 KiB
C#

using System.Collections.Generic;
using Thousandto.Plugins.Common;
using Thousandto.Code.Logic.Network;
namespace MSG_heart
{
public partial class ReqHeart : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 115201;
public void Excute(){}
public void Send()
{
lock (ProtoBufUtils.WriteLocker)
{
byte[] bytes = null;
ProtoBufUtils.InitWriteData();
ProtoBufUtils.WriteInt32(1,time);
bytes = ProtoBufUtils.GetData();
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
}
}
public void Clear()
{
time = 0;
}
public int time;
}
public partial class ReqReconnect : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 115202;
public void Excute(){}
public void Send()
{
lock (ProtoBufUtils.WriteLocker)
{
byte[] bytes = null;
ProtoBufUtils.InitWriteData();
ProtoBufUtils.WriteUint64(1,playerId);
ProtoBufUtils.WriteString(2,sign);
bytes = ProtoBufUtils.GetData();
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
}
}
public void Clear()
{
playerId = 0;
sign = null;
}
public ulong playerId;
public string sign;
}
public partial class ReqSetReconnectSignSuccess : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 115203;
public void Excute(){}
public void Send()
{
lock (ProtoBufUtils.WriteLocker)
{
byte[] bytes = null;
ProtoBufUtils.InitWriteData();
bytes = ProtoBufUtils.GetData();
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
}
}
public void Clear()
{
}
}
public partial class ReqReallyHeart : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 115204;
public void Excute(){}
public void Send()
{
lock (ProtoBufUtils.WriteLocker)
{
byte[] bytes = null;
ProtoBufUtils.InitWriteData();
bytes = ProtoBufUtils.GetData();
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
}
}
public void Clear()
{
}
}
public partial class ResHeart : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResHeart(this);
}
public const uint MsgID = 115101;
public void Send(){}
public void ReadMessage(byte[] bytes)
{
lock (ProtoBufUtils.ReadLocker)
{
Clear();
int endIndex = bytes.Length - 1;
int readPos = 0;
int totalCount = 0;
ProtoBufUtils.InitReadData(bytes, ref readPos);
while (readPos <= endIndex)
{
int curType = bytes[readPos] & 7;
int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
switch (fieldNumber)
{
case 1:
serverTime = ProtoBufUtils.ReadInt32(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
serverTime = 0;
}
public int serverTime;
}
public partial class ResReconnectSign : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResReconnectSign(this);
}
public const uint MsgID = 115102;
public void Send(){}
public void ReadMessage(byte[] bytes)
{
lock (ProtoBufUtils.ReadLocker)
{
Clear();
int endIndex = bytes.Length - 1;
int readPos = 0;
int totalCount = 0;
ProtoBufUtils.InitReadData(bytes, ref readPos);
while (readPos <= endIndex)
{
int curType = bytes[readPos] & 7;
int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
switch (fieldNumber)
{
case 1:
sign = ProtoBufUtils.ReadString(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
sign = null;
}
public string sign;
}
public partial class ResHeartFailed : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResHeartFailed(this);
}
public const uint MsgID = 115103;
public void Send(){}
public void ReadMessage(byte[] bytes)
{
lock (ProtoBufUtils.ReadLocker)
{
Clear();
int endIndex = bytes.Length - 1;
int readPos = 0;
int totalCount = 0;
ProtoBufUtils.InitReadData(bytes, ref readPos);
while (readPos <= endIndex)
{
int curType = bytes[readPos] & 7;
int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
switch (fieldNumber)
{
case 1:
reason = ProtoBufUtils.ReadInt32(ref readPos);
break;
case 2:
mapModelId = ProtoBufUtils.ReadInt32(ref readPos);
break;
case 3:
lineId = ProtoBufUtils.ReadInt32(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
reason = 0;
mapModelId = 0;
lineId = 0;
}
public int reason;
public int mapModelId;
public int lineId;
}
}