From b4c4ab21b46061d554cccab0265278a81f8b433b Mon Sep 17 00:00:00 2001 From: Tawmy Date: Tue, 6 Jan 2026 12:17:56 +0100 Subject: [PATCH 1/3] Add Facewear to CharacterGear --- .../Model/Character/CharacterGearDefinition.cs | 6 ++++++ .../Model/Parseables/Character/Gear/CharacterGear.cs | 5 +++++ NetStone/NetStone.xml | 10 ++++++++++ 3 files changed, 21 insertions(+) diff --git a/NetStone/Definitions/Model/Character/CharacterGearDefinition.cs b/NetStone/Definitions/Model/Character/CharacterGearDefinition.cs index 480573f..bfc3425 100644 --- a/NetStone/Definitions/Model/Character/CharacterGearDefinition.cs +++ b/NetStone/Definitions/Model/Character/CharacterGearDefinition.cs @@ -144,6 +144,12 @@ public class CharacterGearDefinition : IDefinition /// [JsonProperty("FEET")] public GearEntryDefinition Feet { get; set; } + + /// + /// Facewear + /// + [JsonProperty("FACEWEAR")] + public GearEntryDefinition Facewear { get; set; } /// /// Earrings diff --git a/NetStone/Model/Parseables/Character/Gear/CharacterGear.cs b/NetStone/Model/Parseables/Character/Gear/CharacterGear.cs index 913ac5f..094fda2 100644 --- a/NetStone/Model/Parseables/Character/Gear/CharacterGear.cs +++ b/NetStone/Model/Parseables/Character/Gear/CharacterGear.cs @@ -63,6 +63,11 @@ public CharacterGear(LodestoneClient client, HtmlNode rootNode, CharacterGearDef /// public GearEntry? Feet => new GearEntry(this.client, this.RootNode, this.definition.Feet).GetOptional(); + /// + /// Information about the characters' facewear. Null if none equipped. + /// + public GearEntry? Facewear => new GearEntry(this.client, this.RootNode, this.definition.Facewear).GetOptional(); + /// /// Information about the characters' earrings. Null if none equipped. /// diff --git a/NetStone/NetStone.xml b/NetStone/NetStone.xml index 22f2ad4..c18652f 100644 --- a/NetStone/NetStone.xml +++ b/NetStone/NetStone.xml @@ -843,6 +843,11 @@ Feet + + + Facewear + + Earrings @@ -2836,6 +2841,11 @@ Information about the characters' shoes. Null if none equipped. + + + Information about the characters' facewear. Null if none equipped. + + Information about the characters' earrings. Null if none equipped. From 9135dff5479d170e5d9d3f5b05d3e6a38f7affd4 Mon Sep 17 00:00:00 2001 From: Tawmy Date: Tue, 6 Jan 2026 15:17:12 +0100 Subject: [PATCH 2/3] Create new LodestoneParseable for Facewear --- .../Character/CharacterGearDefinition.cs | 26 +++++++++- .../Character/Gear/CharacterGear.cs | 2 +- .../Character/Gear/FacewearEntry.cs | 40 +++++++++++++++ NetStone/NetStone.xml | 49 +++++++++++++++++++ 4 files changed, 115 insertions(+), 2 deletions(-) create mode 100644 NetStone/Model/Parseables/Character/Gear/FacewearEntry.cs diff --git a/NetStone/Definitions/Model/Character/CharacterGearDefinition.cs b/NetStone/Definitions/Model/Character/CharacterGearDefinition.cs index bfc3425..f2030f6 100644 --- a/NetStone/Definitions/Model/Character/CharacterGearDefinition.cs +++ b/NetStone/Definitions/Model/Character/CharacterGearDefinition.cs @@ -80,6 +80,30 @@ public class GearEntryDefinition public DefinitionsPack ItemLevel { get; set; } } +/// +/// Definition for Facewear slot +/// +public class FacewearEntryDefinition +{ + /// + /// Name of the facewear + /// + [JsonProperty("NAME")] + public DefinitionsPack Name { get; set; } + + /// + /// Name of the item this facewear is unlocked by + /// + [JsonProperty("UNLOCKED_BY")] + public DefinitionsPack UnlockedBy { get; set; } + + /// + /// Link to Eorzea Database for facewear + /// + [JsonProperty("DB_LINK")] + public DefinitionsPack DbLink { get; set; } +} + /// /// Definition for Soul Crystal slot /// @@ -149,7 +173,7 @@ public class CharacterGearDefinition : IDefinition /// Facewear /// [JsonProperty("FACEWEAR")] - public GearEntryDefinition Facewear { get; set; } + public FacewearEntryDefinition Facewear { get; set; } /// /// Earrings diff --git a/NetStone/Model/Parseables/Character/Gear/CharacterGear.cs b/NetStone/Model/Parseables/Character/Gear/CharacterGear.cs index 094fda2..236976c 100644 --- a/NetStone/Model/Parseables/Character/Gear/CharacterGear.cs +++ b/NetStone/Model/Parseables/Character/Gear/CharacterGear.cs @@ -66,7 +66,7 @@ public CharacterGear(LodestoneClient client, HtmlNode rootNode, CharacterGearDef /// /// Information about the characters' facewear. Null if none equipped. /// - public GearEntry? Facewear => new GearEntry(this.client, this.RootNode, this.definition.Facewear).GetOptional(); + public FacewearEntry? Facewear => new FacewearEntry(this.RootNode, this.definition.Facewear).GetOptional(); /// /// Information about the characters' earrings. Null if none equipped. diff --git a/NetStone/Model/Parseables/Character/Gear/FacewearEntry.cs b/NetStone/Model/Parseables/Character/Gear/FacewearEntry.cs new file mode 100644 index 0000000..8c7cd2c --- /dev/null +++ b/NetStone/Model/Parseables/Character/Gear/FacewearEntry.cs @@ -0,0 +1,40 @@ +using System; +using HtmlAgilityPack; +using NetStone.Definitions.Model.Character; + +namespace NetStone.Model.Parseables.Character.Gear; + +/// +/// Represents data about a character's facewear +/// +public class FacewearEntry : LodestoneParseable, IOptionalParseable +{ + private readonly FacewearEntryDefinition definition; + + /// + public FacewearEntry(HtmlNode rootNode, FacewearEntryDefinition definition) : base(rootNode) + { + this.definition = definition; + } + + /// + /// Name of the facewear + /// + public string ItemName => Parse(this.definition.Name); + + /// + /// Name of the item this facewear is unlocked by + /// + public string? UnlockedBy => ParseAttribute(this.definition.UnlockedBy, "data-tooltip"); + + /// + /// Link to this facewear's Eorzea DB page. + /// + public Uri? DbLink => ParseHref(this.definition.DbLink); + + /// + public bool Exists => HasNode(this.definition.Name); + + /// + public override string ToString() => this.ItemName; +} \ No newline at end of file diff --git a/NetStone/NetStone.xml b/NetStone/NetStone.xml index c18652f..28b037f 100644 --- a/NetStone/NetStone.xml +++ b/NetStone/NetStone.xml @@ -788,6 +788,26 @@ Item level of the item + + + Definition for Facewear slot + + + + + Name of the facewear + + + + + Name of the item this facewear is unlocked by + + + + + Link to Eorzea Database for facewear + + Definition for Soul Crystal slot @@ -2876,6 +2896,35 @@ Information about the characters' soul crystal. Null if none equipped. + + + Represents data about a character's facewear + + + + + + + + Name of the facewear + + + + + Name of the item this facewear is unlocked by + + + + + Link to this facewear's Eorzea DB page. + + + + + + + + Container class holding information about a gear slot. From e125736e5bbe9883efb490ee061da0780b14f448 Mon Sep 17 00:00:00 2001 From: Tawmy Date: Tue, 6 Jan 2026 16:56:07 +0100 Subject: [PATCH 3/3] Use ParseTooltip() method for Facewear UnlockedBy --- NetStone/Model/Parseables/Character/Gear/FacewearEntry.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NetStone/Model/Parseables/Character/Gear/FacewearEntry.cs b/NetStone/Model/Parseables/Character/Gear/FacewearEntry.cs index 8c7cd2c..b0bd54e 100644 --- a/NetStone/Model/Parseables/Character/Gear/FacewearEntry.cs +++ b/NetStone/Model/Parseables/Character/Gear/FacewearEntry.cs @@ -25,7 +25,7 @@ public FacewearEntry(HtmlNode rootNode, FacewearEntryDefinition definition) : ba /// /// Name of the item this facewear is unlocked by /// - public string? UnlockedBy => ParseAttribute(this.definition.UnlockedBy, "data-tooltip"); + public string? UnlockedBy => ParseTooltip(this.definition.UnlockedBy); /// /// Link to this facewear's Eorzea DB page.