31 lines
750 B
C#
31 lines
750 B
C#
using DysonNetwork.Shared.Models;
|
|
using MagicOnion;
|
|
using NodaTime;
|
|
|
|
namespace DysonNetwork.Shared.Services;
|
|
|
|
public interface IMagicSpellService : IService<IMagicSpellService>
|
|
{
|
|
/// <summary>
|
|
/// Creates a new magic spell
|
|
/// </summary>
|
|
Task<MagicSpell> CreateMagicSpell(
|
|
Account account,
|
|
MagicSpellType type,
|
|
Dictionary<string, object> meta,
|
|
Instant? expiredAt = null,
|
|
Instant? affectedAt = null,
|
|
bool preventRepeat = false
|
|
);
|
|
|
|
/// <summary>
|
|
/// Gets a magic spell by its token
|
|
/// </summary>
|
|
Task<MagicSpell?> GetMagicSpellAsync(string token);
|
|
|
|
/// <summary>
|
|
/// Consumes a magic spell
|
|
/// </summary>
|
|
Task ApplyMagicSpell(string token);
|
|
}
|