ace/Source/ACE.Adapter/GDLE/Models/SpellbookEntry.cs
Ty Conner 12e569652f
Switch to System.Text.Json (#4002)
* Switch to System.Text.Json

Removed Newtonsoft.Json and DouglasCrockford.JsMin

* Update GameConfiguration.cs

* Update MasterConfiguration.cs

* Update ThreadConfiguration.cs

* Update StarterSpell.cs

* Update StarterGearFactory.cs

* Update Program_Setup.cs

* Update LifestonedConverter.cs

* Update Program_Setup.cs

* Update Program_Setup.cs

* Update ACE.Adaptor

Shift JSON weenie [de]serialization to System.Text.Json

* Update LifestonedConverter.cs

* Update StarterGearFactory.cs

* Update ACE.Server.csproj

* Update ACE.Server.Tests.csproj

* Update Program.cs

* Update MySqlConfiguration.cs

* Update DDDConfiguration.cs

* Update ModContainer.cs

* Update ModManager.cs

* Update ModMetadata.cs

* Update ModMetadata.cs
2023-12-21 14:15:38 -05:00

25 lines
689 B
C#

using Lifestoned.DataModel.Shared;
using System.Text.Json.Serialization;
using System.Text.RegularExpressions;
namespace ACE.Adapter.GDLE.Models
{
public class SpellbookEntry
{
[JsonPropertyName("key")]
public int SpellId { get; set; }
[JsonPropertyName("value")]
public SpellCastingStats Stats { get; set; } = new SpellCastingStats();
[JsonIgnore]
public bool Deleted { get; set; }
public string GetSpellDescription()
{
string input = ((SpellId)SpellId).ToString();
return "(" + SpellId + ") " + Regex.Replace(input, "([A-Z0-9])", " $1", RegexOptions.Compiled).Trim();
}
}
}