Files
SVSimServer/SVSim.Database/Models/Config/BattleXpConfig.cs
gamer147 4541378885 feat(battle-xp): config section + viewer loader for class XP grants
Adds BattleXpConfig ([ConfigSection("BattleXp")]) with global
XpPerWin/XpPerLoss plus per-mode nullable overrides. Adds BattleXpMode
enum and IViewerRepository.LoadForBattleXpGrantAsync — focused tracked
load with viewer.Classes + Class nav ref included, for the service
about to be introduced.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-04 08:44:11 -04:00

29 lines
1.1 KiB
C#

namespace SVSim.Database.Models.Config;
/// <summary>
/// Class XP awarded on battle finish. <see cref="XpPerWin"/> / <see cref="XpPerLoss"/>
/// are the global defaults; each per-mode nullable slot overrides them for that mode
/// when set. Story is clear-only (no loss variant) — <see cref="StoryXpPerClear"/>
/// falls back to <see cref="XpPerWin"/> when null.
/// </summary>
[ConfigSection("BattleXp")]
public class BattleXpConfig
{
public int XpPerWin { get; set; } = 100;
public int XpPerLoss { get; set; } = 25;
public int? PracticeXpPerWin { get; set; }
public int? PracticeXpPerLoss { get; set; }
public int? RankXpPerWin { get; set; }
public int? RankXpPerLoss { get; set; }
public int? FreeXpPerWin { get; set; }
public int? FreeXpPerLoss { get; set; }
public int? ArenaTwoPickXpPerWin { get; set; }
public int? ArenaTwoPickXpPerLoss { get; set; }
public int? ColosseumXpPerWin { get; set; }
public int? ColosseumXpPerLoss { get; set; }
public int? StoryXpPerClear { get; set; }
public static BattleXpConfig ShippedDefaults() => new();
}