Files
Radicade/Server/ProgressionEvents/PlayerProgressionLevelUpdateNotification.cs
T
2026-10-16 23:33:13 -07:00

29 lines
1.0 KiB
C#

using System.Text.Json.Serialization;
using RadicadeServer.Utils;
namespace RadicadeServer.RecNet.Progression
{
public class PlayerProgressionLevelUpdateNotification
{
public PlayerProgressionLevelUpdateNotification() { }
public PlayerProgressionLevelUpdateNotification(ProgressionData data)
{
Id = data.PlayerId;
PlayerId = data.PlayerId;
Level = LevelUpGiftService.DisplayLevel(data.Level);
XP = LevelUpGiftService.XpIntoCurrentLevel(data);
}
public long Id { get; set; }
public long PlayerId { get; set; }
public int Level { get; set; }
public int XP { get; set; }
[JsonPropertyName("id")] public long IdLower { get { return Id; } }
[JsonPropertyName("playerId")] public long PlayerIdLower { get { return PlayerId; } }
[JsonPropertyName("level")] public int LevelLower { get { return Level; } }
[JsonPropertyName("xp")] public int XpLower { get { return XP; } }
}
}