punish v6.8.18.0

This commit is contained in:
alydev 2025-10-09 07:47:19 +10:00
commit cfb4dea47e
316 changed files with 554088 additions and 0 deletions

View file

@ -0,0 +1,200 @@
using System.Collections.Generic;
using Questionable.Model.Common.Converter;
namespace Questionable.Model.Questing.Converter;
public sealed class ActionConverter : EnumConverter<EAction>
{
private static readonly Dictionary<EAction, string> Values = new Dictionary<EAction, string>
{
{
EAction.DutyAction1,
"Duty Action I"
},
{
EAction.DutyAction2,
"Duty Action II"
},
{
EAction.HeavySwing,
"Heavy Swing"
},
{
EAction.Bootshine,
"Bootshine"
},
{
EAction.TwinSnakes,
"Twin Snakes"
},
{
EAction.Demolish,
"Demolish"
},
{
EAction.DragonKick,
"Dragon Kick"
},
{
EAction.HeavyShot,
"Heavy Shot"
},
{
EAction.Cure,
"Cure"
},
{
EAction.Cure2,
"Cure II"
},
{
EAction.Eukrasia,
"Eukrasia"
},
{
EAction.Diagnosis,
"Diagnosis"
},
{
EAction.EukrasianDiagnosis,
"Eukrasian Diagnosis"
},
{
EAction.Esuna,
"Esuna"
},
{
EAction.Physick,
"Physick"
},
{
EAction.AspectedBenefic,
"Aspected Benefic"
},
{
EAction.FormShift,
"Form Shift"
},
{
EAction.FieryBreath,
"Fiery Breath"
},
{
EAction.BuffetSanuwa,
"Buffet (Sanuwa)"
},
{
EAction.BuffetGriffin,
"Buffet (Griffin)"
},
{
EAction.Trample,
"Trample"
},
{
EAction.Fumigate,
"Fumigate"
},
{
EAction.Roar,
"Roar"
},
{
EAction.Seed,
"Seed"
},
{
EAction.Inhale,
"Inhale"
},
{
EAction.SiphonSnout,
"Siphon Snout"
},
{
EAction.PeculiarLight,
"Peculiar Light"
},
{
EAction.Cannonfire,
"Cannonfire"
},
{
EAction.RedGulal,
"Red Gulal"
},
{
EAction.YellowGulal,
"Yellow Gulal"
},
{
EAction.BlueGulal,
"Blue Gulal"
},
{
EAction.ElectrixFlux,
"Electric Flux"
},
{
EAction.HopStep,
"Hop-step"
},
{
EAction.Hide,
"Hide"
},
{
EAction.FumaShuriken,
"Fuma Shuriken"
},
{
EAction.Katon,
"Katon"
},
{
EAction.Raiton,
"Raiton"
},
{
EAction.SlugShot,
"Slug Shot"
},
{
EAction.BosomBrook,
"Bosom Brook"
},
{
EAction.Souleater,
"Souleater"
},
{
EAction.Fire3,
"Fire III"
},
{
EAction.Adloquium,
"Adloquium"
},
{
EAction.WaterCannon,
"Water Cannon"
},
{
EAction.Wasshoi,
"Wasshoi"
},
{
EAction.ShroudedLuminescence,
"Shrouded Luminescence"
},
{
EAction.BigSneeze,
"Big Sneeze"
}
};
public ActionConverter()
: base((IReadOnlyDictionary<EAction, string>)Values)
{
}
}

View file

@ -0,0 +1,593 @@
using System.Collections.Generic;
using Questionable.Model.Common;
using Questionable.Model.Common.Converter;
namespace Questionable.Model.Questing.Converter;
public sealed class AethernetShardConverter : EnumConverter<EAetheryteLocation>
{
public static readonly Dictionary<EAetheryteLocation, string> Values = new Dictionary<EAetheryteLocation, string>
{
{
EAetheryteLocation.Gridania,
"[Gridania] Aetheryte Plaza"
},
{
EAetheryteLocation.GridaniaArcher,
"[Gridania] Archers' Guild"
},
{
EAetheryteLocation.GridaniaLeatherworker,
"[Gridania] Leatherworkers' Guild & Shaded Bower"
},
{
EAetheryteLocation.GridaniaLancer,
"[Gridania] Lancers' Guild"
},
{
EAetheryteLocation.GridaniaConjurer,
"[Gridania] Conjurers' Guild"
},
{
EAetheryteLocation.GridaniaBotanist,
"[Gridania] Botanists' Guild"
},
{
EAetheryteLocation.GridaniaAmphitheatre,
"[Gridania] Mih Khetto's Amphitheatre"
},
{
EAetheryteLocation.GridaniaBlueBadgerGate,
"[Gridania] Blue Badger Gate (Central Shroud)"
},
{
EAetheryteLocation.GridaniaYellowSerpentGate,
"[Gridania] Yellow Serpent Gate (North Shroud)"
},
{
EAetheryteLocation.GridaniaWhiteWolfGate,
"[Gridania] White Wolf Gate (Central Shroud)"
},
{
EAetheryteLocation.GridaniaAirship,
"[Gridania] Airship Landing"
},
{
EAetheryteLocation.Uldah,
"[Ul'dah] Aetheryte Plaza"
},
{
EAetheryteLocation.UldahAdventurers,
"[Ul'dah] Adventurers' Guild"
},
{
EAetheryteLocation.UldahThaumaturge,
"[Ul'dah] Thaumaturges' Guild"
},
{
EAetheryteLocation.UldahGladiator,
"[Ul'dah] Gladiators' Guild"
},
{
EAetheryteLocation.UldahMiner,
"[Ul'dah] Miners' Guild"
},
{
EAetheryteLocation.UldahWeaver,
"[Ul'dah] Weavers' Guild"
},
{
EAetheryteLocation.UldahGoldsmith,
"[Ul'dah] Goldsmiths' Guild"
},
{
EAetheryteLocation.UldahSapphireAvenue,
"[Ul'dah] Sapphire Avenue Exchange"
},
{
EAetheryteLocation.UldahAlchemist,
"[Ul'dah] Alchemists' Guild"
},
{
EAetheryteLocation.UldahChamberOfRule,
"[Ul'dah] The Chamber of Rule"
},
{
EAetheryteLocation.UldahGateOfTheSultana,
"[Ul'dah] Gate of the Sultana (Western Thanalan)"
},
{
EAetheryteLocation.UldahGateOfNald,
"[Ul'dah] Gate of Nald (Central Thanalan)"
},
{
EAetheryteLocation.UldahGateOfThal,
"[Ul'dah] Gate of Thal (Central Thanalan)"
},
{
EAetheryteLocation.UldahAirship,
"[Ul'dah] Airship Landing"
},
{
EAetheryteLocation.Limsa,
"[Limsa Lominsa] Aetheryte Plaza"
},
{
EAetheryteLocation.LimsaArcanist,
"[Limsa Lominsa] Arcanists' Guild"
},
{
EAetheryteLocation.LimsaFisher,
"[Limsa Lominsa] Fishermen's Guild"
},
{
EAetheryteLocation.LimsaHawkersAlley,
"[Limsa Lominsa] Hawkers' Alley"
},
{
EAetheryteLocation.LimsaAftcastle,
"[Limsa Lominsa] The Aftcastle"
},
{
EAetheryteLocation.LimsaCulinarian,
"[Limsa Lominsa] Culinarians' Guild"
},
{
EAetheryteLocation.LimsaMarauder,
"[Limsa Lominsa] Marauders' Guild"
},
{
EAetheryteLocation.LimsaZephyrGate,
"[Limsa Lominsa] Zephyr Gate (Middle La Noscea)"
},
{
EAetheryteLocation.LimsaTempestGate,
"[Limsa Lominsa] Tempest Gate (Lower La Noscea)"
},
{
EAetheryteLocation.LimsaAirship,
"[Limsa Lominsa] Airship Landing"
},
{
EAetheryteLocation.GoldSaucer,
"[Gold Saucer] Aetheryte Plaza"
},
{
EAetheryteLocation.GoldSaucerEntranceCardSquares,
"[Gold Saucer] Entrance & Card Squares"
},
{
EAetheryteLocation.GoldSaucerWonderSquareEast,
"[Gold Saucer] Wonder Square East"
},
{
EAetheryteLocation.GoldSaucerWonderSquareWest,
"[Gold Saucer] Wonder Square West"
},
{
EAetheryteLocation.GoldSaucerEventSquare,
"[Gold Saucer] Event Square"
},
{
EAetheryteLocation.GoldSaucerCactpotBoard,
"[Gold Saucer] Cactpot Board"
},
{
EAetheryteLocation.GoldSaucerRoundSquare,
"[Gold Saucer] Round Square"
},
{
EAetheryteLocation.GoldSaucerChocoboSquare,
"[Gold Saucer] Chocobo Square"
},
{
EAetheryteLocation.GoldSaucerMinionSquare,
"[Gold Saucer] Minion Square"
},
{
EAetheryteLocation.Ishgard,
"[Ishgard] Aetheryte Plaza"
},
{
EAetheryteLocation.IshgardForgottenKnight,
"[Ishgard] The Forgotten Knight"
},
{
EAetheryteLocation.IshgardSkysteelManufactory,
"[Ishgard] Skysteel Manufactory"
},
{
EAetheryteLocation.IshgardBrume,
"[Ishgard] The Brume"
},
{
EAetheryteLocation.IshgardAthenaeumAstrologicum,
"[Ishgard] Athenaeum Astrologicum"
},
{
EAetheryteLocation.IshgardJeweledCrozier,
"[Ishgard] The Jeweled Crozier"
},
{
EAetheryteLocation.IshgardSaintReymanaudsCathedral,
"[Ishgard] Saint Reymanaud's Cathedral"
},
{
EAetheryteLocation.IshgardTribunal,
"[Ishgard] The Tribunal"
},
{
EAetheryteLocation.IshgardLastVigil,
"[Ishgard] The Last Vigil"
},
{
EAetheryteLocation.IshgardGatesOfJudgement,
"[Ishgard] The Gates of Judgement (Coerthas Central Highlands)"
},
{
EAetheryteLocation.IshgardFirmament,
"[Ishgard] Firmament"
},
{
EAetheryteLocation.FirmamentMendicantsCourt,
"[Firmament] The Mendicant's Court"
},
{
EAetheryteLocation.FirmamentMattock,
"[Firmament] The Mattock"
},
{
EAetheryteLocation.FirmamentNewNest,
"[Firmament] The New Nest"
},
{
EAetheryteLocation.FirmanentSaintRoellesDais,
"[Firmament] Saint Roelle's Dais"
},
{
EAetheryteLocation.FirmamentFeatherfall,
"[Firmament] Featherfall"
},
{
EAetheryteLocation.FirmamentHoarfrostHall,
"[Firmament] Hoarfrost Hall"
},
{
EAetheryteLocation.FirmamentWesternRisensongQuarter,
"[Firmament] Western Risensong Quarter"
},
{
EAetheryteLocation.FIrmamentEasternRisensongQuarter,
"[Firmament] Eastern Risensong Quarter"
},
{
EAetheryteLocation.Idyllshire,
"[Idyllshire] Aetheryte Plaza"
},
{
EAetheryteLocation.IdyllshireWest,
"[Idyllshire] West Idyllshire"
},
{
EAetheryteLocation.IdyllshirePrologueGate,
"[Idyllshire] Prologue Gate (Western Hinterlands)"
},
{
EAetheryteLocation.IdyllshireEpilogueGate,
"[Idyllshire] Epilogue Gate (Eastern Hinterlands)"
},
{
EAetheryteLocation.RhalgrsReach,
"[Rhalgr's Reach] Aetheryte Plaza"
},
{
EAetheryteLocation.RhalgrsReachWest,
"[Rhalgr's Reach] Western Rhalgr's Reach"
},
{
EAetheryteLocation.RhalgrsReachNorthEast,
"[Rhalgr's Reach] Northeastern Rhalgr's Reach"
},
{
EAetheryteLocation.RhalgrsReachFringesGate,
"[Rhalgr's Reach] Fringes Gate"
},
{
EAetheryteLocation.RhalgrsReachPeaksGate,
"[Rhalgr's Reach] Peaks Gate"
},
{
EAetheryteLocation.Kugane,
"[Kugane] Aetheryte Plaza"
},
{
EAetheryteLocation.KuganeShiokazeHostelry,
"[Kugane] Shiokaze Hostelry"
},
{
EAetheryteLocation.KuganePier1,
"[Kugane] Pier #1"
},
{
EAetheryteLocation.KuganeThavnairianConsulate,
"[Kugane] Thavnairian Consulate"
},
{
EAetheryteLocation.KuganeMarkets,
"[Kugane] Kogane Dori Markets"
},
{
EAetheryteLocation.KuganeBokairoInn,
"[Kugane] Bokairo Inn"
},
{
EAetheryteLocation.KuganeRubyBazaar,
"[Kugane] The Ruby Bazaar"
},
{
EAetheryteLocation.KuganeSekiseigumiBarracks,
"[Kugane] Sekiseigumi Barracks"
},
{
EAetheryteLocation.KuganeRakuzaDistrict,
"[Kugane] Rakuza District"
},
{
EAetheryteLocation.KuganeRubyPrice,
"[Kugane] The Ruby Price"
},
{
EAetheryteLocation.KuganeAirship,
"[Kugane] Airship Landing"
},
{
EAetheryteLocation.DomanEnclave,
"[Doman Enclave] Aetheryte Plaza"
},
{
EAetheryteLocation.DomanEnclaveNorthern,
"[Doman Enclave] The Northern Enclave"
},
{
EAetheryteLocation.DomanEnclaveSouthern,
"[Doman Enclave] The Southern Enclave"
},
{
EAetheryteLocation.DomanEnclaveDocks,
"[Doman Enclave] Ferry Docks"
},
{
EAetheryteLocation.DomanEnclaveOneRiver,
"[Doman Enclave] The One River"
},
{
EAetheryteLocation.DomanEnclaveGangos,
"[Doman Enclave] Gangos"
},
{
EAetheryteLocation.Crystarium,
"[Crystarium] Aetheryte Plaza"
},
{
EAetheryteLocation.CrystariumMarkets,
"[Crystarium] Musica Universalis Markets"
},
{
EAetheryteLocation.CrystariumTemenosRookery,
"[Crystarium] Temenos Rookery"
},
{
EAetheryteLocation.CrystariumDossalGate,
"[Crystarium] The Dossal Gate"
},
{
EAetheryteLocation.CrystariumPendants,
"[Crystarium] The Pendants"
},
{
EAetheryteLocation.CrystariumAmaroLaunch,
"[Crystarium] The Amaro Launch"
},
{
EAetheryteLocation.CrystariumCrystallineMean,
"[Crystarium] The Crystalline Mean"
},
{
EAetheryteLocation.CrystariumCabinetOfCuriosity,
"[Crystarium] The Cabinet of Curiosity"
},
{
EAetheryteLocation.CrystariumTessellation,
"[Crystarium] Tessellation (Lakeland)"
},
{
EAetheryteLocation.Eulmore,
"[Eulmore] Aetheryte Plaza"
},
{
EAetheryteLocation.EulmoreSoutheastDerelict,
"[Eulmore] Southeast Derelicts"
},
{
EAetheryteLocation.EulmoreNightsoilPots,
"[Eulmore] Nightsoil Pots"
},
{
EAetheryteLocation.EulmoreGloryGate,
"[Eulmore] The Glory Gate"
},
{
EAetheryteLocation.EulmoreMainstay,
"[Eulmore] The Mainstay"
},
{
EAetheryteLocation.EulmorePathToGlory,
"[Eulmore] The Path to Glory (Kholusia)"
},
{
EAetheryteLocation.OldSharlayan,
"[Old Sharlayan] Aetheryte Plaza"
},
{
EAetheryteLocation.OldSharlayanStudium,
"[Old Sharlayan] The Studium"
},
{
EAetheryteLocation.OldSharlayanBaldesionAnnex,
"[Old Sharlayan] The Baldesion Annex"
},
{
EAetheryteLocation.OldSharlayanRostra,
"[Old Sharlayan] The Rostra"
},
{
EAetheryteLocation.OldSharlayanLeveilleurEstate,
"[Old Sharlayan] The Leveilleur Estate"
},
{
EAetheryteLocation.OldSharlayanJourneysEnd,
"[Old Sharlayan] Journey's End"
},
{
EAetheryteLocation.OldSharlayanScholarsHarbor,
"[Old Sharlayan] Scholar's Harbor"
},
{
EAetheryteLocation.OldSharlayanHallOfArtifice,
"[Old Sharlayan] The Hall of Artifice (Labyrinthos)"
},
{
EAetheryteLocation.RadzAtHan,
"[Radz-at-Han] Aetheryte Plaza"
},
{
EAetheryteLocation.RadzAtHanMeghaduta,
"[Radz-at-Han] Meghaduta"
},
{
EAetheryteLocation.RadzAtHanRuveydahFibers,
"[Radz-at-Han] Ruveydah Fibers"
},
{
EAetheryteLocation.RadzAtHanAirship,
"[Radz-at-Han] Airship Landing"
},
{
EAetheryteLocation.RadzAtHanAlzadaalsPeace,
"[Radz-at-Han] Alzadaal's Peace"
},
{
EAetheryteLocation.RadzAtHanHallOfTheRadiantHost,
"[Radz-at-Han] Hall of the Radiant Host"
},
{
EAetheryteLocation.RadzAtHanMehrydesMeyhane,
"[Radz-at-Han] Mehryde's Meyhane"
},
{
EAetheryteLocation.RadzAtHanKama,
"[Radz-at-Han] Kama"
},
{
EAetheryteLocation.RadzAtHanHighCrucible,
"[Radz-at-Han] The High Crucible of Al-Kimiya"
},
{
EAetheryteLocation.RadzAtHanGateOfFirstSight,
"[Radz-at-Han] The Gate of First Sight (Thavnair)"
},
{
EAetheryteLocation.Tuliyollal,
"[Tuliyollal] Aetheryte Plaza"
},
{
EAetheryteLocation.TuliyollalDirigibleLanding,
"[Tuliyollal] Dirigible Landing"
},
{
EAetheryteLocation.TuliyollalTheResplendentQuarter,
"[Tuliyollal] The Resplendent Quarter"
},
{
EAetheryteLocation.TuliyollalTheForardCabins,
"[Tuliyollal] The For'ard Cabins"
},
{
EAetheryteLocation.TuliyollalBaysideBevyMarketplace,
"[Tuliyollal] Bayside Bevy Marketplace"
},
{
EAetheryteLocation.TuliyollalVollokShoonsa,
"[Tuliyollal] Vollok Shoonsa"
},
{
EAetheryteLocation.TuliyollalWachumeqimeqi,
"[Tuliyollal] Wachumeqimeqi"
},
{
EAetheryteLocation.TuliyollalBrightploomPost,
"[Tuliyollal] Brightploom Post"
},
{
EAetheryteLocation.TuliyollalArchOfTheDawnUrqopacha,
"[Tuliyollal] Arch of the Dawn (Urqopacha)"
},
{
EAetheryteLocation.TuliyollalArchOfTheDawnKozamauka,
"[Tuliyollal] Arch of the Dawn (Kozama'uka)"
},
{
EAetheryteLocation.TuliyollalIhuykatumu,
"[Tuliyollal] Ihuykatumu (Kozama'uka)"
},
{
EAetheryteLocation.TuliyollalDirigibleLandingYakTel,
"[Tuliyollal] Dirigible Landing (Yak T'el)"
},
{
EAetheryteLocation.TuliyollalXakTuralSkygate,
"[Tuliyollal] Xak Tural Skygate (Shaaloani)"
},
{
EAetheryteLocation.SolutionNine,
"[Solution Nine] Aetheryte Plaza"
},
{
EAetheryteLocation.SolutionNineInformationCenter,
"[Solution Nine] Information Center"
},
{
EAetheryteLocation.SolutionNineTrueVue,
"[Solution Nine] True Vue"
},
{
EAetheryteLocation.SolutionNineNeonStein,
"[Solution Nine] Neon Stein"
},
{
EAetheryteLocation.SolutionNineTheArcadion,
"[Solution Nine] The Arcadion"
},
{
EAetheryteLocation.SolutionNineResolution,
"[Solution Nine] Resolution"
},
{
EAetheryteLocation.SolutionNineNexusArcade,
"[Solution Nine] Nexus Arcade"
},
{
EAetheryteLocation.SolutionNineResidentialSector,
"[Solution Nine] Residential Sector"
},
{
EAetheryteLocation.SolutionNineScanningPortNine,
"[Solution Nine] Scanning Port Nine (Heritage Found)"
}
};
public AethernetShardConverter()
: base((IReadOnlyDictionary<EAetheryteLocation, string>)Values)
{
}
}

View file

@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Text.Json.Serialization;
using Questionable.Model.Common;
namespace Questionable.Model.Questing.Converter;
public sealed class AethernetShortcutConverter : JsonConverter<AethernetShortcut>
{
private static readonly Dictionary<EAetheryteLocation, string> EnumToString = AethernetShardConverter.Values;
private static readonly Dictionary<string, EAetheryteLocation> StringToEnum = EnumToString.ToDictionary<KeyValuePair<EAetheryteLocation, string>, string, EAetheryteLocation>((KeyValuePair<EAetheryteLocation, string> x) => x.Value, (KeyValuePair<EAetheryteLocation, string> x) => x.Key);
public override AethernetShortcut Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
if (reader.TokenType != JsonTokenType.StartArray)
{
throw new JsonException();
}
if (!reader.Read() || reader.TokenType != JsonTokenType.String)
{
throw new JsonException();
}
string key = reader.GetString() ?? throw new JsonException();
if (!reader.Read() || reader.TokenType != JsonTokenType.String)
{
throw new JsonException();
}
string key2 = reader.GetString() ?? throw new JsonException();
if (!reader.Read() || reader.TokenType != JsonTokenType.EndArray)
{
throw new JsonException();
}
AethernetShortcut aethernetShortcut = new AethernetShortcut();
if (!StringToEnum.TryGetValue(key, out var value))
{
throw new JsonException();
}
aethernetShortcut.From = value;
if (!StringToEnum.TryGetValue(key2, out var value2))
{
throw new JsonException();
}
aethernetShortcut.To = value2;
return aethernetShortcut;
}
public override void Write(Utf8JsonWriter writer, AethernetShortcut value, JsonSerializerOptions options)
{
writer.WriteStartArray();
writer.WriteStringValue(EnumToString[value.From]);
writer.WriteStringValue(EnumToString[value.To]);
writer.WriteEndArray();
}
}

View file

@ -0,0 +1,28 @@
using System.Collections.Generic;
using Questionable.Model.Common.Converter;
namespace Questionable.Model.Questing.Converter;
public sealed class CombatItemUseConditionConverter : EnumConverter<ECombatItemUseCondition>
{
private static readonly Dictionary<ECombatItemUseCondition, string> Values = new Dictionary<ECombatItemUseCondition, string>
{
{
ECombatItemUseCondition.Incapacitated,
"Incapacitated"
},
{
ECombatItemUseCondition.HealthPercent,
"Health%"
},
{
ECombatItemUseCondition.MissingStatus,
"MissingStatus"
}
};
public CombatItemUseConditionConverter()
: base((IReadOnlyDictionary<ECombatItemUseCondition, string>)Values)
{
}
}

View file

@ -0,0 +1,24 @@
using System.Collections.Generic;
using Questionable.Model.Common.Converter;
namespace Questionable.Model.Questing.Converter;
public sealed class DialogueChoiceTypeConverter : EnumConverter<EDialogChoiceType>
{
private static readonly Dictionary<EDialogChoiceType, string> Values = new Dictionary<EDialogChoiceType, string>
{
{
EDialogChoiceType.YesNo,
"YesNo"
},
{
EDialogChoiceType.List,
"List"
}
};
public DialogueChoiceTypeConverter()
: base((IReadOnlyDictionary<EDialogChoiceType, string>)Values)
{
}
}

View file

@ -0,0 +1,22 @@
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Questionable.Model.Questing.Converter;
public sealed class ElementIdConverter : JsonConverter<ElementId>
{
public override ElementId Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
if (reader.TokenType == JsonTokenType.Number)
{
return new QuestId(reader.GetUInt16());
}
return ElementId.FromString(reader.GetString() ?? throw new JsonException());
}
public override void Write(Utf8JsonWriter writer, ElementId value, JsonSerializerOptions options)
{
throw new NotImplementedException();
}
}

View file

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Questionable.Model.Questing.Converter;
public sealed class ElementIdListConverter : JsonConverter<List<ElementId>>
{
public override List<ElementId> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
if (reader.TokenType != JsonTokenType.StartArray)
{
throw new JsonException();
}
reader.Read();
List<ElementId> list = new List<ElementId>();
while (reader.TokenType != JsonTokenType.EndArray)
{
if (reader.TokenType == JsonTokenType.Number)
{
list.Add(new QuestId(reader.GetUInt16()));
}
else
{
list.Add(ElementId.FromString(reader.GetString() ?? throw new JsonException()));
}
reader.Read();
}
return list;
}
public override void Write(Utf8JsonWriter writer, List<ElementId> value, JsonSerializerOptions options)
{
throw new NotImplementedException();
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,48 @@
using System.Collections.Generic;
using Questionable.Model.Common.Converter;
namespace Questionable.Model.Questing.Converter;
public sealed class EnemySpawnTypeConverter : EnumConverter<EEnemySpawnType>
{
private static readonly Dictionary<EEnemySpawnType, string> Values = new Dictionary<EEnemySpawnType, string>
{
{
EEnemySpawnType.AfterInteraction,
"AfterInteraction"
},
{
EEnemySpawnType.AfterItemUse,
"AfterItemUse"
},
{
EEnemySpawnType.AfterAction,
"AfterAction"
},
{
EEnemySpawnType.AfterEmote,
"AfterEmote"
},
{
EEnemySpawnType.AutoOnEnterArea,
"AutoOnEnterArea"
},
{
EEnemySpawnType.OverworldEnemies,
"OverworldEnemies"
},
{
EEnemySpawnType.FateEnemies,
"FateEnemies"
},
{
EEnemySpawnType.FinishCombatIfAny,
"FinishCombatIfAny"
}
};
public EnemySpawnTypeConverter()
: base((IReadOnlyDictionary<EEnemySpawnType, string>)Values)
{
}
}

View file

@ -0,0 +1,38 @@
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Questionable.Model.Questing.Converter;
public sealed class ExcelRefConverter : JsonConverter<ExcelRef>
{
public override ExcelRef? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return reader.TokenType switch
{
JsonTokenType.String => ExcelRef.FromKey(reader.GetString()),
JsonTokenType.Number => ExcelRef.FromRowId(reader.GetUInt32()),
_ => null,
};
}
public override void Write(Utf8JsonWriter writer, ExcelRef? value, JsonSerializerOptions options)
{
if (value == null)
{
writer.WriteNullValue();
return;
}
if (value.Type == ExcelRef.EType.Key)
{
writer.WriteStringValue(value.AsKey());
return;
}
if (value.Type == ExcelRef.EType.RowId)
{
writer.WriteNumberValue(value.AsRowId());
return;
}
throw new JsonException();
}
}

View file

@ -0,0 +1,212 @@
using System.Collections.Generic;
using Questionable.Model.Common.Converter;
namespace Questionable.Model.Questing.Converter;
internal sealed class ExtendedClassJobConverter : EnumConverter<EExtendedClassJob>
{
private static readonly Dictionary<EExtendedClassJob, string> Values = new Dictionary<EExtendedClassJob, string>
{
{
EExtendedClassJob.None,
"None"
},
{
EExtendedClassJob.Gladiator,
"Gladiator"
},
{
EExtendedClassJob.Pugilist,
"Pugilist"
},
{
EExtendedClassJob.Marauder,
"Marauder"
},
{
EExtendedClassJob.Lancer,
"Lancer"
},
{
EExtendedClassJob.Archer,
"Archer"
},
{
EExtendedClassJob.Conjurer,
"Conjurer"
},
{
EExtendedClassJob.Thaumaturge,
"Thaumaturge"
},
{
EExtendedClassJob.Carpenter,
"Carpenter"
},
{
EExtendedClassJob.Blacksmith,
"Blacksmith"
},
{
EExtendedClassJob.Armorer,
"Armorer"
},
{
EExtendedClassJob.Goldsmith,
"Goldsmith"
},
{
EExtendedClassJob.Leatherworker,
"Leatherworker"
},
{
EExtendedClassJob.Weaver,
"Weaver"
},
{
EExtendedClassJob.Alchemist,
"Alchemist"
},
{
EExtendedClassJob.Culinarian,
"Culinarian"
},
{
EExtendedClassJob.Miner,
"Miner"
},
{
EExtendedClassJob.Botanist,
"Botanist"
},
{
EExtendedClassJob.Fisher,
"Fisher"
},
{
EExtendedClassJob.Paladin,
"Paladin"
},
{
EExtendedClassJob.Monk,
"Monk"
},
{
EExtendedClassJob.Warrior,
"Warrior"
},
{
EExtendedClassJob.Dragoon,
"Dragoon"
},
{
EExtendedClassJob.Bard,
"Bard"
},
{
EExtendedClassJob.WhiteMage,
"White Mage"
},
{
EExtendedClassJob.BlackMage,
"Black Mage"
},
{
EExtendedClassJob.Arcanist,
"Arcanist"
},
{
EExtendedClassJob.Summoner,
"Summoner"
},
{
EExtendedClassJob.Scholar,
"Scholar"
},
{
EExtendedClassJob.Rogue,
"Rogue"
},
{
EExtendedClassJob.Ninja,
"Ninja"
},
{
EExtendedClassJob.Machinist,
"Machinist"
},
{
EExtendedClassJob.DarkKnight,
"Dark Knight"
},
{
EExtendedClassJob.Astrologian,
"Astrologian"
},
{
EExtendedClassJob.Samurai,
"Samurai"
},
{
EExtendedClassJob.RedMage,
"Red Mage"
},
{
EExtendedClassJob.BlueMage,
"Blue Mage"
},
{
EExtendedClassJob.Gunbreaker,
"Gunbreaker"
},
{
EExtendedClassJob.Dancer,
"Dancer"
},
{
EExtendedClassJob.Reaper,
"Reaper"
},
{
EExtendedClassJob.Sage,
"Sage"
},
{
EExtendedClassJob.Viper,
"Viper"
},
{
EExtendedClassJob.Pictomancer,
"Pictomancer"
},
{
EExtendedClassJob.DoW,
"DoW"
},
{
EExtendedClassJob.DoM,
"DoM"
},
{
EExtendedClassJob.DoH,
"DoH"
},
{
EExtendedClassJob.DoL,
"DoL"
},
{
EExtendedClassJob.ConfiguredCombatJob,
"ConfiguredCombatJob"
},
{
EExtendedClassJob.QuestStartJob,
"QuestStartJob"
}
};
public ExtendedClassJobConverter()
: base((IReadOnlyDictionary<EExtendedClassJob, string>)Values)
{
}
}

View file

@ -0,0 +1,136 @@
using System.Collections.Generic;
using Questionable.Model.Common.Converter;
namespace Questionable.Model.Questing.Converter;
public sealed class InteractionTypeConverter : EnumConverter<EInteractionType>
{
private static readonly Dictionary<EInteractionType, string> Values = new Dictionary<EInteractionType, string>
{
{
EInteractionType.None,
"None"
},
{
EInteractionType.Interact,
"Interact"
},
{
EInteractionType.WalkTo,
"WalkTo"
},
{
EInteractionType.AttuneAethernetShard,
"AttuneAethernetShard"
},
{
EInteractionType.AttuneAetheryte,
"AttuneAetheryte"
},
{
EInteractionType.RegisterFreeOrFavoredAetheryte,
"RegisterFreeOrFavoredAetheryte"
},
{
EInteractionType.AttuneAetherCurrent,
"AttuneAetherCurrent"
},
{
EInteractionType.Combat,
"Combat"
},
{
EInteractionType.UseItem,
"UseItem"
},
{
EInteractionType.EquipItem,
"EquipItem"
},
{
EInteractionType.PurchaseItem,
"PurchaseItem"
},
{
EInteractionType.EquipRecommended,
"EquipRecommended"
},
{
EInteractionType.Say,
"Say"
},
{
EInteractionType.Emote,
"Emote"
},
{
EInteractionType.Action,
"Action"
},
{
EInteractionType.StatusOff,
"StatusOff"
},
{
EInteractionType.WaitForObjectAtPosition,
"WaitForNpcAtPosition"
},
{
EInteractionType.WaitForManualProgress,
"WaitForManualProgress"
},
{
EInteractionType.Duty,
"Duty"
},
{
EInteractionType.SinglePlayerDuty,
"SinglePlayerDuty"
},
{
EInteractionType.Jump,
"Jump"
},
{
EInteractionType.Dive,
"Dive"
},
{
EInteractionType.Craft,
"Craft"
},
{
EInteractionType.Gather,
"Gather"
},
{
EInteractionType.Snipe,
"Snipe"
},
{
EInteractionType.SwitchClass,
"SwitchClass"
},
{
EInteractionType.UnlockTaxiStand,
"UnlockTaxiStand"
},
{
EInteractionType.Instruction,
"Instruction"
},
{
EInteractionType.AcceptQuest,
"AcceptQuest"
},
{
EInteractionType.CompleteQuest,
"CompleteQuest"
}
};
public InteractionTypeConverter()
: base((IReadOnlyDictionary<EInteractionType, string>)Values)
{
}
}

View file

@ -0,0 +1,24 @@
using System.Collections.Generic;
using Questionable.Model.Common.Converter;
namespace Questionable.Model.Questing.Converter;
public sealed class JumpTypeConverter : EnumConverter<EJumpType>
{
private static readonly Dictionary<EJumpType, string> Values = new Dictionary<EJumpType, string>
{
{
EJumpType.SingleJump,
"SingleJump"
},
{
EJumpType.RepeatedJumps,
"RepeatedJumps"
}
};
public JumpTypeConverter()
: base((IReadOnlyDictionary<EJumpType, string>)Values)
{
}
}

View file

@ -0,0 +1,24 @@
using System.Collections.Generic;
using Questionable.Model.Common.Converter;
namespace Questionable.Model.Questing.Converter;
public sealed class LockedSkipConditionConverter : EnumConverter<ELockedSkipCondition>
{
private static readonly Dictionary<ELockedSkipCondition, string> Values = new Dictionary<ELockedSkipCondition, string>
{
{
ELockedSkipCondition.Locked,
"Locked"
},
{
ELockedSkipCondition.Unlocked,
"Unlocked"
}
};
public LockedSkipConditionConverter()
: base((IReadOnlyDictionary<ELockedSkipCondition, string>)Values)
{
}
}

View file

@ -0,0 +1,62 @@
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Questionable.Model.Questing.Converter;
public sealed class QuestWorkConfigConverter : JsonConverter<QuestWorkValue>
{
public override QuestWorkValue Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
if (reader.TokenType == JsonTokenType.Number)
{
return new QuestWorkValue(reader.GetByte());
}
if (reader.TokenType != JsonTokenType.StartObject)
{
throw new JsonException();
}
byte? high = null;
byte? low = null;
EQuestWorkMode mode = EQuestWorkMode.Bitwise;
while (reader.Read())
{
switch (reader.TokenType)
{
case JsonTokenType.PropertyName:
{
string text = reader.GetString();
if (text == null || !reader.Read())
{
throw new JsonException();
}
switch (text)
{
case "High":
high = reader.GetByte();
break;
case "Low":
low = reader.GetByte();
break;
case "Mode":
mode = new QuestWorkModeConverter().Read(ref reader, typeof(EQuestWorkMode), options);
break;
default:
throw new JsonException();
}
break;
}
case JsonTokenType.EndObject:
return new QuestWorkValue(high, low, mode);
default:
throw new JsonException();
}
}
throw new JsonException();
}
public override void Write(Utf8JsonWriter writer, QuestWorkValue value, JsonSerializerOptions options)
{
throw new NotImplementedException();
}
}

View file

@ -0,0 +1,24 @@
using System.Collections.Generic;
using Questionable.Model.Common.Converter;
namespace Questionable.Model.Questing.Converter;
public sealed class QuestWorkModeConverter : EnumConverter<EQuestWorkMode>
{
private static readonly Dictionary<EQuestWorkMode, string> Values = new Dictionary<EQuestWorkMode, string>
{
{
EQuestWorkMode.Bitwise,
"Bitwise"
},
{
EQuestWorkMode.Exact,
"Exact"
}
};
public QuestWorkModeConverter()
: base((IReadOnlyDictionary<EQuestWorkMode, string>)Values)
{
}
}

View file

@ -0,0 +1,40 @@
using System.Collections.Generic;
using Questionable.Model.Common.Converter;
namespace Questionable.Model.Questing.Converter;
public sealed class SkipConditionConverter : EnumConverter<EExtraSkipCondition>
{
private static readonly Dictionary<EExtraSkipCondition, string> Values = new Dictionary<EExtraSkipCondition, string>
{
{
EExtraSkipCondition.WakingSandsMainArea,
"WakingSandsMainArea"
},
{
EExtraSkipCondition.WakingSandsSolar,
"WakingSandsSolar"
},
{
EExtraSkipCondition.RisingStonesSolar,
"RisingStonesSolar"
},
{
EExtraSkipCondition.RoguesGuild,
"RoguesGuild"
},
{
EExtraSkipCondition.NotRoguesGuild,
"NotRoguesGuild"
},
{
EExtraSkipCondition.DockStorehouse,
"DockStorehouse"
}
};
public SkipConditionConverter()
: base((IReadOnlyDictionary<EExtraSkipCondition, string>)Values)
{
}
}

View file

@ -0,0 +1,18 @@
using System.Collections.Generic;
using Questionable.Model.Common.Converter;
namespace Questionable.Model.Questing.Converter;
public sealed class StatusConverter : EnumConverter<EStatus>
{
private static readonly Dictionary<EStatus, string> Values = new Dictionary<EStatus, string> {
{
EStatus.Hidden,
"Hidden"
} };
public StatusConverter()
: base((IReadOnlyDictionary<EStatus, string>)Values)
{
}
}