27 lines
824 B
C#
27 lines
824 B
C#
using Tiger.Communication.Messages.Interfaces;
|
|
using Tiger.Communication.Messages.Types;
|
|
using Tiger.Game.Habbos;
|
|
|
|
namespace Tiger.Communication.Messages.Outgoing.Notifications;
|
|
|
|
public class ActivityPointsComposer : IMessageComposer
|
|
{
|
|
private readonly ICollection<Activitypoints> _activitypoints;
|
|
|
|
public ActivityPointsComposer(ICollection<Activitypoints> activitypoints)
|
|
{
|
|
_activitypoints = activitypoints;
|
|
}
|
|
|
|
public OutgoingHeaders Header => OutgoingHeaders.ActivityPointsMessageComposer;
|
|
public void Compose(ServerMessage message)
|
|
{
|
|
message.AppendInt32(_activitypoints.Count);
|
|
|
|
foreach (var activitypoint in _activitypoints)
|
|
{
|
|
message.AppendInt32(activitypoint.Type);
|
|
message.AppendInt32(activitypoint.Amount);
|
|
}
|
|
}
|
|
} |