Supercell.GUT/Supercell.GUT.Logic/Message/Avatar/AskForAddableFriendsMessage.cs
BreadDEV 281d2789ea [v0.1.0] database implementation
not finished. early wip state
2024-03-06 22:00:12 +07:00

62 lines
1.4 KiB
C#

using Supercell.GUT.Logic.Message.Attributes;
using Supercell.GUT.Titan.Logic.Message;
using Supercell.GUT.Titan.Logic.Util;
namespace Supercell.GUT.Logic.Message.Avatar;
[VersionedMessage(10503)]
public class AskForAddableFriendsMessage : VersionedMessage
{
public LogicArrayList<string> FacebookIds { get; set; }
public LogicArrayList<string> GamecenterIds { get; set; }
public AskForAddableFriendsMessage() : base(0)
{
this.FacebookIds = new LogicArrayList<string>();
this.GamecenterIds = new LogicArrayList<string>();
}
public override void Destruct()
{
base.Destruct();
this.FacebookIds.Clear();
this.GamecenterIds.Clear();
}
public override void Encode()
{
base.Encode();
int size = this.FacebookIds.Size();
this.ByteStream.WriteInt(size);
for (int i = 0; i < size; i++)
{
this.ByteStream.WriteString(this.FacebookIds[i]);
}
size = this.GamecenterIds.Size();
this.ByteStream.WriteInt(size);
for (int i = 0; i < size; i++)
{
this.ByteStream.WriteString(this.GamecenterIds[i]);
}
}
public override void Decode()
{
base.Decode();
}
public override int GetMessageType()
{
return 10503;
}
public override int GetServiceNodeType()
{
return 3;
}
}