mirror of
https://github.com/thebreaddev/Supercell.GUT.git
synced 2024-11-10 07:44:37 +00:00
76 lines
2.3 KiB
C#
76 lines
2.3 KiB
C#
|
using Supercell.GUT.Logic.Base;
|
|||
|
using Supercell.GUT.Logic.Player;
|
|||
|
using Supercell.GUT.Titan.Logic.DataStream;
|
|||
|
using Supercell.GUT.Titan.Logic.Math;
|
|||
|
using Supercell.GUT.Titan.Logic.Util;
|
|||
|
|
|||
|
namespace Supercell.GUT.Logic.Avatar;
|
|||
|
|
|||
|
public class LogicClientAvatar : LogicBase
|
|||
|
{
|
|||
|
public LogicLong Id { get; set; }
|
|||
|
public int ActiveMission { get; set; }
|
|||
|
public string Name { get; set; }
|
|||
|
public string AvatarCode { get; set; }
|
|||
|
public LogicArrayList<LogicAvatarGame> AvatarGames { get; set; }
|
|||
|
public LogicArrayList<int> MissionStatus { get; set; }
|
|||
|
public LogicPlayerAttributes PlayerAttributes { get; set; }
|
|||
|
public LogicInventory Inventory { get; set; }
|
|||
|
public LogicPlayerStats PlayerStats { get; set; }
|
|||
|
|
|||
|
public int TutorialFlags { get; set; }
|
|||
|
|
|||
|
public LogicClientAvatar() : base(20486)
|
|||
|
{
|
|||
|
this.Id = new LogicLong();
|
|||
|
this.ActiveMission = -1;
|
|||
|
|
|||
|
this.Name = string.Empty;
|
|||
|
this.AvatarCode = string.Empty;
|
|||
|
|
|||
|
this.AvatarGames = new LogicArrayList<LogicAvatarGame>();
|
|||
|
this.MissionStatus = new LogicArrayList<int>();
|
|||
|
this.PlayerAttributes = new LogicPlayerAttributes(20486);
|
|||
|
this.Inventory = new LogicInventory(20486);
|
|||
|
this.PlayerStats = new LogicPlayerStats(20486);
|
|||
|
}
|
|||
|
|
|||
|
public override void Destruct()
|
|||
|
{
|
|||
|
base.Destruct();
|
|||
|
}
|
|||
|
|
|||
|
public override void Decode(ByteStream byteStream)
|
|||
|
{
|
|||
|
base.Decode(byteStream);
|
|||
|
}
|
|||
|
|
|||
|
public override void Encode(ChecksumEncoder checksumEncoder)
|
|||
|
{
|
|||
|
base.Encode(checksumEncoder);
|
|||
|
|
|||
|
checksumEncoder.WriteLong(this.Id);
|
|||
|
checksumEncoder.WriteInt(this.ActiveMission);
|
|||
|
checksumEncoder.WriteString(this.Name);
|
|||
|
checksumEncoder.WriteString(this.AvatarCode);
|
|||
|
|
|||
|
checksumEncoder.WriteInt(this.AvatarGames.Size());
|
|||
|
for (int i = 0; i < this.AvatarGames.Size(); i++)
|
|||
|
{
|
|||
|
this.AvatarGames[i].Encode(checksumEncoder);
|
|||
|
}
|
|||
|
|
|||
|
checksumEncoder.WriteInt(this.MissionStatus.Size());
|
|||
|
for (int i = 0; i < this.MissionStatus.Size(); i++)
|
|||
|
{
|
|||
|
checksumEncoder.WriteInt(this.MissionStatus[i]);
|
|||
|
}
|
|||
|
|
|||
|
this.PlayerAttributes.Encode(checksumEncoder);
|
|||
|
this.Inventory.Encode(checksumEncoder);
|
|||
|
this.PlayerStats.Encode(checksumEncoder);
|
|||
|
|
|||
|
checksumEncoder.WriteInt(this.TutorialFlags);
|
|||
|
}
|
|||
|
}
|