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
79 lines
2.1 KiB
C#
79 lines
2.1 KiB
C#
using Supercell.GUT.Logic.Game;
|
|
using Supercell.GUT.Logic.Message.Attributes;
|
|
using Supercell.GUT.Titan.Logic.Message;
|
|
|
|
namespace Supercell.GUT.Logic.Message.Account;
|
|
|
|
[VersionedMessage(20104)]
|
|
public class LoginOkMessage : VersionedMessage
|
|
{
|
|
public int PrimaryAvatarIdHigherInt { get; set; }
|
|
public int PrimaryAvatarIdLowerInt { get; set; }
|
|
|
|
public string? Fingerprint { get; set; }
|
|
|
|
public int Env { get; set; }
|
|
public int ServerVersion { get; set; }
|
|
public int SessionCount { get; set; }
|
|
|
|
public LogicGameCalendar ServerCalendar { get; set; }
|
|
|
|
public LoginOkMessage() : base(0)
|
|
{
|
|
this.PrimaryAvatarIdHigherInt = 0;
|
|
this.PrimaryAvatarIdLowerInt = 0;
|
|
this.Fingerprint = string.Empty;
|
|
this.Env = 0;
|
|
this.ServerVersion = 0;
|
|
this.SessionCount = 0;
|
|
this.ServerCalendar = new LogicGameCalendar();
|
|
}
|
|
|
|
public override void Encode()
|
|
{
|
|
base.Encode();
|
|
|
|
this.ByteStream.WriteInt(0);
|
|
this.ByteStream.WriteInt(0);
|
|
this.ByteStream.WriteInt(this.PrimaryAvatarIdHigherInt);
|
|
this.ByteStream.WriteInt(this.PrimaryAvatarIdLowerInt);
|
|
this.ByteStream.WriteInt(0);
|
|
this.ByteStream.WriteInt(this.Env);
|
|
this.ByteStream.WriteInt(this.ServerVersion);
|
|
this.ByteStream.WriteInt(this.SessionCount);
|
|
this.ByteStream.WriteString(null);
|
|
this.ServerCalendar.Encode(this.ByteStream);
|
|
this.ByteStream.WriteString(null);
|
|
this.ByteStream.WriteString(this.Fingerprint);
|
|
this.ByteStream.WriteInt(0);
|
|
}
|
|
|
|
public override void Decode()
|
|
{
|
|
base.Decode();
|
|
|
|
// TODO
|
|
}
|
|
|
|
public override int GetMessageType()
|
|
{
|
|
return 20104;
|
|
}
|
|
|
|
public override int GetServiceNodeType()
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
public override void Destruct()
|
|
{
|
|
base.Destruct();
|
|
|
|
this.PrimaryAvatarIdHigherInt = 0;
|
|
this.PrimaryAvatarIdLowerInt = 0;
|
|
this.Fingerprint = string.Empty;
|
|
this.Env = 0;
|
|
this.ServerVersion = 0;
|
|
this.SessionCount = 0;
|
|
}
|
|
}
|