26 lines
935 B
C#
26 lines
935 B
C#
using Tiger.Communication.Messages.Interfaces;
|
|
using Tiger.Communication.Messages.Types;
|
|
|
|
namespace Tiger.Communication.Messages.Outgoing.Catalog;
|
|
|
|
public class NotEnoughBalanceMessageComposer : IMessageComposer
|
|
{
|
|
private readonly bool _notEnoughCredits;
|
|
private readonly bool _notEnoughActivityPoints;
|
|
private readonly int _activityPointsType;
|
|
|
|
public NotEnoughBalanceMessageComposer(bool notEnoughCredits, bool notEnoughActivityPoints, int activityPointsType)
|
|
{
|
|
_notEnoughCredits = notEnoughCredits;
|
|
_notEnoughActivityPoints = notEnoughActivityPoints;
|
|
_activityPointsType = activityPointsType;
|
|
}
|
|
|
|
public OutgoingHeaders Header => OutgoingHeaders.NotEnoughBalance;
|
|
public void Compose(ServerMessage message)
|
|
{
|
|
message.AppendBoolean(_notEnoughCredits);
|
|
message.AppendBoolean(_notEnoughActivityPoints);
|
|
message.AppendInt32(_activityPointsType);
|
|
}
|
|
} |