mirror of
https://github.com/thebreaddev/Supercell.GUT.git
synced 2024-11-10 07:44:37 +00:00
8c6a533918
todo: improve code and finish base structures
51 lines
1,021 B
C#
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);
|
|
}
|
|
}
|