♻️ Moving to MagicOnion
This commit is contained in:
30
DysonNetwork.Shared/Services/IMagicSpellService.cs
Normal file
30
DysonNetwork.Shared/Services/IMagicSpellService.cs
Normal file
@ -0,0 +1,30 @@
|
||||
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);
|
||||
}
|
Reference in New Issue
Block a user