~ruther/NosSmooth

ref: 8e5e00ccd56847d9864ba586ef1617df53ac9b8a NosSmooth/Data/NosSmooth.Data.Abstractions/IInfoService.cs -rw-r--r-- 1.9 KiB
8e5e00cc — František Boháček chore: bump packet versions 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
//  IInfoService.cs
//
//  Copyright (c) František Boháček. All rights reserved.
//  Licensed under the MIT license. See LICENSE file in the project root for full license information.

using NosSmooth.Data.Abstractions.Infos;
using Remora.Results;

namespace NosSmooth.Data.Abstractions;

/// <summary>
/// Service for retrieving information about NosTale objects.
/// </summary>
public interface IInfoService
{
    /// <summary>
    /// Gets the information about an item.
    /// </summary>
    /// <param name="vnum">The vnum identifier of the item.</param>
    /// <param name="ct">The cancellation token for cancelling the operation.</param>
    /// <returns>An item info or an error.</returns>
    public Task<Result<IItemInfo>> GetItemInfoAsync(int vnum, CancellationToken ct = default);

    /// <summary>
    /// Gets the information about a map.
    /// </summary>
    /// <param name="id">The identifier of the map.</param>
    /// <param name="ct">The cancellation token for cancelling the operation.</param>
    /// <returns>A map info or an error.</returns>
    public Task<Result<IMapInfo>> GetMapInfoAsync(int id, CancellationToken ct = default);

    /// <summary>
    /// Gets the information about a monster.
    /// </summary>
    /// <param name="vnum">The vnum identifier of the monster.</param>
    /// <param name="ct">The cancellation token for cancelling the operation.</param>
    /// <returns>A monster or an error.</returns>
    public Task<Result<IMonsterInfo>> GetMonsterInfoAsync(int vnum, CancellationToken ct = default);

    /// <summary>
    /// Gets the information about a skill.
    /// </summary>
    /// <param name="vnum">The vnum identifier of the skill.</param>
    /// <param name="ct">The cancellation token for cancelling the operation.</param>
    /// <returns>A map or an error.</returns>
    public Task<Result<ISkillInfo>> GetSkillInfoAsync(int vnum, CancellationToken ct = default);
}
Do not follow this link