2023-09-23 13:33:23 +00:00
|
|
|
using Tiger.Communication.Messages.Interfaces;
|
|
|
|
using Tiger.Communication.Messages.Types;
|
|
|
|
using Tiger.Game.Habbos;
|
|
|
|
|
|
|
|
namespace Tiger.Communication.Messages.Outgoing.Notifications;
|
|
|
|
|
|
|
|
public class ActivityPointsComposer : IMessageComposer
|
|
|
|
{
|
2023-10-07 13:32:19 +00:00
|
|
|
private readonly ICollection<Activitypoints> _activitypoints;
|
2023-09-23 13:33:23 +00:00
|
|
|
|
2023-10-07 13:32:19 +00:00
|
|
|
public ActivityPointsComposer(ICollection<Activitypoints> activitypoints)
|
2023-09-23 13:33:23 +00:00
|
|
|
{
|
|
|
|
_activitypoints = activitypoints;
|
|
|
|
}
|
|
|
|
|
|
|
|
public OutgoingHeaders Header => OutgoingHeaders.ActivityPointsMessageComposer;
|
|
|
|
public void Compose(ServerMessage message)
|
|
|
|
{
|
2023-10-07 13:32:19 +00:00
|
|
|
message.AppendInt32(_activitypoints.Count);
|
2023-09-23 13:33:23 +00:00
|
|
|
|
|
|
|
foreach (var activitypoint in _activitypoints)
|
|
|
|
{
|
|
|
|
message.AppendInt32(activitypoint.Type);
|
2023-09-23 16:51:16 +00:00
|
|
|
message.AppendInt32(activitypoint.Amount);
|
2023-09-23 13:33:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|