using Supercell.GUT.Logic.Message.Attributes; using Supercell.GUT.Titan.Logic.Message; namespace Supercell.GUT.Logic.Message.Account; [VersionedMessage(10102)] public class LoginUsingSessionMessage : VersionedMessage { public int AccountIdHigherInt { get; set; } public int AccountIdLowerInt { get; set; } public int ClientGameVersion { get; set; } public string? SessionKey { get; set; } public string? GamecenterId { get; set; } public LoginUsingSessionMessage() : base(0) { this.AccountIdHigherInt = 0; this.AccountIdLowerInt = 0; this.ClientGameVersion = 0; this.SessionKey = string.Empty; this.SessionKey = string.Empty; } public override void Encode() { base.Encode(); this.ByteStream.WriteInt(this.AccountIdHigherInt); this.ByteStream.WriteInt(this.AccountIdLowerInt); this.ByteStream.WriteInt(this.ClientGameVersion); this.ByteStream.WriteInt(0); this.ByteStream.WriteString(this.SessionKey); this.ByteStream.WriteString(null); this.ByteStream.WriteString(null); this.ByteStream.WriteString(this.GamecenterId); } public override void Decode() { base.Decode(); this.AccountIdHigherInt = this.ByteStream.ReadInt(); this.AccountIdLowerInt = this.ByteStream.ReadInt(); this.ClientGameVersion = this.ByteStream.ReadInt(); this.ByteStream.ReadInt(); this.SessionKey = this.ByteStream.ReadString(); this.ByteStream.ReadString(); this.ByteStream.ReadString(); this.GamecenterId = this.ByteStream.ReadString(); } public override int GetMessageType() { return 10102; } public override int GetServiceNodeType() { return 1; } public override void Destruct() { base.Destruct(); this.AccountIdHigherInt = 0; this.AccountIdLowerInt = 0; this.ClientGameVersion = 0; this.SessionKey = string.Empty; this.SessionKey = string.Empty; } }