Fixed issues relating to gift codes with profile modifications

Updated enums to match client formatting and ids
Added `SkillClass` enum

#368
This commit is contained in:
Chomp
2025-06-07 23:08:21 +01:00
parent 2d67d8002b
commit 3a2f68a232
13 changed files with 131 additions and 121 deletions
@@ -197,7 +197,7 @@ public class InventoryController(
break;
case "SkillPoints":
{
var profileSkill = pmcData.Skills.Common.FirstOrDefault(x => x.Id == mailEvent.Entity);
var profileSkill = pmcData.Skills.Common.FirstOrDefault(x => x.Id == Enum.Parse<SkillTypes>(mailEvent.Entity));
if (profileSkill is null)
{
_logger.Warning($"Unable to find skill with name: {mailEvent.Entity}");
@@ -231,7 +231,7 @@ public class InventoryController(
{
var areaName = mailEvent.Entity;
var newValue = mailEvent.Value;
var hideoutAreaType = Enum.Parse<HideoutAreas>(areaName ?? "NOTSET");
var hideoutAreaType = Enum.Parse<HideoutAreas>(areaName ?? "NotSet");
var desiredArea = pmcData.Hideout.Areas.FirstOrDefault(area => area.Type == hideoutAreaType);
if (desiredArea is not null)