Supercell.GUT/Supercell.GUT.Logic/Message/Account/SecureConnectionOkMessage.cs
BreadDEV 8c6a533918 [v0.0.2] you can enter menu now. but still early state
todo: improve code and finish base structures
2024-03-05 17:37:18 +07:00

51 lines
1,021 B
C#

using Supercell.GUT.Logic.Message.Attributes;
using Supercell.GUT.Titan.Logic.Message;
using Supercell.GUT.Titan.Logic.Util;
namespace Supercell.GUT.Logic.Message.Account;
[VersionedMessage(20112)]
public class SecureConnectionOkMessage : VersionedMessage
{
public string Nonce { get; set; }
public SecureConnectionOkMessage() : base(0)
{
this.Nonce = string.Empty;
}
public override void Destruct()
{
base.Destruct();
this.Nonce = string.Empty;
}
public override int GetMessageType()
{
return 20112;
}
public override int GetServiceNodeType()
{
return 1;
}
public override void Encode()
{
base.Encode();
this.ByteStream.WriteString(this.Nonce);
}
public override void Decode()
{
string nonce = this.Nonce;
base.Decode();
string? value = this.ByteStream.ReadString();
this.Nonce = LogicStringUtil.SafeString(nonce, value, string.Empty);
}
}