namespace ODMO.Commons.Models.Character
{
public sealed partial class CharacterSealModel
{
///
/// Increase unlocked amount.
///
/// Amount to increase.
public void IncreaseAmount(short amount)
{
if (Amount + amount > 3000)
Amount = 3000;
else
Amount += amount;
}
///
/// Decrease unlocked amount.
///
/// Amount to decrease.
public void DecreaseAmount(short amount) => Amount -= amount;
///
/// Set the seal as favorited.
///
/// Favorited.
public void SetFavorite(bool favorited) => Favorite = favorited;
///
/// Creates a new seal.
///
/// Seal id.
/// Seal sequential id.
/// Favorited.
public static CharacterSealModel Create(int sealId, short sequential, bool favorited)
{
return new CharacterSealModel()
{
SealId = sealId,
Favorite = favorited,
SequentialId = sequential
};
}
///
/// Creates a new seal.
///
/// Seal id.
/// Seal unlocked amount.
/// Seal sequential id.
public static CharacterSealModel Create(int sealId, short amount, short sequential)
{
return new CharacterSealModel()
{
SealId = sealId,
Amount = amount,
SequentialId = sequential
};
}
}
}