punish v6.8.18.0
This commit is contained in:
commit
cfb4dea47e
316 changed files with 554088 additions and 0 deletions
31
Questionable/Questionable.Data/AetherCurrentData.cs
Normal file
31
Questionable/Questionable.Data/AetherCurrentData.cs
Normal file
|
@ -0,0 +1,31 @@
|
|||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Lumina.Excel;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
||||
namespace Questionable.Data;
|
||||
|
||||
internal sealed class AetherCurrentData
|
||||
{
|
||||
private readonly ImmutableDictionary<ushort, ImmutableList<uint>> _overworldCurrents;
|
||||
|
||||
public AetherCurrentData(IDataManager dataManager)
|
||||
{
|
||||
_overworldCurrents = (from x in dataManager.GetExcelSheet<AetherCurrentCompFlgSet>()
|
||||
where x.RowId != 0
|
||||
where x.Territory.IsValid
|
||||
select x).ToImmutableDictionary((AetherCurrentCompFlgSet x) => (ushort)x.Territory.RowId, (AetherCurrentCompFlgSet x) => (from y in x.AetherCurrents
|
||||
where y.RowId != 0 && y.Value.Quest.RowId == 0
|
||||
select y.RowId).ToImmutableList());
|
||||
}
|
||||
|
||||
public bool IsValidAetherCurrent(ushort territoryId, uint aetherCurrentId)
|
||||
{
|
||||
if (_overworldCurrents.TryGetValue(territoryId, out ImmutableList<uint> value))
|
||||
{
|
||||
return value.Contains(aetherCurrentId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
959
Questionable/Questionable.Data/AetheryteData.cs
Normal file
959
Questionable/Questionable.Data/AetheryteData.cs
Normal file
|
@ -0,0 +1,959 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Lumina.Excel.Sheets;
|
||||
using Questionable.Model.Common;
|
||||
|
||||
namespace Questionable.Data;
|
||||
|
||||
internal sealed class AetheryteData
|
||||
{
|
||||
public ReadOnlyDictionary<EAetheryteLocation, Vector3> Locations { get; } = new Dictionary<EAetheryteLocation, Vector3>
|
||||
{
|
||||
{
|
||||
EAetheryteLocation.Gridania,
|
||||
new Vector3(32.913696f, 2.670288f, 30.014404f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GridaniaArcher,
|
||||
new Vector3(166.58276f, -1.7243042f, 86.13721f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GridaniaLeatherworker,
|
||||
new Vector3(101.27405f, 9.018005f, -111.31464f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GridaniaLancer,
|
||||
new Vector3(121.23291f, 12.649658f, -229.63306f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GridaniaConjurer,
|
||||
new Vector3(-145.15906f, 4.9591064f, -11.7647705f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GridaniaBotanist,
|
||||
new Vector3(-311.0857f, 7.94989f, -177.05048f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GridaniaAmphitheatre,
|
||||
new Vector3(-73.92999f, 7.9804688f, -140.15417f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.CentralShroudBentbranchMeadows,
|
||||
new Vector3(13.076904f, 0.56451416f, 35.90442f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.EastShroudHawthorneHut,
|
||||
new Vector3(-186.54156f, 3.7994385f, 297.56616f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.SouthShroudQuarrymill,
|
||||
new Vector3(178.60681f, 10.543945f, -68.19263f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.SouthShroudCampTranquil,
|
||||
new Vector3(-230.0603f, 22.62909f, 355.45886f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.NorthShroudFallgourdFloat,
|
||||
new Vector3(-41.58087f, -38.55963f, 233.7528f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.Uldah,
|
||||
new Vector3(-144.51825f, -1.3580933f, -169.6651f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.UldahAdventurers,
|
||||
new Vector3(64.22522f, 4.5318604f, -115.31244f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.UldahThaumaturge,
|
||||
new Vector3(-154.83331f, 14.633362f, 73.07532f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.UldahGladiator,
|
||||
new Vector3(-53.849182f, 10.696533f, 12.222412f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.UldahMiner,
|
||||
new Vector3(33.49353f, 13.229492f, 113.206665f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.UldahAlchemist,
|
||||
new Vector3(-98.25293f, 42.34375f, 88.45642f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.UldahWeaver,
|
||||
new Vector3(89.64673f, 12.924377f, 58.27417f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.UldahGoldsmith,
|
||||
new Vector3(-19.333252f, 14.602844f, 72.03784f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.UldahSapphireAvenue,
|
||||
new Vector3(131.9447f, 4.714966f, -29.800903f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.UldahChamberOfRule,
|
||||
new Vector3(6.6376343f, 30.655273f, -24.826477f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.WesternThanalanHorizon,
|
||||
new Vector3(68.0094f, 48.203125f, -227.039f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.CentralThanalanBlackBrushStation,
|
||||
new Vector3(-16.159302f, 0.32037354f, -166.58276f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.EasternThanalanCampDrybone,
|
||||
new Vector3(-386.3432f, -57.1756f, 142.59558f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.SouthernThanalanLittleAlaMhigo,
|
||||
new Vector3(-159.3805f, 30.105957f, -415.45746f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.SouthernThanalanForgottenSprings,
|
||||
new Vector3(-326.6194f, 10.696533f, 406.63757f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.NorthernThanalanCampBluefog,
|
||||
new Vector3(20.98108f, 8.8349f, 454.0321f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.NorthernThanalanCeruleumProcessingPlant,
|
||||
new Vector3(-26.596497f, 49.881714f, -30.838562f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.Limsa,
|
||||
new Vector3(-84.031494f, 20.767456f, 0.015197754f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LimsaAftcastle,
|
||||
new Vector3(16.067688f, 40.787354f, 68.80286f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LimsaCulinarian,
|
||||
new Vector3(-56.50421f, 44.47998f, -131.45648f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LimsaArcanist,
|
||||
new Vector3(-335.1645f, 12.619202f, 56.381958f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LimsaFisher,
|
||||
new Vector3(-179.40033f, 4.8065186f, 182.97095f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LimsaMarauder,
|
||||
new Vector3(-5.1728516f, 44.63257f, -218.06671f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LimsaHawkersAlley,
|
||||
new Vector3(-213.61108f, 16.739136f, 51.80432f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LowerLaNosceaMorabyDrydocks,
|
||||
new Vector3(156.11499f, 15.518433f, 673.21277f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.MiddleLaNosceaSummerfordFarms,
|
||||
new Vector3(227.98499f, 115.526f, -257.0382f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.EasternLaNosceaCostaDelSol,
|
||||
new Vector3(489.15845f, 20.828491f, 468.80298f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.EasternLaNosceaWineport,
|
||||
new Vector3(-18.387146f, 72.67859f, 3.829956f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.WesternLaNosceaSwiftperch,
|
||||
new Vector3(651.5449f, 11.734131f, 513.35913f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.WesternLaNosceaAleport,
|
||||
new Vector3(260.94446f, -19.60791f, 218.52441f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.UpperLaNosceaCampBronzeLake,
|
||||
new Vector3(437.4303f, 5.508484f, 94.590576f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.OuterLaNosceaCampOverlook,
|
||||
new Vector3(-117.54028f, 66.02576f, -212.66504f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.CoerthasCentralHighlandsCampDragonhead,
|
||||
new Vector3(223.98718f, 315.7854f, -234.85168f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.MorDhona,
|
||||
new Vector3(40.024292f, 24.002441f, -668.0247f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.WolvesDenPier,
|
||||
new Vector3(40.93994f, 5.4779663f, -14.816589f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GoldSaucer,
|
||||
new Vector3(-0.015319824f, 3.4942627f, -0.015319824f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GoldSaucerEntranceCardSquares,
|
||||
new Vector3(-64.74408f, 2.8839111f, 54.33728f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GoldSaucerWonderSquareEast,
|
||||
new Vector3(59.067627f, 23.88031f, 63.035034f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GoldSaucerWonderSquareWest,
|
||||
new Vector3(-0.38153076f, 23.88031f, 58.609863f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GoldSaucerEventSquare,
|
||||
new Vector3(95.47571f, -2.1210327f, -72.3125f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GoldSaucerCactpotBoard,
|
||||
new Vector3(114.42737f, 13.595764f, -38.864807f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GoldSaucerRoundSquare,
|
||||
new Vector3(-24.765442f, 6.1798096f, -85.67944f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GoldSaucerChocoboSquare,
|
||||
new Vector3(-16.037292f, 2.8839111f, -33.432617f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GoldSaucerMinionSquare,
|
||||
new Vector3(50.736206f, 2.8839111f, 19.912964f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.Ishgard,
|
||||
new Vector3(-63.98114f, 11.154297f, 43.9917f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.IshgardForgottenKnight,
|
||||
new Vector3(45.792236f, 24.551636f, 0.99176025f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.IshgardSkysteelManufactory,
|
||||
new Vector3(-111.436646f, 16.128723f, -27.054321f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.IshgardBrume,
|
||||
new Vector3(49.42395f, -11.154419f, 66.69714f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.IshgardAthenaeumAstrologicum,
|
||||
new Vector3(133.37903f, -8.86554f, -64.77466f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.IshgardJeweledCrozier,
|
||||
new Vector3(-134.6914f, -11.795227f, -15.396423f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.IshgardSaintReymanaudsCathedral,
|
||||
new Vector3(-77.958374f, 10.60498f, -126.54315f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.IshgardTribunal,
|
||||
new Vector3(78.01941f, 11.001709f, -126.51257f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.IshgardLastVigil,
|
||||
new Vector3(0.015197754f, 16.525452f, -32.51703f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.Idyllshire,
|
||||
new Vector3(71.94617f, 211.26111f, -18.905945f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.IdyllshireWest,
|
||||
new Vector3(-75.48645f, 210.22351f, -21.347473f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.RhalgrsReach,
|
||||
new Vector3(78.23291f, 1.9683228f, 97.45935f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.RhalgrsReachWest,
|
||||
new Vector3(-84.275635f, 0.503479f, 9.323181f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.RhalgrsReachNorthEast,
|
||||
new Vector3(101.24353f, 3.463745f, -115.46509f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.CoerthasWesternHighlandsFalconsNest,
|
||||
new Vector3(474.87585f, 217.94458f, 708.5221f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.SeaOfCloudsCampCloudtop,
|
||||
new Vector3(-615.7473f, -118.36426f, 546.5934f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.SeaOfCloudsOkZundu,
|
||||
new Vector3(-613.1533f, -49.485046f, -415.03015f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.AzysLlaHelix,
|
||||
new Vector3(-722.8046f, -182.29956f, -593.40814f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.DravanianForelandsTailfeather,
|
||||
new Vector3(532.6771f, -48.722107f, 30.166992f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.DravanianForelandsAnyxTrine,
|
||||
new Vector3(-304.12756f, -16.70868f, 32.059082f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.ChurningMistsMoghome,
|
||||
new Vector3(259.20496f, -37.70508f, 596.85657f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.ChurningMistsZenith,
|
||||
new Vector3(-584.9546f, 52.84192f, 313.43542f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.Kugane,
|
||||
new Vector3(47.501343f, 8.438171f, -37.30841f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.KuganeShiokazeHostelry,
|
||||
new Vector3(-73.16705f, -6.088379f, -77.77527f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.KuganePier1,
|
||||
new Vector3(-113.57294f, -3.8911133f, 155.41309f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.KuganeThavnairianConsulate,
|
||||
new Vector3(27.17627f, 9.048584f, 141.58838f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.KuganeMarkets,
|
||||
new Vector3(26.687988f, 4.92865f, 73.3501f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.KuganeBokairoInn,
|
||||
new Vector3(-76.00525f, 19.058472f, -161.18109f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.KuganeRubyBazaar,
|
||||
new Vector3(132.40247f, 12.954895f, 83.02429f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.KuganeSekiseigumiBarracks,
|
||||
new Vector3(119.09656f, 13.01593f, -92.881714f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.KuganeRakuzaDistrict,
|
||||
new Vector3(24.64331f, 7.003784f, -152.97174f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.FringesCastrumOriens,
|
||||
new Vector3(-629.11426f, 132.89075f, -509.14783f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.FringesPeeringStones,
|
||||
new Vector3(415.3047f, 117.357056f, 246.75354f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.PeaksAlaGannha,
|
||||
new Vector3(114.579956f, 120.10376f, -747.06647f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.PeaksAlaGhiri,
|
||||
new Vector3(-271.3817f, 259.87634f, 748.86694f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LochsPortaPraetoria,
|
||||
new Vector3(-652.0333f, 53.391357f, -16.006714f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LochsAlaMhiganQuarter,
|
||||
new Vector3(612.4512f, 84.45862f, 656.82446f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.RubySeaTamamizu,
|
||||
new Vector3(358.72437f, -118.05908f, -263.4165f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.RubySeaOnokoro,
|
||||
new Vector3(88.181885f, 4.135132f, -583.3677f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.YanxiaNamai,
|
||||
new Vector3(432.66956f, 73.07532f, -90.74542f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.YanxiaHouseOfTheFierce,
|
||||
new Vector3(246.02112f, 9.079041f, -401.3581f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.AzimSteppeReunion,
|
||||
new Vector3(556.1454f, -16.800232f, 340.10828f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.AzimSteppeDawnThrone,
|
||||
new Vector3(78.26355f, 119.37134f, 36.301147f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.AzimSteppeDhoroIloh,
|
||||
new Vector3(-754.63495f, 131.2428f, 116.5636f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.DomanEnclave,
|
||||
new Vector3(42.648926f, 1.4190674f, -14.8776245f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.DomanEnclaveNorthern,
|
||||
new Vector3(8.987488f, 0.8086548f, -105.85187f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.DomanEnclaveSouthern,
|
||||
new Vector3(-61.57019f, 0.77819824f, 90.684326f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.DomanEnclaveDocks,
|
||||
new Vector3(96.269165f, -3.4332886f, 81.01013f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.Crystarium,
|
||||
new Vector3(-65.0188f, 4.5318604f, 0.015197754f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.CrystariumMarkets,
|
||||
new Vector3(-6.149414f, -7.736328f, 148.72961f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.CrystariumTemenosRookery,
|
||||
new Vector3(-107.37775f, -0.015319824f, -58.762512f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.CrystariumDossalGate,
|
||||
new Vector3(64.86609f, -0.015319824f, -18.173523f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.CrystariumPendants,
|
||||
new Vector3(35.477173f, -0.015319824f, 222.58337f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.CrystariumAmaroLaunch,
|
||||
new Vector3(66.60559f, 35.99597f, -131.09033f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.CrystariumCrystallineMean,
|
||||
new Vector3(-52.506348f, 19.97406f, -173.35773f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.CrystariumCabinetOfCuriosity,
|
||||
new Vector3(-54.398438f, -37.70508f, -241.07733f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.Eulmore,
|
||||
new Vector3(0.015197754f, 81.986694f, 0.93078613f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.EulmoreMainstay,
|
||||
new Vector3(10.940674f, 36.087524f, -4.196289f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.EulmoreNightsoilPots,
|
||||
new Vector3(-54.093323f, -0.83929443f, 52.140015f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.EulmoreGloryGate,
|
||||
new Vector3(6.9122925f, 6.240906f, -56.351562f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.EulmoreSoutheastDerelict,
|
||||
new Vector3(71.82422f, -10.391418f, 65.32385f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LakelandFortJobb,
|
||||
new Vector3(753.7803f, 24.338135f, -28.82434f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LakelandOstallImperative,
|
||||
new Vector3(-735.01184f, 53.391357f, -230.02979f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.KholusiaStilltide,
|
||||
new Vector3(668.32983f, 29.465088f, 289.17358f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.KholusiaWright,
|
||||
new Vector3(-244.00702f, 20.736938f, 385.45813f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.KholusiaTomra,
|
||||
new Vector3(-426.38287f, 419.27222f, -623.5294f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.AmhAraengMordSouq,
|
||||
new Vector3(246.38745f, 12.985352f, -220.29456f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.AmhAraengInnAtJourneysHead,
|
||||
new Vector3(399.0996f, -24.521301f, 307.97278f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.AmhAraengTwine,
|
||||
new Vector3(-511.3451f, 47.989624f, -212.604f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.RaktikaSlitherbough,
|
||||
new Vector3(-103.4104f, -19.333252f, 297.23047f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.RaktikaFanow,
|
||||
new Vector3(382.77246f, 21.042175f, -194.11005f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.IlMhegLydhaLran,
|
||||
new Vector3(-344.71655f, 48.722046f, 512.2606f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.IlMhegPlaEnni,
|
||||
new Vector3(-72.55664f, 103.95972f, -857.35864f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.IlMhegWolekdorf,
|
||||
new Vector3(380.51416f, 87.20532f, -687.2511f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.TempestOndoCups,
|
||||
new Vector3(561.76074f, 352.62073f, -199.17603f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.TempestMacarensesAngle,
|
||||
new Vector3(-141.74109f, -280.5371f, 218.00562f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.OldSharlayan,
|
||||
new Vector3(0.07623291f, 4.8065186f, -0.10687256f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.OldSharlayanStudium,
|
||||
new Vector3(-291.1574f, 20.004517f, -74.143616f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.OldSharlayanBaldesionAnnex,
|
||||
new Vector3(-92.21033f, 2.304016f, 29.709229f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.OldSharlayanRostra,
|
||||
new Vector3(-36.94214f, 41.367188f, -156.6034f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.OldSharlayanLeveilleurEstate,
|
||||
new Vector3(204.79126f, 21.774597f, -118.73047f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.OldSharlayanJourneysEnd,
|
||||
new Vector3(206.22559f, 1.8463135f, 13.77887f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.OldSharlayanScholarsHarbor,
|
||||
new Vector3(16.494995f, -16.250854f, 127.73328f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.RadzAtHan,
|
||||
new Vector3(25.986084f, 3.250122f, -27.023743f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.RadzAtHanMeghaduta,
|
||||
new Vector3(-365.95715f, 44.99878f, -31.815125f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.RadzAtHanRuveydahFibers,
|
||||
new Vector3(-156.14563f, 35.99597f, 27.725586f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.RadzAtHanAirship,
|
||||
new Vector3(-144.33508f, 27.969727f, 202.2583f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.RadzAtHanAlzadaalsPeace,
|
||||
new Vector3(6.6071167f, -2.02948f, 110.55151f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.RadzAtHanHallOfTheRadiantHost,
|
||||
new Vector3(-141.37488f, 3.982544f, -98.435974f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.RadzAtHanMehrydesMeyhane,
|
||||
new Vector3(-42.61847f, -0.015319824f, -197.61963f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.RadzAtHanKama,
|
||||
new Vector3(129.59485f, 26.993164f, 13.473633f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.RadzAtHanHighCrucible,
|
||||
new Vector3(57.90796f, -24.704407f, -210.6203f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.FirmamentMendicantsCourt,
|
||||
new Vector3(23.941406f, -16.006714f, 169.35986f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.FirmamentMattock,
|
||||
new Vector3(76.035645f, -18.509216f, 10.299805f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.FirmamentNewNest,
|
||||
new Vector3(149.49255f, -50.003845f, 98.55798f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.FirmanentSaintRoellesDais,
|
||||
new Vector3(207.75159f, -40.024475f, -25.589417f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.FirmamentFeatherfall,
|
||||
new Vector3(-78.78235f, -0.015319824f, 75.97461f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.FirmamentHoarfrostHall,
|
||||
new Vector3(-132.55518f, 9.964111f, -14.66394f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.FirmamentWesternRisensongQuarter,
|
||||
new Vector3(-91.722046f, -0.015319824f, -115.19043f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.FIrmamentEasternRisensongQuarter,
|
||||
new Vector3(114.3053f, -20.004639f, -107.43884f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LabyrinthosArcheion,
|
||||
new Vector3(443.5338f, 170.6416f, -476.18835f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LabyrinthosSharlayanHamlet,
|
||||
new Vector3(8.377136f, -27.542603f, -46.67737f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LabyrinthosAporia,
|
||||
new Vector3(-729.18286f, -27.634155f, 302.1438f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.ThavnairYedlihmad,
|
||||
new Vector3(193.49963f, 6.9733276f, 629.2362f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.ThavnairGreatWork,
|
||||
new Vector3(-527.48914f, 4.776001f, 36.75891f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.ThavnairPalakasStand,
|
||||
new Vector3(405.1422f, 5.2643433f, -244.4953f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GarlemaldCampBrokenGlass,
|
||||
new Vector3(-408.10254f, 24.15503f, 479.9724f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GarlemaldTertium,
|
||||
new Vector3(518.9136f, -35.324707f, -178.36273f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.MareLamentorumSinusLacrimarum,
|
||||
new Vector3(-566.2471f, 134.66089f, 650.6294f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.MareLamentorumBestwaysBurrow,
|
||||
new Vector3(-0.015319824f, -128.83197f, -512.0165f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.ElpisAnagnorisis,
|
||||
new Vector3(159.96033f, 11.703674f, 126.878784f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.ElpisTwelveWonders,
|
||||
new Vector3(-633.7225f, -19.821533f, 542.56494f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.ElpisPoietenOikos,
|
||||
new Vector3(-529.9001f, 161.24207f, -222.2782f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.UltimaThuleReahTahra,
|
||||
new Vector3(-544.152f, 74.32666f, 269.6421f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.UltimaThuleAbodeOfTheEa,
|
||||
new Vector3(64.286255f, 272.48022f, -657.49603f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.UltimaThuleBaseOmicron,
|
||||
new Vector3(489.2804f, 437.5829f, 333.63843f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.Tuliyollal,
|
||||
new Vector3(-24.093994f, 0.77819824f, 7.583679f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.TuliyollalDirigibleLanding,
|
||||
new Vector3(-413.68738f, 2.9754639f, -45.975464f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.TuliyollalTheResplendentQuarter,
|
||||
new Vector3(-187.1214f, 39.93274f, 6.088318f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.TuliyollalTheForardCabins,
|
||||
new Vector3(-149.73682f, -15.030151f, 198.90125f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.TuliyollalBaysideBevyMarketplace,
|
||||
new Vector3(-14.999634f, -10.025269f, 135.57642f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.TuliyollalVollokShoonsa,
|
||||
new Vector3(-99.13794f, 100.72473f, -222.03406f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.TuliyollalWachumeqimeqi,
|
||||
new Vector3(166.27747f, -17.990417f, 38.742676f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.TuliyollalBrightploomPost,
|
||||
new Vector3(71.7937f, 47.074097f, -333.21124f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.SolutionNine,
|
||||
new Vector3(-0.015319824f, 8.987488f, -0.015319824f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.SolutionNineInformationCenter,
|
||||
new Vector3(-30.441833f, -6.0579224f, 209.3385f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.SolutionNineTrueVue,
|
||||
new Vector3(382.6809f, 59.983154f, 76.67651f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.SolutionNineNeonStein,
|
||||
new Vector3(258.28943f, 50.736206f, 148.72961f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.SolutionNineTheArcadion,
|
||||
new Vector3(374.77686f, 60.01367f, 325.67322f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.SolutionNineResolution,
|
||||
new Vector3(-32.059265f, 38.04065f, -345.2354f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.SolutionNineNexusArcade,
|
||||
new Vector3(-160.05188f, -0.015319824f, 21.591492f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.SolutionNineResidentialSector,
|
||||
new Vector3(-378.13385f, 13.992493f, 136.49194f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.UrqopachaWachunpelo,
|
||||
new Vector3(332.96704f, -160.11298f, -416.22034f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.UrqopachaWorlarsEcho,
|
||||
new Vector3(465.62903f, 114.94617f, 634.9126f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.KozamaukaOkHanu,
|
||||
new Vector3(-169.51251f, 6.576599f, -479.42322f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.KozamaukaManyFires,
|
||||
new Vector3(541.16125f, 117.41809f, 203.60107f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.KozamaukaEarthenshire,
|
||||
new Vector3(-477.53113f, 124.04053f, 311.32983f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.KozamaukaDockPoga,
|
||||
new Vector3(787.59436f, 14.175598f, -236.22491f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.YakTelIqBraax,
|
||||
new Vector3(-397.05505f, 23.5141f, -431.93713f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.YakTelMamook,
|
||||
new Vector3(721.40076f, -132.31104f, 526.1769f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.ShaaloaniHhusatahwi,
|
||||
new Vector3(386.40417f, -0.19836426f, 467.61267f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.ShaaloaniShesheneweziSprings,
|
||||
new Vector3(-291.70673f, 19.08899f, -114.54956f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.ShaaloaniMehwahhetsoan,
|
||||
new Vector3(311.36023f, -14.175659f, -567.74243f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.HeritageFoundYyasulaniStation,
|
||||
new Vector3(514.6105f, 145.86096f, 207.56836f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.HeritageFoundTheOutskirts,
|
||||
new Vector3(-223.0412f, 31.937134f, -584.03906f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.HeritageFoundElectropeStrike,
|
||||
new Vector3(-219.53156f, 32.913696f, 120.77515f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LivingMemoryLeynodeMnemo,
|
||||
new Vector3(-0.22894287f, 57.175537f, 796.9634f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LivingMemoryLeynodePyro,
|
||||
new Vector3(657.98413f, 28.976807f, -284.01617f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.LivingMemoryLeynodeAero,
|
||||
new Vector3(-255.26825f, 59.433838f, -397.6654f)
|
||||
}
|
||||
}.AsReadOnly();
|
||||
|
||||
private ReadOnlyDictionary<EAetheryteLocation, Vector3> AirshipLandingLocations { get; } = new Dictionary<EAetheryteLocation, Vector3>
|
||||
{
|
||||
{
|
||||
EAetheryteLocation.LimsaAirship,
|
||||
new Vector3(-19.44352f, 91.99999f, -9.892939f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.GridaniaAirship,
|
||||
new Vector3(24.86354f, -19.000002f, 96f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.UldahAirship,
|
||||
new Vector3(-16.954851f, 82.999985f, -9.421141f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.KuganeAirship,
|
||||
new Vector3(-55.72525f, 79.10602f, 46.23109f)
|
||||
},
|
||||
{
|
||||
EAetheryteLocation.IshgardFirmament,
|
||||
new Vector3(9.92315f, -15.2f, 173.5059f)
|
||||
}
|
||||
}.AsReadOnly();
|
||||
|
||||
public ReadOnlyDictionary<EAetheryteLocation, ushort> TerritoryIds { get; }
|
||||
|
||||
public ReadOnlyDictionary<EAetheryteLocation, ushort> AethernetGroups { get; }
|
||||
|
||||
private IReadOnlyList<ushort> TownTerritoryIds { get; set; }
|
||||
|
||||
public AetheryteData(IDataManager dataManager)
|
||||
{
|
||||
Dictionary<EAetheryteLocation, ushort> territoryIds = new Dictionary<EAetheryteLocation, ushort>();
|
||||
Dictionary<EAetheryteLocation, ushort> aethernetGroups = new Dictionary<EAetheryteLocation, ushort>();
|
||||
foreach (Aetheryte item in from x in dataManager.GetExcelSheet<Aetheryte>()
|
||||
where x.RowId != 0
|
||||
select x)
|
||||
{
|
||||
if (item.Territory.RowId != 0)
|
||||
{
|
||||
territoryIds[(EAetheryteLocation)item.RowId] = (ushort)item.Territory.RowId;
|
||||
}
|
||||
if (item.AethernetGroup > 0)
|
||||
{
|
||||
aethernetGroups[(EAetheryteLocation)item.RowId] = item.AethernetGroup;
|
||||
}
|
||||
}
|
||||
ConfigureAetheryte(EAetheryteLocation.IshgardFirmament, 886, aethernetGroups[EAetheryteLocation.Ishgard]);
|
||||
ConfigureAetheryteWithAutoGroup(EAetheryteLocation.FirmamentMendicantsCourt, 886);
|
||||
ConfigureAetheryteWithAutoGroup(EAetheryteLocation.FirmamentMattock, 886);
|
||||
ConfigureAetheryteWithAutoGroup(EAetheryteLocation.FirmamentNewNest, 886);
|
||||
ConfigureAetheryteWithAutoGroup(EAetheryteLocation.FirmanentSaintRoellesDais, 886);
|
||||
ConfigureAetheryteWithAutoGroup(EAetheryteLocation.FirmamentFeatherfall, 886);
|
||||
ConfigureAetheryteWithAutoGroup(EAetheryteLocation.FirmamentHoarfrostHall, 886);
|
||||
ConfigureAetheryteWithAutoGroup(EAetheryteLocation.FirmamentWesternRisensongQuarter, 886);
|
||||
ConfigureAetheryteWithAutoGroup(EAetheryteLocation.FIrmamentEasternRisensongQuarter, 886);
|
||||
TerritoryIds = territoryIds.AsReadOnly();
|
||||
AethernetGroups = aethernetGroups.AsReadOnly();
|
||||
TownTerritoryIds = (from x in dataManager.GetExcelSheet<TerritoryType>()
|
||||
where x.RowId != 0 && !string.IsNullOrEmpty(x.Name.ToString()) && x.TerritoryIntendedUse.RowId == 0
|
||||
select (ushort)x.RowId).ToList();
|
||||
void ConfigureAetheryte(EAetheryteLocation aetheryteLocation, ushort territoryId, ushort aethernetGroup)
|
||||
{
|
||||
territoryIds[aetheryteLocation] = territoryId;
|
||||
aethernetGroups[aetheryteLocation] = aethernetGroup;
|
||||
}
|
||||
void ConfigureAetheryteWithAutoGroup(EAetheryteLocation aetheryteLocation, ushort territoryId)
|
||||
{
|
||||
ConfigureAetheryte(aetheryteLocation, territoryId, (ushort)((int)aetheryteLocation / 100));
|
||||
}
|
||||
}
|
||||
|
||||
public float CalculateDistance(Vector3 fromPosition, ushort fromTerritoryType, EAetheryteLocation to)
|
||||
{
|
||||
if (!TerritoryIds.TryGetValue(to, out var value) || fromTerritoryType != value)
|
||||
{
|
||||
return float.MaxValue;
|
||||
}
|
||||
if (!Locations.TryGetValue(to, out var value2))
|
||||
{
|
||||
return float.MaxValue;
|
||||
}
|
||||
return (fromPosition - value2).Length();
|
||||
}
|
||||
|
||||
public float CalculateAirshipLandingDistance(Vector3 fromPosition, ushort fromTerritoryType, EAetheryteLocation to)
|
||||
{
|
||||
if (!TerritoryIds.TryGetValue(to, out var value) || fromTerritoryType != value)
|
||||
{
|
||||
return float.MaxValue;
|
||||
}
|
||||
if (!AirshipLandingLocations.TryGetValue(to, out var value2))
|
||||
{
|
||||
return float.MaxValue;
|
||||
}
|
||||
return (fromPosition - value2).Length();
|
||||
}
|
||||
|
||||
public bool IsCityAetheryte(EAetheryteLocation aetheryte)
|
||||
{
|
||||
if (aetheryte == EAetheryteLocation.IshgardFirmament)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
ushort value = TerritoryIds[aetheryte];
|
||||
return TownTerritoryIds.Contains(value);
|
||||
}
|
||||
|
||||
public bool IsAirshipLanding(EAetheryteLocation aetheryte)
|
||||
{
|
||||
return AirshipLandingLocations.ContainsKey(aetheryte);
|
||||
}
|
||||
|
||||
public bool IsGoldSaucerAetheryte(EAetheryteLocation aetheryte)
|
||||
{
|
||||
ushort num = TerritoryIds[aetheryte];
|
||||
if (num == 144 || num == 388)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
246
Questionable/Questionable.Data/AlliedSocietyData.cs
Normal file
246
Questionable/Questionable.Data/AlliedSocietyData.cs
Normal file
|
@ -0,0 +1,246 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.Common;
|
||||
using Questionable.Model.Questing;
|
||||
|
||||
namespace Questionable.Data;
|
||||
|
||||
internal sealed class AlliedSocietyData
|
||||
{
|
||||
public ReadOnlyDictionary<ushort, AlliedSocietyMountConfiguration> Mounts { get; } = new Dictionary<ushort, AlliedSocietyMountConfiguration>
|
||||
{
|
||||
{
|
||||
66,
|
||||
new AlliedSocietyMountConfiguration(new global::_003C_003Ez__ReadOnlySingleElementList<uint>(1016093u), EAetheryteLocation.SeaOfCloudsOkZundu)
|
||||
},
|
||||
{
|
||||
79,
|
||||
new AlliedSocietyMountConfiguration(new global::_003C_003Ez__ReadOnlySingleElementList<uint>(1017031u), EAetheryteLocation.DravanianForelandsAnyxTrine)
|
||||
},
|
||||
{
|
||||
88,
|
||||
new AlliedSocietyMountConfiguration(new global::_003C_003Ez__ReadOnlyArray<uint>(new uint[2] { 1017470u, 1017432u }), EAetheryteLocation.ChurningMistsZenith)
|
||||
},
|
||||
{
|
||||
89,
|
||||
new AlliedSocietyMountConfiguration(new global::_003C_003Ez__ReadOnlySingleElementList<uint>(1017322u), EAetheryteLocation.ChurningMistsZenith)
|
||||
},
|
||||
{
|
||||
147,
|
||||
new AlliedSocietyMountConfiguration(new global::_003C_003Ez__ReadOnlyArray<uint>(new uint[2] { 1024777u, 1024912u }), EAetheryteLocation.FringesPeeringStones)
|
||||
},
|
||||
{
|
||||
369,
|
||||
new AlliedSocietyMountConfiguration(new global::_003C_003Ez__ReadOnlySingleElementList<uint>(1051798u), EAetheryteLocation.KozamaukaDockPoga)
|
||||
},
|
||||
{
|
||||
391,
|
||||
new AlliedSocietyMountConfiguration(new global::_003C_003Ez__ReadOnlySingleElementList<uint>(1052562u), EAetheryteLocation.YakTelMamook)
|
||||
},
|
||||
{
|
||||
24,
|
||||
new AlliedSocietyMountConfiguration(new global::_003C_003Ez__ReadOnlySingleElementList<uint>(1052562u), EAetheryteLocation.EastShroudHawthorneHut)
|
||||
}
|
||||
}.AsReadOnly();
|
||||
|
||||
public EAlliedSociety GetCommonAlliedSocietyTurnIn(ElementId elementId)
|
||||
{
|
||||
if (elementId is QuestId { Value: var value })
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 2171:
|
||||
case 2172:
|
||||
case 2173:
|
||||
case 2174:
|
||||
case 2175:
|
||||
case 2176:
|
||||
case 2177:
|
||||
case 2178:
|
||||
case 2179:
|
||||
case 2180:
|
||||
case 2181:
|
||||
case 2182:
|
||||
case 2183:
|
||||
case 2184:
|
||||
case 2185:
|
||||
case 2186:
|
||||
case 2187:
|
||||
case 2188:
|
||||
case 2189:
|
||||
case 2190:
|
||||
case 2191:
|
||||
case 2192:
|
||||
case 2193:
|
||||
case 2194:
|
||||
case 2195:
|
||||
case 2196:
|
||||
case 2197:
|
||||
case 2198:
|
||||
case 2199:
|
||||
case 2200:
|
||||
return EAlliedSociety.VanuVanu;
|
||||
case 2261:
|
||||
case 2262:
|
||||
case 2263:
|
||||
case 2264:
|
||||
case 2265:
|
||||
case 2266:
|
||||
case 2267:
|
||||
case 2268:
|
||||
case 2269:
|
||||
case 2270:
|
||||
case 2271:
|
||||
case 2272:
|
||||
case 2273:
|
||||
case 2274:
|
||||
case 2275:
|
||||
case 2276:
|
||||
case 2277:
|
||||
case 2278:
|
||||
case 2279:
|
||||
case 2280:
|
||||
return EAlliedSociety.Vath;
|
||||
case 2290:
|
||||
case 2291:
|
||||
case 2292:
|
||||
case 2293:
|
||||
case 2294:
|
||||
case 2295:
|
||||
case 2296:
|
||||
case 2297:
|
||||
case 2298:
|
||||
case 2299:
|
||||
case 2300:
|
||||
case 2301:
|
||||
case 2302:
|
||||
case 2303:
|
||||
case 2304:
|
||||
case 2305:
|
||||
case 2306:
|
||||
case 2307:
|
||||
case 2308:
|
||||
case 2309:
|
||||
case 2310:
|
||||
case 2311:
|
||||
case 2312:
|
||||
case 2313:
|
||||
case 2314:
|
||||
case 2315:
|
||||
case 2316:
|
||||
case 2317:
|
||||
case 2318:
|
||||
case 2319:
|
||||
return EAlliedSociety.Moogles;
|
||||
case 5199:
|
||||
case 5200:
|
||||
case 5201:
|
||||
case 5202:
|
||||
case 5203:
|
||||
case 5204:
|
||||
case 5205:
|
||||
case 5206:
|
||||
case 5207:
|
||||
case 5208:
|
||||
case 5209:
|
||||
case 5210:
|
||||
case 5211:
|
||||
case 5212:
|
||||
case 5213:
|
||||
case 5214:
|
||||
case 5215:
|
||||
case 5216:
|
||||
case 5217:
|
||||
case 5218:
|
||||
case 5219:
|
||||
case 5220:
|
||||
case 5221:
|
||||
case 5222:
|
||||
case 5223:
|
||||
case 5224:
|
||||
case 5225:
|
||||
case 5226:
|
||||
return EAlliedSociety.Pelupelu;
|
||||
case 5261:
|
||||
case 5262:
|
||||
case 5263:
|
||||
case 5264:
|
||||
case 5265:
|
||||
case 5266:
|
||||
case 5267:
|
||||
case 5268:
|
||||
case 5269:
|
||||
case 5270:
|
||||
case 5271:
|
||||
case 5272:
|
||||
case 5273:
|
||||
case 5274:
|
||||
case 5275:
|
||||
case 5276:
|
||||
case 5277:
|
||||
case 5278:
|
||||
case 5279:
|
||||
case 5280:
|
||||
case 5281:
|
||||
case 5282:
|
||||
case 5283:
|
||||
case 5284:
|
||||
case 5285:
|
||||
case 5286:
|
||||
case 5287:
|
||||
case 5288:
|
||||
return EAlliedSociety.MamoolJa;
|
||||
case 5343:
|
||||
case 5344:
|
||||
case 5345:
|
||||
case 5346:
|
||||
case 5347:
|
||||
case 5348:
|
||||
case 5349:
|
||||
case 5350:
|
||||
case 5351:
|
||||
case 5352:
|
||||
case 5353:
|
||||
case 5354:
|
||||
case 5355:
|
||||
case 5356:
|
||||
case 5357:
|
||||
case 5358:
|
||||
case 5359:
|
||||
case 5360:
|
||||
case 5361:
|
||||
case 5362:
|
||||
case 5363:
|
||||
return EAlliedSociety.YokHuy;
|
||||
default:
|
||||
return EAlliedSociety.None;
|
||||
}
|
||||
}
|
||||
return EAlliedSociety.None;
|
||||
}
|
||||
|
||||
public void GetCommonAlliedSocietyNpcs(EAlliedSociety alliedSociety, out uint[] normalNpcs, out uint[] mountNpcs)
|
||||
{
|
||||
switch (alliedSociety)
|
||||
{
|
||||
case EAlliedSociety.VanuVanu:
|
||||
normalNpcs = new uint[3] { 1016088u, 1016091u, 1016092u };
|
||||
mountNpcs = new uint[1] { 1016093u };
|
||||
break;
|
||||
case EAlliedSociety.Vath:
|
||||
normalNpcs = Array.Empty<uint>();
|
||||
mountNpcs = new uint[1] { 1017031u };
|
||||
break;
|
||||
case EAlliedSociety.Moogles:
|
||||
normalNpcs = Array.Empty<uint>();
|
||||
mountNpcs = new uint[3] { 1017322u, 1017470u, 1017471u };
|
||||
break;
|
||||
default:
|
||||
normalNpcs = Array.Empty<uint>();
|
||||
mountNpcs = Array.Empty<uint>();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using Questionable.Model.Common;
|
||||
|
||||
namespace Questionable.Data;
|
||||
|
||||
public sealed record AlliedSocietyMountConfiguration(IReadOnlyList<uint> IssuerDataIds, EAetheryteLocation ClosestAetheryte);
|
262
Questionable/Questionable.Data/ClassJobUtils.cs
Normal file
262
Questionable/Questionable.Data/ClassJobUtils.cs
Normal file
|
@ -0,0 +1,262 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Application.Network.WorkDefinitions;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.UI;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
|
||||
using LLib.GameData;
|
||||
using Lumina.Excel.Sheets;
|
||||
using Questionable.Model.Questing;
|
||||
|
||||
namespace Questionable.Data;
|
||||
|
||||
internal sealed class ClassJobUtils
|
||||
{
|
||||
private readonly Configuration _configuration;
|
||||
|
||||
private readonly ReadOnlyDictionary<EClassJob, sbyte> _classJobToExpArrayIndex;
|
||||
|
||||
public readonly ReadOnlyCollection<(EClassJob ClassJob, int Category)> SortedClassJobs;
|
||||
|
||||
public ClassJobUtils(Configuration configuration, IDataManager dataManager)
|
||||
{
|
||||
_configuration = configuration;
|
||||
_classJobToExpArrayIndex = (from x in dataManager.GetExcelSheet<ClassJob>()
|
||||
where x.RowId != 0 && x.ExpArrayIndex >= 0
|
||||
select x).ToDictionary((ClassJob x) => (EClassJob)x.RowId, (ClassJob x) => x.ExpArrayIndex).AsReadOnly();
|
||||
SortedClassJobs = (from x in dataManager.GetExcelSheet<ClassJob>()
|
||||
select (ClassJob: (EClassJob)x.RowId, Priority: x.UIPriority) into x
|
||||
orderby x.Priority
|
||||
select (ClassJob: x.ClassJob, x.Priority / 10)).ToList().AsReadOnly();
|
||||
}
|
||||
|
||||
public IEnumerable<EClassJob> AsIndividualJobs(EExtendedClassJob classJob, ElementId? referenceQuest)
|
||||
{
|
||||
switch (classJob)
|
||||
{
|
||||
case EExtendedClassJob.Gladiator:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Gladiator);
|
||||
case EExtendedClassJob.Pugilist:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Pugilist);
|
||||
case EExtendedClassJob.Marauder:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Marauder);
|
||||
case EExtendedClassJob.Lancer:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Lancer);
|
||||
case EExtendedClassJob.Archer:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Archer);
|
||||
case EExtendedClassJob.Conjurer:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Conjurer);
|
||||
case EExtendedClassJob.Thaumaturge:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Thaumaturge);
|
||||
case EExtendedClassJob.Carpenter:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Carpenter);
|
||||
case EExtendedClassJob.Blacksmith:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Blacksmith);
|
||||
case EExtendedClassJob.Armorer:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Armorer);
|
||||
case EExtendedClassJob.Goldsmith:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Goldsmith);
|
||||
case EExtendedClassJob.Leatherworker:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Leatherworker);
|
||||
case EExtendedClassJob.Weaver:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Weaver);
|
||||
case EExtendedClassJob.Alchemist:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Alchemist);
|
||||
case EExtendedClassJob.Culinarian:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Culinarian);
|
||||
case EExtendedClassJob.Miner:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Miner);
|
||||
case EExtendedClassJob.Botanist:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Botanist);
|
||||
case EExtendedClassJob.Fisher:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Fisher);
|
||||
case EExtendedClassJob.Paladin:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Paladin);
|
||||
case EExtendedClassJob.Monk:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Monk);
|
||||
case EExtendedClassJob.Warrior:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Warrior);
|
||||
case EExtendedClassJob.Dragoon:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Dragoon);
|
||||
case EExtendedClassJob.Bard:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Bard);
|
||||
case EExtendedClassJob.WhiteMage:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.WhiteMage);
|
||||
case EExtendedClassJob.BlackMage:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.BlackMage);
|
||||
case EExtendedClassJob.Arcanist:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Arcanist);
|
||||
case EExtendedClassJob.Summoner:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Summoner);
|
||||
case EExtendedClassJob.Scholar:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Scholar);
|
||||
case EExtendedClassJob.Rogue:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Rogue);
|
||||
case EExtendedClassJob.Ninja:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Ninja);
|
||||
case EExtendedClassJob.Machinist:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Machinist);
|
||||
case EExtendedClassJob.DarkKnight:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.DarkKnight);
|
||||
case EExtendedClassJob.Astrologian:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Astrologian);
|
||||
case EExtendedClassJob.Samurai:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Samurai);
|
||||
case EExtendedClassJob.RedMage:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.RedMage);
|
||||
case EExtendedClassJob.BlueMage:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.BlueMage);
|
||||
case EExtendedClassJob.Gunbreaker:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Gunbreaker);
|
||||
case EExtendedClassJob.Dancer:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Dancer);
|
||||
case EExtendedClassJob.Reaper:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Reaper);
|
||||
case EExtendedClassJob.Sage:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Sage);
|
||||
case EExtendedClassJob.Viper:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Viper);
|
||||
case EExtendedClassJob.Pictomancer:
|
||||
return new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(EClassJob.Pictomancer);
|
||||
case EExtendedClassJob.DoW:
|
||||
return from x in Enum.GetValues<EClassJob>()
|
||||
where x.DealsPhysicalDamage()
|
||||
select x;
|
||||
case EExtendedClassJob.DoM:
|
||||
return from x in Enum.GetValues<EClassJob>()
|
||||
where x.DealsMagicDamage()
|
||||
select x;
|
||||
case EExtendedClassJob.DoH:
|
||||
return from x in Enum.GetValues<EClassJob>()
|
||||
where x.IsCrafter()
|
||||
select x;
|
||||
case EExtendedClassJob.DoL:
|
||||
return from x in Enum.GetValues<EClassJob>()
|
||||
where x.IsGatherer()
|
||||
select x;
|
||||
case EExtendedClassJob.ConfiguredCombatJob:
|
||||
{
|
||||
EClassJob eClassJob2 = LookupConfiguredCombatJob();
|
||||
IEnumerable<EClassJob> result2;
|
||||
if (eClassJob2 == EClassJob.Adventurer)
|
||||
{
|
||||
IEnumerable<EClassJob> enumerable = Array.Empty<EClassJob>();
|
||||
result2 = enumerable;
|
||||
}
|
||||
else
|
||||
{
|
||||
IEnumerable<EClassJob> enumerable = new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(eClassJob2);
|
||||
result2 = enumerable;
|
||||
}
|
||||
return result2;
|
||||
}
|
||||
case EExtendedClassJob.QuestStartJob:
|
||||
{
|
||||
EClassJob eClassJob = LookupQuestStartJob(referenceQuest);
|
||||
IEnumerable<EClassJob> result;
|
||||
if (eClassJob == EClassJob.Adventurer)
|
||||
{
|
||||
IEnumerable<EClassJob> enumerable = Array.Empty<EClassJob>();
|
||||
result = enumerable;
|
||||
}
|
||||
else
|
||||
{
|
||||
IEnumerable<EClassJob> enumerable = new global::_003C_003Ez__ReadOnlySingleElementList<EClassJob>(eClassJob);
|
||||
result = enumerable;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException("classJob", classJob, null);
|
||||
}
|
||||
}
|
||||
|
||||
private EClassJob LookupConfiguredCombatJob()
|
||||
{
|
||||
EClassJob configuredJob = _configuration.General.CombatJob;
|
||||
ReadOnlyCollection<(EClassJob, short, short)> combatJobGearSets = GetCombatJobGearSets();
|
||||
HashSet<EClassJob> hashSet = combatJobGearSets.Select<(EClassJob, short, short), EClassJob>(((EClassJob ClassJob, short Level, short ItemLevel) x) => x.ClassJob).Distinct().ToHashSet();
|
||||
if (configuredJob != EClassJob.Adventurer)
|
||||
{
|
||||
if (hashSet.Contains(configuredJob))
|
||||
{
|
||||
return configuredJob;
|
||||
}
|
||||
EClassJob eClassJob = Enum.GetValues<EClassJob>().SingleOrDefault((EClassJob x) => x.IsClass() && x.AsJob() == configuredJob);
|
||||
if (eClassJob != EClassJob.Adventurer && hashSet.Contains(eClassJob))
|
||||
{
|
||||
return eClassJob;
|
||||
}
|
||||
}
|
||||
return (from x in (from x in combatJobGearSets
|
||||
orderby x.Level descending, x.ItemLevel descending
|
||||
select x).ThenByDescending<(EClassJob, short, short), int>(delegate((EClassJob ClassJob, short Level, short ItemLevel) x)
|
||||
{
|
||||
if (x.ClassJob.IsCaster())
|
||||
{
|
||||
return 50;
|
||||
}
|
||||
if (x.ClassJob.IsPhysicalRanged())
|
||||
{
|
||||
return 40;
|
||||
}
|
||||
if (x.ClassJob.IsMelee())
|
||||
{
|
||||
return 30;
|
||||
}
|
||||
if (x.ClassJob.IsTank())
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
return x.ClassJob.IsHealer() ? 10 : 0;
|
||||
})
|
||||
select x.ClassJob).DefaultIfEmpty(EClassJob.Adventurer).FirstOrDefault();
|
||||
}
|
||||
|
||||
private unsafe ReadOnlyCollection<(EClassJob ClassJob, short Level, short ItemLevel)> GetCombatJobGearSets()
|
||||
{
|
||||
List<(EClassJob, short, short)> list = new List<(EClassJob, short, short)>();
|
||||
PlayerState* ptr = PlayerState.Instance();
|
||||
RaptureGearsetModule* ptr2 = RaptureGearsetModule.Instance();
|
||||
if (ptr == null || ptr2 == null)
|
||||
{
|
||||
return list.AsReadOnly();
|
||||
}
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
RaptureGearsetModule.GearsetEntry* gearset = ptr2->GetGearset(i);
|
||||
if (!gearset->Flags.HasFlag(RaptureGearsetModule.GearsetFlag.Exists))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
EClassJob classJob = (EClassJob)gearset->ClassJob;
|
||||
if (!classJob.IsCrafter() && !classJob.IsGatherer())
|
||||
{
|
||||
short num = ptr->ClassJobLevels[_classJobToExpArrayIndex[classJob]];
|
||||
if (num != 0)
|
||||
{
|
||||
short itemLevel = gearset->ItemLevel;
|
||||
list.Add((classJob, num, itemLevel));
|
||||
}
|
||||
}
|
||||
}
|
||||
return list.AsReadOnly();
|
||||
}
|
||||
|
||||
private unsafe EClassJob LookupQuestStartJob(ElementId? elementId)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(elementId, "elementId");
|
||||
if (elementId is QuestId questId)
|
||||
{
|
||||
QuestWork* questById = QuestManager.Instance()->GetQuestById(questId.Value);
|
||||
if (questById->AcceptClassJob != 0)
|
||||
{
|
||||
return (EClassJob)questById->AcceptClassJob;
|
||||
}
|
||||
}
|
||||
return EClassJob.Adventurer;
|
||||
}
|
||||
}
|
91
Questionable/Questionable.Data/GatheringData.cs
Normal file
91
Questionable/Questionable.Data/GatheringData.cs
Normal file
|
@ -0,0 +1,91 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Lumina.Excel;
|
||||
using Lumina.Excel.Sheets;
|
||||
using Questionable.Model.Gathering;
|
||||
|
||||
namespace Questionable.Data;
|
||||
|
||||
internal sealed class GatheringData
|
||||
{
|
||||
private readonly Dictionary<uint, GatheringPointId> _minerGatheringPoints = new Dictionary<uint, GatheringPointId>();
|
||||
|
||||
private readonly Dictionary<uint, GatheringPointId> _botanistGatheringPoints = new Dictionary<uint, GatheringPointId>();
|
||||
|
||||
private readonly Dictionary<uint, ushort> _itemIdToCollectability;
|
||||
|
||||
private readonly Dictionary<uint, uint> _npcForCustomDeliveries;
|
||||
|
||||
public IEnumerable<GatheringPointId> MinerGatheringPoints => _minerGatheringPoints.Values;
|
||||
|
||||
public IEnumerable<GatheringPointId> BotanistGatheringPoints => _botanistGatheringPoints.Values;
|
||||
|
||||
public GatheringData(IDataManager dataManager)
|
||||
{
|
||||
Dictionary<uint, uint> dictionary = (from x in dataManager.GetExcelSheet<GatheringItem>()
|
||||
where x.RowId != 0 && x.Item.RowId != 0
|
||||
select x).ToDictionary((GatheringItem x) => x.RowId, (GatheringItem x) => x.Item.RowId);
|
||||
foreach (GatheringPointBase item in dataManager.GetExcelSheet<GatheringPointBase>())
|
||||
{
|
||||
foreach (RowRef item2 in item.Item.Where((RowRef x) => x.RowId != 0))
|
||||
{
|
||||
if (!dictionary.TryGetValue(item2.RowId, out var value))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
uint rowId = item.GatheringType.RowId;
|
||||
if (rowId <= 1)
|
||||
{
|
||||
_minerGatheringPoints[value] = new GatheringPointId((ushort)item.RowId);
|
||||
continue;
|
||||
}
|
||||
rowId = item.GatheringType.RowId;
|
||||
if (rowId - 2 <= 1)
|
||||
{
|
||||
_botanistGatheringPoints[value] = new GatheringPointId((ushort)item.RowId);
|
||||
}
|
||||
}
|
||||
}
|
||||
_itemIdToCollectability = (from x in dataManager.GetSubrowExcelSheet<SatisfactionSupply>().Flatten()
|
||||
where x.RowId != 0
|
||||
where x.Slot == 2
|
||||
select new
|
||||
{
|
||||
ItemId = x.Item.RowId,
|
||||
Collectability = x.CollectabilityHigh
|
||||
}).Distinct().ToDictionary(x => x.ItemId, x => x.Collectability);
|
||||
_npcForCustomDeliveries = (from x in (from x in dataManager.GetExcelSheet<SatisfactionNpc>()
|
||||
where x.RowId != 0
|
||||
select x).SelectMany((SatisfactionNpc x) => from y in dataManager.GetSubrowExcelSheet<SatisfactionSupply>().Flatten()
|
||||
where y.RowId == x.SatisfactionNpcParams.Last().SupplyIndex
|
||||
select new
|
||||
{
|
||||
ItemId = y.Item.RowId,
|
||||
NpcId = x.Npc.RowId
|
||||
})
|
||||
where x.ItemId != 0
|
||||
select x).Distinct().ToDictionary(x => x.ItemId, x => x.NpcId);
|
||||
}
|
||||
|
||||
public bool TryGetMinerGatheringPointByItemId(uint itemId, [NotNullWhen(true)] out GatheringPointId? gatheringPointId)
|
||||
{
|
||||
return _minerGatheringPoints.TryGetValue(itemId, out gatheringPointId);
|
||||
}
|
||||
|
||||
public bool TryGetBotanistGatheringPointByItemId(uint itemId, [NotNullWhen(true)] out GatheringPointId? gatheringPointId)
|
||||
{
|
||||
return _botanistGatheringPoints.TryGetValue(itemId, out gatheringPointId);
|
||||
}
|
||||
|
||||
public ushort GetRecommendedCollectability(uint itemId)
|
||||
{
|
||||
return _itemIdToCollectability.GetValueOrDefault(itemId);
|
||||
}
|
||||
|
||||
public bool TryGetCustomDeliveryNpc(uint itemId, out uint npcId)
|
||||
{
|
||||
return _npcForCustomDeliveries.TryGetValue(itemId, out npcId);
|
||||
}
|
||||
}
|
104
Questionable/Questionable.Data/JournalData.cs
Normal file
104
Questionable/Questionable.Data/JournalData.cs
Normal file
|
@ -0,0 +1,104 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Lumina.Excel.Sheets;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.Questing;
|
||||
|
||||
namespace Questionable.Data;
|
||||
|
||||
internal sealed class JournalData
|
||||
{
|
||||
internal sealed class Genre
|
||||
{
|
||||
public uint Id { get; }
|
||||
|
||||
public string Name { get; }
|
||||
|
||||
public uint CategoryId { get; }
|
||||
|
||||
public List<IQuestInfo> Quests { get; }
|
||||
|
||||
public Genre(JournalGenre journalGenre, List<IQuestInfo> quests)
|
||||
{
|
||||
Id = journalGenre.RowId;
|
||||
Name = journalGenre.Name.ToString();
|
||||
CategoryId = journalGenre.JournalCategory.RowId;
|
||||
Quests = quests;
|
||||
}
|
||||
|
||||
public Genre(uint id, string name, uint categoryId, List<IQuestInfo> quests)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
CategoryId = categoryId;
|
||||
Quests = quests;
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class Category
|
||||
{
|
||||
public uint Id { get; } = journalCategory.RowId;
|
||||
|
||||
public string Name { get; } = journalCategory.Name.ToString();
|
||||
|
||||
public uint SectionId { get; } = journalCategory.JournalSection.RowId;
|
||||
|
||||
public IReadOnlyList<Genre> Genres { get; }
|
||||
|
||||
public Category(JournalCategory journalCategory, IReadOnlyList<Genre> genres)
|
||||
{
|
||||
Genres = genres;
|
||||
base._002Ector();
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class Section
|
||||
{
|
||||
public uint Id { get; } = journalSection.RowId;
|
||||
|
||||
public string Name { get; } = journalSection.Name.ToString();
|
||||
|
||||
public IReadOnlyList<Category> Categories { get; }
|
||||
|
||||
public Section(JournalSection journalSection, IReadOnlyList<Category> categories)
|
||||
{
|
||||
Categories = categories;
|
||||
base._002Ector();
|
||||
}
|
||||
}
|
||||
|
||||
public List<Genre> Genres { get; }
|
||||
|
||||
public List<Category> Categories { get; }
|
||||
|
||||
public List<Section> Sections { get; }
|
||||
|
||||
public JournalData(IDataManager dataManager, QuestData questData)
|
||||
{
|
||||
JournalData journalData = this;
|
||||
List<Genre> list = (from x in dataManager.GetExcelSheet<JournalGenre>()
|
||||
where x.RowId != 0 && x.Icon > 0
|
||||
select new Genre(x, questData.GetAllByJournalGenre(x.RowId))).ToList();
|
||||
QuestRedo row = dataManager.GetExcelSheet<QuestRedo>().GetRow(1u);
|
||||
QuestRedo row2 = dataManager.GetExcelSheet<QuestRedo>().GetRow(2u);
|
||||
QuestRedo row3 = dataManager.GetExcelSheet<QuestRedo>().GetRow(3u);
|
||||
Genre genreLimsa = new Genre(4294967292u, "Starting in Limsa Lominsa", 1u, (from x in new uint[2] { 108u, 109u }.Concat(row.QuestRedoParam.Select((QuestRedo.QuestRedoParamStruct x) => x.Quest.RowId))
|
||||
where x != 0
|
||||
select questData.GetQuestInfo(QuestId.FromRowId(x))).ToList());
|
||||
Genre genreGridania = new Genre(4294967293u, "Starting in Gridania", 1u, (from x in new uint[3] { 85u, 123u, 124u }.Concat(row2.QuestRedoParam.Select((QuestRedo.QuestRedoParamStruct x) => x.Quest.RowId))
|
||||
where x != 0
|
||||
select questData.GetQuestInfo(QuestId.FromRowId(x))).ToList());
|
||||
Genre genreUldah = new Genre(4294967294u, "Starting in Ul'dah", 1u, (from x in new uint[3] { 568u, 569u, 570u }.Concat(row3.QuestRedoParam.Select((QuestRedo.QuestRedoParamStruct x) => x.Quest.RowId))
|
||||
where x != 0
|
||||
select questData.GetQuestInfo(QuestId.FromRowId(x))).ToList());
|
||||
list.InsertRange(0, new global::_003C_003Ez__ReadOnlyArray<Genre>(new Genre[3] { genreLimsa, genreGridania, genreUldah }));
|
||||
list.Single((Genre x) => x.Id == 1).Quests.RemoveAll((IQuestInfo x) => genreLimsa.Quests.Contains(x) || genreGridania.Quests.Contains(x) || genreUldah.Quests.Contains(x));
|
||||
Genres = list.ToList();
|
||||
Categories = (from x in dataManager.GetExcelSheet<JournalCategory>()
|
||||
where x.RowId != 0
|
||||
select new Category(x, journalData.Genres.Where((Genre y) => y.CategoryId == x.RowId).ToList())).ToList();
|
||||
Sections = (from x in dataManager.GetExcelSheet<JournalSection>()
|
||||
select new Section(x, journalData.Categories.Where((Category y) => y.SectionId == x.RowId).ToList())).ToList();
|
||||
}
|
||||
}
|
1557
Questionable/Questionable.Data/QuestData.cs
Normal file
1557
Questionable/Questionable.Data/QuestData.cs
Normal file
File diff suppressed because it is too large
Load diff
182
Questionable/Questionable.Data/TerritoryData.cs
Normal file
182
Questionable/Questionable.Data/TerritoryData.cs
Normal file
|
@ -0,0 +1,182 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Dalamud.Utility;
|
||||
using Lumina.Excel.Sheets;
|
||||
using Questionable.Model.Questing;
|
||||
|
||||
namespace Questionable.Data;
|
||||
|
||||
internal sealed class TerritoryData
|
||||
{
|
||||
public sealed record ContentFinderConditionData(uint ContentFinderConditionId, string Name, uint TerritoryId, ushort RequiredItemLevel)
|
||||
{
|
||||
public ContentFinderConditionData(ContentFinderCondition condition, ClientLanguage clientLanguage)
|
||||
: this(condition.RowId, FixName(condition.Name.ToDalamudString().ToString(), clientLanguage), condition.TerritoryType.RowId, condition.ItemLevelRequired)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private readonly ImmutableDictionary<uint, string> _territoryNames;
|
||||
|
||||
private readonly ImmutableHashSet<ushort> _territoriesWithMount;
|
||||
|
||||
private readonly ImmutableDictionary<ushort, uint> _dutyTerritories;
|
||||
|
||||
private readonly ImmutableDictionary<uint, string> _instanceNames;
|
||||
|
||||
private readonly ImmutableDictionary<uint, ContentFinderConditionData> _contentFinderConditions;
|
||||
|
||||
private readonly ImmutableDictionary<(ElementId QuestId, byte Index), uint> _questBattlesToContentFinderCondition;
|
||||
|
||||
public TerritoryData(IDataManager dataManager)
|
||||
{
|
||||
_territoryNames = (from x in dataManager.GetExcelSheet<TerritoryType>()
|
||||
where x.RowId != 0
|
||||
select new
|
||||
{
|
||||
RowId = x.RowId,
|
||||
Name = (x.PlaceName.ValueNullable?.Name.ToString() ?? x.PlaceNameZone.ValueNullable?.Name.ToString())
|
||||
} into x
|
||||
where !string.IsNullOrEmpty(x.Name)
|
||||
select x).ToImmutableDictionary(x => x.RowId, x => x.Name);
|
||||
_territoriesWithMount = (from x in dataManager.GetExcelSheet<TerritoryType>()
|
||||
where x.RowId != 0 && x.Mount
|
||||
select (ushort)x.RowId).ToImmutableHashSet();
|
||||
_dutyTerritories = (from x in dataManager.GetExcelSheet<TerritoryType>()
|
||||
where x.RowId != 0 && x.ContentFinderCondition.RowId != 0
|
||||
select x).ToImmutableDictionary((TerritoryType x) => (ushort)x.RowId, (TerritoryType x) => x.ContentFinderCondition.Value.ContentType.RowId);
|
||||
_instanceNames = (from x in dataManager.GetExcelSheet<ContentFinderCondition>()
|
||||
where x.RowId != 0 && x.Content.RowId != 0 && x.ContentLinkType == 1 && x.ContentType.RowId != 6
|
||||
select x).ToImmutableDictionary((ContentFinderCondition x) => x.Content.RowId, (ContentFinderCondition x) => x.Name.ToDalamudString().ToString());
|
||||
_contentFinderConditions = (from x in dataManager.GetExcelSheet<ContentFinderCondition>().Where(delegate(ContentFinderCondition x)
|
||||
{
|
||||
bool flag = x.RowId != 0 && x.Content.RowId != 0;
|
||||
if (flag)
|
||||
{
|
||||
byte contentLinkType = x.ContentLinkType;
|
||||
bool flag2 = ((contentLinkType == 1 || contentLinkType == 5) ? true : false);
|
||||
flag = flag2;
|
||||
}
|
||||
return flag && x.ContentType.RowId != 6;
|
||||
})
|
||||
select new ContentFinderConditionData(x, dataManager.Language)).ToImmutableDictionary((ContentFinderConditionData x) => x.ContentFinderConditionId, (ContentFinderConditionData x) => x);
|
||||
_questBattlesToContentFinderCondition = (from x in (from x in dataManager.GetExcelSheet<Quest>()
|
||||
where x.RowId != 0 && x.IssuerLocation.RowId != 0
|
||||
select x).SelectMany(GetQuestBattles)
|
||||
select (QuestId: x.QuestId, Index: x.Index, CfcId: LookupContentFinderConditionForQuestBattle(dataManager, x.QuestBattleId))).ToImmutableDictionary<(ElementId, byte, uint), (ElementId, byte), uint>(((ElementId QuestId, byte Index, uint CfcId) x) => (QuestId: x.QuestId, Index: x.Index), ((ElementId QuestId, byte Index, uint CfcId) x) => x.CfcId);
|
||||
}
|
||||
|
||||
public string? GetName(ushort territoryId)
|
||||
{
|
||||
return _territoryNames.GetValueOrDefault(territoryId);
|
||||
}
|
||||
|
||||
public string GetNameAndId(ushort territoryId)
|
||||
{
|
||||
string name = GetName(territoryId);
|
||||
if (name != null)
|
||||
{
|
||||
IFormatProvider invariantCulture = CultureInfo.InvariantCulture;
|
||||
DefaultInterpolatedStringHandler handler = new DefaultInterpolatedStringHandler(3, 2, invariantCulture);
|
||||
handler.AppendFormatted(name);
|
||||
handler.AppendLiteral(" (");
|
||||
handler.AppendFormatted(territoryId);
|
||||
handler.AppendLiteral(")");
|
||||
return string.Create(invariantCulture, ref handler);
|
||||
}
|
||||
return territoryId.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
public bool CanUseMount(ushort territoryId)
|
||||
{
|
||||
return _territoriesWithMount.Contains(territoryId);
|
||||
}
|
||||
|
||||
public bool IsDutyInstance(ushort territoryId)
|
||||
{
|
||||
return _dutyTerritories.ContainsKey(territoryId);
|
||||
}
|
||||
|
||||
public bool IsQuestBattleInstance(ushort territoryId)
|
||||
{
|
||||
if (_dutyTerritories.TryGetValue(territoryId, out var value))
|
||||
{
|
||||
return value == 7;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public string? GetInstanceName(ushort instanceId)
|
||||
{
|
||||
return _instanceNames.GetValueOrDefault(instanceId);
|
||||
}
|
||||
|
||||
public ContentFinderConditionData? GetContentFinderCondition(uint cfcId)
|
||||
{
|
||||
return _contentFinderConditions.GetValueOrDefault(cfcId);
|
||||
}
|
||||
|
||||
public bool TryGetContentFinderCondition(uint cfcId, [NotNullWhen(true)] out ContentFinderConditionData? contentFinderConditionData)
|
||||
{
|
||||
return _contentFinderConditions.TryGetValue(cfcId, out contentFinderConditionData);
|
||||
}
|
||||
|
||||
public bool TryGetContentFinderConditionForSoloInstance(ElementId questId, byte index, [NotNullWhen(true)] out ContentFinderConditionData? contentFinderConditionData)
|
||||
{
|
||||
if (_questBattlesToContentFinderCondition.TryGetValue((questId, index), out var value))
|
||||
{
|
||||
return _contentFinderConditions.TryGetValue(value, out contentFinderConditionData);
|
||||
}
|
||||
contentFinderConditionData = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
public IEnumerable<(ElementId QuestId, byte Index, ContentFinderConditionData Data)> GetAllQuestsWithQuestBattles()
|
||||
{
|
||||
return _questBattlesToContentFinderCondition.Select<KeyValuePair<(ElementId, byte), uint>, (ElementId, byte, ContentFinderConditionData)>((KeyValuePair<(ElementId QuestId, byte Index), uint> x) => (QuestId: x.Key.QuestId, Index: x.Key.Index, _contentFinderConditions[x.Value]));
|
||||
}
|
||||
|
||||
private static string FixName(string name, ClientLanguage language)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name) || language != ClientLanguage.English)
|
||||
{
|
||||
return name;
|
||||
}
|
||||
return string.Concat(name[0].ToString().ToUpper(CultureInfo.InvariantCulture), name.AsSpan(1));
|
||||
}
|
||||
|
||||
private static IEnumerable<(ElementId QuestId, byte Index, uint QuestBattleId)> GetQuestBattles(Quest quest)
|
||||
{
|
||||
foreach (Quest.QuestParamsStruct questParam in quest.QuestParams)
|
||||
{
|
||||
if (questParam.ScriptInstruction == "QUESTBATTLE0")
|
||||
{
|
||||
yield return (QuestId: QuestId.FromRowId(quest.RowId), Index: 0, QuestBattleId: questParam.ScriptArg);
|
||||
}
|
||||
else if (questParam.ScriptInstruction == "QUESTBATTLE1")
|
||||
{
|
||||
yield return (QuestId: QuestId.FromRowId(quest.RowId), Index: 1, QuestBattleId: questParam.ScriptArg);
|
||||
}
|
||||
else if (questParam.ScriptInstruction.IsEmpty)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static uint LookupContentFinderConditionForQuestBattle(IDataManager dataManager, uint questBattleId)
|
||||
{
|
||||
if (questBattleId >= 5000)
|
||||
{
|
||||
return dataManager.GetExcelSheet<InstanceContent>().GetRow(questBattleId).ContentFinderCondition.RowId;
|
||||
}
|
||||
return dataManager.GetExcelSheet<QuestBattleResident>().GetRow(questBattleId).Unknown0;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue