namespace NeonSprawl.Server.Game.Gigs;
///
/// NEO-44: combat encounter defeat grants gig XP on the prototype main gig only — not E2.M2 skill XP.
/// Outcome is ignored on the cast accept path (best-effort apply); inspect store/GET when verification matters.
///
public static class CombatDefeatGigXpGrant
{
/// Applies one combat-defeat grant to the prototype main gig when is writable.
public static void GrantOnCombatDefeat(
string playerId,
IPlayerGigProgressionStore gigStore,
ILogger? logger = null)
{
if (!gigStore.TryApplyXpDelta(
playerId,
GigProgressionConstants.PrototypeMainGigId,
GigProgressionConstants.CombatDefeatXpAmount,
out _,
out _))
{
if (logger?.IsEnabled(LogLevel.Debug) is true)
{
logger.LogDebug(
"Combat defeat gig XP grant skipped for player {PlayerId} (store write failed)",
playerId);
}
}
}
}