mirror of
https://github.com/thebreaddev/Supercell.GUT.git
synced 2024-11-13 00:54:37 +00:00
63 lines
1.4 KiB
C#
63 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;
|
|||
|
}
|
|||
|
}
|