15 lines
753 B
C#
15 lines
753 B
C#
namespace NeonSprawl.Server.Game.Skills;
|
|
|
|
/// <summary>Persisted totals of skill XP per player (NEO-38); level is derived, not stored.</summary>
|
|
public interface IPlayerSkillProgressionStore
|
|
{
|
|
/// <summary>Keyed by catalog <c>SkillDef.id</c>; omitted skills imply XP 0.</summary>
|
|
IReadOnlyDictionary<string, int> GetXpTotals(string playerId);
|
|
|
|
/// <summary>
|
|
/// Adds <paramref name="amount"/> to <paramref name="skillId"/> for <paramref name="playerId"/>.
|
|
/// Returns <c>false</c> when the player cannot be written (e.g. in-memory store has no bucket; Postgres player missing from <c>player_position</c>).
|
|
/// </summary>
|
|
bool TryApplyXpDelta(string playerId, string skillId, int amount, out int previousXp, out int newXp);
|
|
}
|