TigerEmu/Communication/Messages/Outgoing/Inventory/Currency/UserCurrencyComposer.cs

27 lines
808 B
C#
Raw Permalink Normal View History

using Tiger.Communication.Messages.Interfaces;
using Tiger.Communication.Messages.Types;
using Tiger.Game.Habbos;
namespace Tiger.Communication.Messages.Outgoing.Inventory.Currency;
public class UserCurrencyComposer : IMessageComposer
{
private readonly ICollection<Activitypoints> _activitypoints;
public UserCurrencyComposer(ICollection<Activitypoints> activitypoints)
{
_activitypoints = activitypoints;
}
public OutgoingHeaders Header => OutgoingHeaders.UserCurrency;
public void Compose(ServerMessage message)
{
message.AppendInt32(_activitypoints.Count);
foreach (var activitypoint in _activitypoints)
{
message.AppendInt32(activitypoint.Type);
message.AppendInt32(activitypoint.Amount);
}
}
}