Compare commits

..

No commits in common. "master" and "v0.6" have entirely different histories.
master ... v0.6

31 changed files with 545 additions and 2010 deletions

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "LLib"]
path = LLib
url = https://git.carvel.li/liza/LLib

View File

@ -1,3 +0,0 @@
/dist
/obj
/bin

View File

@ -1,8 +0,0 @@
<Project Sdk="Dalamud.NET.Sdk/11.0.0">
<PropertyGroup>
<Version>1.0</Version>
<OutputPath>dist</OutputPath>
</PropertyGroup>
<Import Project="..\LLib\LLib.targets"/>
</Project>

View File

@ -1,6 +0,0 @@
{
"Name": "Gearsetter (IPC Test)",
"Author": "Liza Carvelli",
"Punchline": "dev only plugin",
"Description": "dev only plugin"
}

View File

@ -1,47 +0,0 @@
using System.Collections.Generic;
using Dalamud.Game.Command;
using Dalamud.Plugin;
using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.Game;
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
namespace Gearsetter.IpcTest;
public class GearsetterIpcTestPlugin : IDalamudPlugin
{
private readonly IDalamudPluginInterface _pluginInterface;
private readonly ICommandManager _commandManager;
private readonly IChatGui _chatGui;
public GearsetterIpcTestPlugin(IDalamudPluginInterface pluginInterface, ICommandManager commandManager,
IChatGui chatGui)
{
_pluginInterface = pluginInterface;
_commandManager = commandManager;
_chatGui = chatGui;
_commandManager.AddHandler("/recommendedgear", new CommandInfo(ProcessCommand));
}
private unsafe void ProcessCommand(string command, string arguments)
{
int currentGearsetIndex = RaptureGearsetModule.Instance()->CurrentGearsetIndex;
var recommendations = _pluginInterface
.GetIpcSubscriber<byte, List<(uint ItemId, InventoryType? SourceInventory, byte? SourceInventorySlot, RaptureGearsetModule.GearsetItemIndex TargetSlot)>>(
"Gearsetter.GetRecommendationsForGearset").InvokeFunc((byte)currentGearsetIndex);
if (recommendations.Count == 0)
_chatGui.Print($"No recommendations for gearset #{currentGearsetIndex}.");
else
{
foreach (var recommendation in recommendations)
_chatGui.Print(
$"Recommendation: Equip item {recommendation.ItemId} from {recommendation.SourceInventory} (slot {recommendation.SourceInventorySlot}) as {recommendation.TargetSlot}");
}
}
public void Dispose()
{
_commandManager.RemoveHandler("/recommendedgear");
}
}

View File

@ -1,81 +0,0 @@
{
"version": 1,
"dependencies": {
"net8.0-windows7.0": {
"DalamudPackager": {
"type": "Direct",
"requested": "[11.0.0, )",
"resolved": "11.0.0",
"contentHash": "bjT7XUlhIJSmsE/O76b7weUX+evvGQctbQB8aKXt94o+oPWxHpCepxAGMs7Thow3AzCyqWs7cOpp9/2wcgRRQA=="
},
"DotNet.ReproducibleBuilds": {
"type": "Direct",
"requested": "[1.1.1, )",
"resolved": "1.1.1",
"contentHash": "+H2t/t34h6mhEoUvHi8yGXyuZ2GjSovcGYehJrS2MDm2XgmPfZL2Sdxg+uL2lKgZ4M6tTwKHIlxOob2bgh0NRQ==",
"dependencies": {
"Microsoft.SourceLink.AzureRepos.Git": "1.1.1",
"Microsoft.SourceLink.Bitbucket.Git": "1.1.1",
"Microsoft.SourceLink.GitHub": "1.1.1",
"Microsoft.SourceLink.GitLab": "1.1.1"
}
},
"Microsoft.SourceLink.Gitea": {
"type": "Direct",
"requested": "[8.0.0, )",
"resolved": "8.0.0",
"contentHash": "KOBodmDnlWGIqZt2hT47Q69TIoGhIApDVLCyyj9TT5ct8ju16AbHYcB4XeknoHX562wO1pMS/1DfBIZK+V+sxg==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "8.0.0",
"Microsoft.SourceLink.Common": "8.0.0"
}
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ=="
},
"Microsoft.SourceLink.AzureRepos.Git": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "qB5urvw9LO2bG3eVAkuL+2ughxz2rR7aYgm2iyrB8Rlk9cp2ndvGRCvehk3rNIhRuNtQaeKwctOl1KvWiklv5w==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "1.1.1",
"Microsoft.SourceLink.Common": "1.1.1"
}
},
"Microsoft.SourceLink.Bitbucket.Git": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "cDzxXwlyWpLWaH0em4Idj0H3AmVo3L/6xRXKssYemx+7W52iNskj/SQ4FOmfCb8YQt39otTDNMveCZzYtMoucQ==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "1.1.1",
"Microsoft.SourceLink.Common": "1.1.1"
}
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "1.1.1",
"Microsoft.SourceLink.Common": "1.1.1"
}
},
"Microsoft.SourceLink.GitLab": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "tvsg47DDLqqedlPeYVE2lmiTpND8F0hkrealQ5hYltSmvruy/Gr5nHAKSsjyw5L3NeM/HLMI5ORv7on/M4qyZw==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "1.1.1",
"Microsoft.SourceLink.Common": "1.1.1"
}
}
}
}
}

View File

@ -1,10 +1,21 @@
<Project Sdk="Dalamud.NET.Sdk/11.0.0">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<Import Project="..\LLib\LLib.targets"/>
<PropertyGroup>
<DalamudLibPath>$(appdata)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
</PropertyGroup>
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))'">
<DalamudLibPath>$(DALAMUD_HOME)/</DalamudLibPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0"/>
@ -13,14 +24,24 @@
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3"/>
</ItemGroup>
<!-- Need to be explicitly added for test projects, as it otherwise won't find the DLLs -->
<ItemGroup>
<Reference Include="Dalamud"/>
<Reference Include="Lumina"/>
<Reference Include="Lumina.Excel"/>
<Reference Include="Dalamud">
<HintPath>$(DalamudLibPath)Dalamud.dll</HintPath>
</Reference>
<Reference Include="Lumina">
<HintPath>$(DalamudLibPath)Lumina.dll</HintPath>
</Reference>
<Reference Include="Lumina.Excel">
<HintPath>$(DalamudLibPath)Lumina.Excel.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Gearsetter\Gearsetter.csproj"/>
</ItemGroup>
<ItemGroup>
<Using Include="Xunit"/>
</ItemGroup>
</Project>

View File

@ -1,6 +0,0 @@
{
"Name": "Gearsetter.Test",
"Author": "Liza Carvelli",
"Punchline": "",
"Description": ""
}

View File

@ -1,12 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Gearsetter.GameData;
using Gearsetter.Model;
using LLib.GameData;
using LLib.Gear;
using Lumina.Excel.Sheets;
using Xunit;
using Lumina.Excel.GeneratedSheets;
namespace Gearsetter.Test;
@ -17,10 +11,6 @@ public sealed class ItemSortingTest
[Fact]
public void Test1()
{
var gearStatsCalculator = new GearStatsCalculator(_lumina.GetExcelSheet<ItemLevel>()!,
_lumina.GetExcelSheet<ExtendedBaseParam>()!,
_lumina.GetExcelSheet<Materia>()!,
_lumina.GetExcelSheet<Item>()!);
var items = _lumina.GetExcelSheet<Item>()!;
List<uint> initialItemIds =
[
@ -35,15 +25,13 @@ public sealed class ItemSortingTest
32558,
];
var itemList = new ItemList
{
ClassJob = EClassJob.Marauder,
EquipSlotCategory = EEquipSlotCategory.Ears,
ItemUiCategory = 41,
Items = initialItemIds.Select(rowId => new EquipmentItem(items.GetRow(rowId), false, gearStatsCalculator.CalculateGearStats(items.GetRow(rowId), false, [])))
.Cast<BaseItem>()
.ToList(),
Items = initialItemIds.Select(rowId => new EquipmentItem(items.GetRow(rowId)!, false)).ToList(),
};
var primaryStats = _lumina.GetExcelSheet<ClassJob>()!

File diff suppressed because it is too large Load Diff

View File

@ -4,10 +4,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gearsetter", "Gearsetter\Ge
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gearsetter.Test", "Gearsetter.Test\Gearsetter.Test.csproj", "{19044F87-4C6D-4926-B5C8-5BB7760DC44C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LLib", "LLib\LLib.csproj", "{66144F9D-AC38-4F16-B269-A610F8EB7A3F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gearsetter.IpcTest", "Gearsetter.IpcTest\Gearsetter.IpcTest.csproj", "{D5BFA879-0A33-4640-B75E-D92D8F23D6F1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -22,13 +18,5 @@ Global
{19044F87-4C6D-4926-B5C8-5BB7760DC44C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19044F87-4C6D-4926-B5C8-5BB7760DC44C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19044F87-4C6D-4926-B5C8-5BB7760DC44C}.Release|Any CPU.Build.0 = Release|Any CPU
{66144F9D-AC38-4F16-B269-A610F8EB7A3F}.Debug|Any CPU.ActiveCfg = Debug|x64
{66144F9D-AC38-4F16-B269-A610F8EB7A3F}.Debug|Any CPU.Build.0 = Debug|x64
{66144F9D-AC38-4F16-B269-A610F8EB7A3F}.Release|Any CPU.ActiveCfg = Debug|x64
{66144F9D-AC38-4F16-B269-A610F8EB7A3F}.Release|Any CPU.Build.0 = Debug|x64
{D5BFA879-0A33-4640-B75E-D92D8F23D6F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5BFA879-0A33-4640-B75E-D92D8F23D6F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5BFA879-0A33-4640-B75E-D92D8F23D6F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5BFA879-0A33-4640-B75E-D92D8F23D6F1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
using Dalamud.Configuration;
using LLib.Gear;
using Gearsetter.GameData;
namespace Gearsetter;

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Target Name="PackagePluginDebug" AfterTargets="Build" Condition="'$(Configuration)' == 'Debug'">
<Target Name="PackagePlugin" AfterTargets="Build" Condition="'$(Configuration)' == 'Debug'">
<DalamudPackager
ProjectDir="$(ProjectDir)"
OutputPath="$(OutputPath)"

View File

@ -1,64 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Dalamud.Plugin;
using Dalamud.Plugin.Ipc;
using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.Game;
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
namespace Gearsetter.External;
internal sealed class GearsetterIpc : IDisposable
{
private const string IpcGetRecommendationsForGearset = "Gearsetter.GetRecommendationsForGearset";
private readonly GearsetterPlugin _plugin;
private readonly IPluginLog _pluginLog;
private readonly ICallGateProvider<byte,
List<(uint ItemId, InventoryType? SourceInventory, int? SourceInventorySlot,
RaptureGearsetModule.GearsetItemIndex TargetSlot)>>
_getRecommendationsForGearset;
public GearsetterIpc(GearsetterPlugin plugin, IDalamudPluginInterface pluginInterface, IPluginLog pluginLog)
{
_plugin = plugin;
_pluginLog = pluginLog;
_getRecommendationsForGearset =
pluginInterface
.GetIpcProvider<byte,
List<(uint, InventoryType?, int?, RaptureGearsetModule.GearsetItemIndex TargetSlot)>>(
IpcGetRecommendationsForGearset);
_getRecommendationsForGearset.RegisterFunc(GetRecommendationsForGearset);
}
private unsafe List<(uint ItemId, InventoryType? SourceInventory, int? SourceInventorySlot,
RaptureGearsetModule.GearsetItemIndex TargetSlot)>
GetRecommendationsForGearset(byte gearsetId)
{
if (gearsetId > 100)
throw new ArgumentOutOfRangeException(nameof(gearsetId));
var gearsetModule = RaptureGearsetModule.Instance();
if (gearsetModule == null)
throw new InvalidOperationException($"{nameof(RaptureGearsetModule)} is null");
var gearset = gearsetModule->GetGearset(gearsetId);
if (gearset == null)
throw new InvalidOperationException($"Gearset {gearsetId} is null");
if (!gearset->Flags.HasFlag(RaptureGearsetModule.GearsetFlag.Exists))
throw new InvalidOperationException($"Gearset {gearsetId} does not exist");
_pluginLog.Verbose($"Checking for gearset upgrades for gearset {gearset->Id}.");
return _plugin.GetRecommendedUpgrades(gearset)
.Select(x => (x.ItemId, x.SourceInventory, x.SourceInventorySlot, x.TargetSlot))
.ToList();
}
public void Dispose()
{
_getRecommendationsForGearset.UnregisterFunc();
}
}

View File

@ -0,0 +1,32 @@
namespace Gearsetter.GameData;
internal enum EBaseParam : byte
{
Strength = 1,
Dexterity = 2,
Vitality = 3,
Intelligence = 4,
Mind = 5,
Piety = 6,
GP = 10,
CP = 11,
DamagePhys = 12,
DamageMag = 13,
DefensePhys = 21,
DefenseMag = 24,
Tenacity = 19,
Crit = 27,
DirectHit = 22,
Determination = 44,
SpellSpeed = 46,
SkillSpeed = 23,
Craftsmanship = 70,
Control = 71,
Gathering = 72,
Perception = 73,
}

View File

@ -0,0 +1,113 @@
namespace Gearsetter.GameData;
internal enum EClassJob : uint
{
Adventurer = 0,
Gladiator = 1,
Pugilist = 2,
Marauder = 3,
Lancer = 4,
Archer = 5,
Conjurer = 6,
Thaumaturge = 7,
Carpenter = 8,
Blacksmith = 9,
Armorer = 10,
Goldsmith = 11,
Leatherworker = 12,
Weaver = 13,
Alchemist = 14,
Culinarian = 15,
Miner = 16,
Botanist = 17,
Fisher = 18,
Paladin = 19,
Monk = 20,
Warrior = 21,
Dragoon = 22,
Bard = 23,
WhiteMage = 24,
BlackMage = 25,
Arcanist = 26,
Summoner = 27,
Scholar = 28,
Rogue = 29,
Ninja = 30,
Machinist = 31,
DarkKnight = 32,
Astrologian = 33,
Samurai = 34,
RedMage = 35,
BlueMage = 36,
Gunbreaker = 37,
Dancer = 38,
Reaper = 39,
Sage = 40,
}
internal static class EClassJobExtensions
{
public static EClassJob AsJob(this EClassJob classJob) => classJob switch
{
EClassJob.Gladiator => EClassJob.Paladin,
EClassJob.Marauder => EClassJob.Warrior,
EClassJob.Pugilist => EClassJob.Monk,
EClassJob.Lancer => EClassJob.Dragoon,
EClassJob.Rogue => EClassJob.Ninja,
EClassJob.Archer => EClassJob.Bard,
EClassJob.Conjurer => EClassJob.WhiteMage,
EClassJob.Thaumaturge => EClassJob.BlackMage,
EClassJob.Arcanist => EClassJob.Summoner,
_ => classJob,
};
public static bool IsTank(this EClassJob classJob) =>
classJob is EClassJob.Gladiator
or EClassJob.Paladin
or EClassJob.Marauder
or EClassJob.Warrior
or EClassJob.DarkKnight
or EClassJob.Gunbreaker;
public static bool IsHealer(this EClassJob classJob) =>
classJob is EClassJob.Conjurer
or EClassJob.WhiteMage
or EClassJob.Scholar
or EClassJob.Astrologian
or EClassJob.Sage;
public static bool IsMelee(this EClassJob classJob) =>
classJob is EClassJob.Pugilist
or EClassJob.Monk
or EClassJob.Lancer
or EClassJob.Dragoon
or EClassJob.Rogue
or EClassJob.Ninja
or EClassJob.Samurai
or EClassJob.Reaper;
public static bool IsPhysicalRanged(this EClassJob classJob) =>
classJob is EClassJob.Archer
or EClassJob.Bard
or EClassJob.Machinist
or EClassJob.Dancer;
public static bool IsCaster(this EClassJob classJob) =>
classJob is EClassJob.Thaumaturge
or EClassJob.BlackMage
or EClassJob.Arcanist
or EClassJob.Summoner
or EClassJob.RedMage
or EClassJob.BlueMage;
public static bool DealsPhysicalDamage(this EClassJob classJob) =>
classJob.IsTank() || classJob.IsMelee() || classJob.IsPhysicalRanged();
public static bool DealsMagicDamage(this EClassJob classJob) =>
classJob.IsHealer() || classJob.IsCaster();
public static bool IsCrafter(this EClassJob classJob) =>
classJob is >= EClassJob.Carpenter and <= EClassJob.Culinarian;
public static bool IsGatherer(this EClassJob classJob) => classJob is >= EClassJob.Miner and <= EClassJob.Fisher;
}

View File

@ -1,29 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Dalamud.Game;
using Dalamud;
using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.Game;
using Gearsetter.Model;
using LLib.GameData;
using LLib.Gear;
using Lumina.Excel.Sheets;
using Lumina.Excel.GeneratedSheets;
namespace Gearsetter.GameData;
internal sealed class GameDataHolder
{
private readonly Configuration _configuration;
private readonly GearStatsCalculator _gearStatsCalculator;
private readonly Dictionary<uint, List<EClassJob>> _classJobCategories;
private readonly IReadOnlyList<ItemList> _allItemLists;
public GameDataHolder(IDataManager dataManager, Configuration configuration,
GearStatsCalculator gearStatsCalculator)
public GameDataHolder(IDataManager dataManager, Configuration configuration)
{
_configuration = configuration;
_gearStatsCalculator = gearStatsCalculator;
_classJobCategories = dataManager.GetExcelSheet<ClassJobCategory>()
_classJobCategories = dataManager.GetExcelSheet<ClassJobCategory>()!
.ToDictionary(x => x.RowId, x =>
new Dictionary<EClassJob, bool>
{
@ -68,23 +63,21 @@ internal sealed class GameDataHolder
{ EClassJob.Dancer, x.DNC },
{ EClassJob.Reaper, x.RPR },
{ EClassJob.Sage, x.SGE },
{ EClassJob.Viper, x.VPR },
{ EClassJob.Pictomancer, x.PCT }
}
.Where(y => y.Value)
.Select(y => y.Key)
.ToList());
ClassJobNames = dataManager.GetExcelSheet<ClassJob>()
ClassJobNames = dataManager.GetExcelSheet<ClassJob>()!
.Where(x => x.RowId > 0 && Enum.IsDefined(typeof(EClassJob), x.RowId))
.OrderBy(x => x.UIPriority)
.Select(x => ((EClassJob)x.RowId,
dataManager.Language == ClientLanguage.English ? x.NameEnglish.ToString() : x.Name.ToString()))
.ToList();
PrimaryStats = dataManager.GetExcelSheet<ClassJob>()
PrimaryStats = dataManager.GetExcelSheet<ClassJob>()!
.Where(x => x.RowId > 0 && Enum.IsDefined(typeof(EClassJob), x.RowId))
.Where(x => x.PrimaryStat > 0)
.ToDictionary(x => (EClassJob)x.RowId, x => (EBaseParam)x.PrimaryStat);
ItemUiCategoryNames = dataManager.GetExcelSheet<ItemUICategory>()
ItemUiCategoryNames = dataManager.GetExcelSheet<ItemUICategory>()!
.Where(x => x.RowId > 0)
.OrderBy(x => x.OrderMajor)
.ThenBy(x => x.OrderMinor)
@ -92,12 +85,12 @@ internal sealed class GameDataHolder
.ToList();
_allItemLists =
dataManager.GetExcelSheet<Item>()
dataManager.GetExcelSheet<Item>()!
.Where(x => x.RowId > 1600) // exclude outdated names
.Where(x => x.EquipSlotCategory.RowId > 0 &&
Enum.IsDefined(typeof(EEquipSlotCategory), x.EquipSlotCategory.RowId))
.Where(x => x.LevelItem.RowId > 1) // ignore ilvl 1 glamour items (also includes starter weapons)
.Where(x => x.ItemSeries.RowId is <= 3 or >= 28)
.Where(x => x.EquipSlotCategory.Row > 0 &&
Enum.IsDefined(typeof(EEquipSlotCategory), x.EquipSlotCategory.Row))
.Where(x => x.LevelItem.Row > 1) // ignore ilvl 1 glamour items (also includes starter weapons)
.Where(x => x.ItemSeries.Row is <= 3 or >= 28)
.SelectMany(LoadItem)
.SelectMany(x => x.ClassJobs.Select(y => x.Item with { ClassJob = y }))
.Where(x => x.ClassJob != EClassJob.Scholar || x.ItemUiCategory != 10) // exclude ACN weapon as scholar
@ -124,7 +117,7 @@ internal sealed class GameDataHolder
ClassJob = x.Key.ClassJob,
EquipSlotCategory = x.Key.EquipSlotCategory,
ItemUiCategory = x.Key.ItemUiCategory,
Items = x.Cast<BaseItem>().ToList(),
Items = x.ToList(),
})
.ToList()
.AsReadOnly();
@ -132,6 +125,7 @@ internal sealed class GameDataHolder
UpdateAndSortLists();
}
public IReadOnlyList<(EClassJob ClassJob, string Name)> ClassJobNames { get; }
public IReadOnlyList<(uint ItemUiCategory, string Name)> ItemUiCategoryNames { get; }
public Dictionary<EClassJob, EBaseParam> PrimaryStats { get; }
@ -205,15 +199,9 @@ internal sealed class GameDataHolder
private IEnumerable<(EquipmentItem Item, List<EClassJob> ClassJobs)> LoadItem(Item item)
{
var classJobCategories = _classJobCategories[item.ClassJobCategory.RowId];
yield return (
new EquipmentItem(item, false, _gearStatsCalculator.CalculateGearStats(item, false, [])),
classJobCategories);
var classJobCategories = _classJobCategories[item.ClassJobCategory.Row];
yield return (new EquipmentItem(item, false), classJobCategories);
if (item.CanBeHq)
{
yield return (
new EquipmentItem(item, true, _gearStatsCalculator.CalculateGearStats(item, true, [])),
classJobCategories);
}
yield return (new EquipmentItem(item, true), classJobCategories);
}
}

View File

@ -1,13 +1,60 @@
<Project Sdk="Dalamud.NET.Sdk/11.0.0">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>2.4</Version>
<TargetFramework>net8.0-windows</TargetFramework>
<Version>0.6</Version>
<LangVersion>12</LangVersion>
<Nullable>enable</Nullable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<OutputPath>dist</OutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>portable</DebugType>
<PathMap Condition="$(SolutionDir) != ''">$(SolutionDir)=X:\</PathMap>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<DebugType>portable</DebugType>
</PropertyGroup>
<Import Project="..\LLib\LLib.targets"/>
<Import Project="..\LLib\RenameZip.targets"/>
<PropertyGroup>
<DalamudLibPath>$(appdata)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
</PropertyGroup>
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))'">
<DalamudLibPath>$(DALAMUD_HOME)/</DalamudLibPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\LLib\LLib.csproj"/>
<PackageReference Include="DalamudPackager" Version="2.1.12"/>
</ItemGroup>
<ItemGroup>
<Reference Include="Dalamud">
<HintPath>$(DalamudLibPath)Dalamud.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="ImGui.NET">
<HintPath>$(DalamudLibPath)ImGui.NET.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Lumina">
<HintPath>$(DalamudLibPath)Lumina.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Lumina.Excel">
<HintPath>$(DalamudLibPath)Lumina.Excel.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>$(DalamudLibPath)Newtonsoft.Json.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="FFXIVClientStructs">
<HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<Target Name="RenameLatestZip" AfterTargets="PackagePlugin" Condition="'$(Configuration)' == 'Release'">
<Exec Command="rename $(OutDir)$(AssemblyName)\latest.zip $(AssemblyName)-$(Version).zip"/>
</Target>
</Project>

View File

@ -2,11 +2,7 @@
"Name": "Gearsetter",
"Author": "Liza Carvelli",
"Punchline": "Find gear upgrades",
"Description": "Browse through all gear pieces available for each class/job and show possible upgrades",
"Description": "",
"RepoUrl": "https://git.carvel.li/liza/Gearsetter",
"IconUrl": "https://plugins.carvel.li/icons/Gearsetter.png",
"Tags": [
"gearset",
"gearsets"
]
"IconUrl": "https://plugins.carvel.li/icons/Gearsetter.png"
}

View File

@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using System.Text;
using Dalamud.Game.Command;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Game.Text.SeStringHandling.Payloads;
@ -12,15 +12,11 @@ using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.Game;
using FFXIVClientStructs.FFXIV.Client.Game.UI;
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
using Gearsetter.External;
using Gearsetter.GameData;
using Gearsetter.Model;
using Gearsetter.Windows;
using LLib.GameData;
using LLib.Gear;
using Lumina.Excel.Sheets;
using Lumina.Excel.GeneratedSheets;
using GrandCompany = FFXIVClientStructs.FFXIV.Client.UI.Agent.GrandCompany;
using InventoryItem = FFXIVClientStructs.FFXIV.Client.Game.InventoryItem;
namespace Gearsetter;
@ -28,22 +24,21 @@ namespace Gearsetter;
public sealed class GearsetterPlugin : IDalamudPlugin
{
private readonly WindowSystem _windowSystem = new(nameof(GearsetterPlugin));
private readonly IDalamudPluginInterface _pluginInterface;
private readonly DalamudPluginInterface _pluginInterface;
private readonly ICommandManager _commandManager;
private readonly IChatGui _chatGui;
private readonly IDataManager _dataManager;
private readonly IPluginLog _pluginLog;
private readonly IClientState _clientState;
private readonly GearsetterIpc _gearsetterIpc;
private readonly Configuration _configuration;
private readonly GearStatsCalculator _gearStatsCalculator;
private readonly GameDataHolder _gameDataHolder;
private readonly EquipmentBrowserWindow _equipmentBrowserWindow;
private readonly ConfigWindow _configWindow;
private readonly IReadOnlyDictionary<byte, DalamudLinkPayload> _linkPayloads;
private readonly Dictionary<EClassJob, byte> _classJobToArrayIndex;
public GearsetterPlugin(IDalamudPluginInterface pluginInterface, ICommandManager commandManager, IChatGui chatGui,
public GearsetterPlugin(DalamudPluginInterface pluginInterface, ICommandManager commandManager, IChatGui chatGui,
IDataManager dataManager, IPluginLog pluginLog, IClientState clientState)
{
ArgumentNullException.ThrowIfNull(dataManager);
@ -54,7 +49,6 @@ public sealed class GearsetterPlugin : IDalamudPlugin
_dataManager = dataManager;
_pluginLog = pluginLog;
_clientState = clientState;
_gearsetterIpc = new GearsetterIpc(this, _pluginInterface, _pluginLog);
Configuration? configuration = (Configuration?)_pluginInterface.GetPluginConfig();
if (configuration == null)
@ -64,8 +58,7 @@ public sealed class GearsetterPlugin : IDalamudPlugin
}
_configuration = configuration;
_gearStatsCalculator = new GearStatsCalculator(dataManager);
_gameDataHolder = new GameDataHolder(dataManager, _configuration, _gearStatsCalculator);
_gameDataHolder = new GameDataHolder(dataManager, _configuration);
_equipmentBrowserWindow = new EquipmentBrowserWindow(this, _gameDataHolder, _clientState, _chatGui);
_windowSystem.AddWindow(_equipmentBrowserWindow);
_configWindow = new ConfigWindow(_pluginInterface, _configuration);
@ -86,7 +79,7 @@ public sealed class GearsetterPlugin : IDalamudPlugin
_pluginInterface.UiBuilder.OpenMainUi += _equipmentBrowserWindow.Toggle;
_pluginInterface.UiBuilder.OpenConfigUi += _configWindow.Toggle;
_classJobToArrayIndex = dataManager.GetExcelSheet<ClassJob>()
_classJobToArrayIndex = dataManager.GetExcelSheet<ClassJob>()!
.Where(x => x.RowId > 0 && Enum.IsDefined(typeof(EClassJob), x.RowId))
.ToDictionary(x => (EClassJob)x.RowId, x => (byte)x.ExpArrayIndex);
}
@ -128,7 +121,6 @@ public sealed class GearsetterPlugin : IDalamudPlugin
private unsafe void ShowUpgrades(byte? level = null)
{
DateTime start = DateTime.Now;
var inventoryItems = GetAllInventoryItems();
var gearsetModule = RaptureGearsetModule.Instance();
@ -139,115 +131,73 @@ public sealed class GearsetterPlugin : IDalamudPlugin
if (onlyCurrentJob)
_chatGui.Print("Checking only gearsets for your current class/job...");
List<GearsetData> gearsets = new List<GearsetData>();
bool anyUpgrade = false;
for (int i = 0; i < 100; ++i)
{
var gearset = gearsetModule->GetGearset(i);
if (gearset != null && gearset->Flags.HasFlag(RaptureGearsetModule.GearsetFlag.Exists))
{
if (onlyCurrentJob && gearset->ClassJob != _clientState.LocalPlayer!.ClassJob.RowId)
if (onlyCurrentJob && gearset->ClassJob != _clientState.LocalPlayer!.ClassJob.Id)
continue;
var gearsetData = PrepareGearset(gearset);
if (gearsetData != null)
gearsets.Add(gearsetData);
}
}
_pluginLog.Information($"Preparing gearsets took {DateTime.Now - start}");
Task.Run(() =>
{
start = DateTime.Now;
bool anyUpgrade = false;
foreach (GearsetData gearset in gearsets)
anyUpgrade |= HandleGearset(gearset, inventoryItems, level);
}
}
if (!anyUpgrade)
_chatGui.Print("All your gearsets are OK.");
_pluginLog.Information($"Evaluating gearsets took {DateTime.Now - start}");
});
}
private unsafe GearsetData? PrepareGearset(RaptureGearsetModule.GearsetEntry* gearset)
private unsafe bool HandleGearset(RaptureGearsetModule.GearsetEntry* gearset,
Dictionary<(uint ItemId, bool Hq), int> inventoryItems, byte? level)
{
string name = GetGearsetName(gearset);
if (name.Contains('_', StringComparison.Ordinal) ||
name.Contains("Eureka", StringComparison.OrdinalIgnoreCase) ||
name.Contains("Bozja", StringComparison.OrdinalIgnoreCase))
return null;
return false;
return new GearsetData(_dataManager, _gearStatsCalculator, gearset, name);
List<SeString> Handle(string label, int[] spanIds, EEquipSlotCategory category)
{
return HandleGearsetItem(label, gearset, spanIds.Select(x => gearset->ItemsSpan[x]).ToArray(),
inventoryItems, category, level);
}
internal unsafe List<RecommendedItemChange> GetRecommendedUpgrades(RaptureGearsetModule.GearsetEntry* gearset,
byte? level = null)
List<List<SeString>> upgrades = new()
{
GearsetData gearsetData = new GearsetData(_dataManager, _gearStatsCalculator, gearset, GetGearsetName(gearset));
Dictionary<(uint ItemId, bool Hq), List<EquipmentStats>> inventoryItems = GetAllInventoryItems();
return GetRecommendedUpgrades(gearsetData, inventoryItems, level);
}
private List<RecommendedItemChange> GetRecommendedUpgrades(GearsetData gearset,
Dictionary<(uint ItemId, bool Hql), List<EquipmentStats>> inventoryItems, byte? level)
{
List<RecommendedItemChange> Handle(string label,
(EquipmentItem?, RaptureGearsetModule.GearsetItemIndex)[] gearsetItems,
EEquipSlotCategory category)
{
return HandleGearsetItem(label, gearset, gearsetItems, inventoryItems, category, level);
}
List<List<RecommendedItemChange>> upgrades = new()
{
Handle("Main Hand", [(gearset.MainHand, RaptureGearsetModule.GearsetItemIndex.MainHand)],
EEquipSlotCategory.None),
Handle("Main Hand", [0], EEquipSlotCategory.None),
HandleOffHand(gearset, inventoryItems, level),
Handle("Head", [(gearset.Head, RaptureGearsetModule.GearsetItemIndex.Head)], EEquipSlotCategory.Head),
Handle("Body", [(gearset.Body, RaptureGearsetModule.GearsetItemIndex.Body)], EEquipSlotCategory.Body),
Handle("Hands", [(gearset.Hands, RaptureGearsetModule.GearsetItemIndex.Hands)], EEquipSlotCategory.Hands),
Handle("Legs", [(gearset.Legs, RaptureGearsetModule.GearsetItemIndex.Legs)], EEquipSlotCategory.Legs),
Handle("Feet", [(gearset.Feet, RaptureGearsetModule.GearsetItemIndex.Feet)], EEquipSlotCategory.Feet),
Handle("Head", [2], EEquipSlotCategory.Head),
Handle("Body", [3], EEquipSlotCategory.Body),
Handle("Hands", [4], EEquipSlotCategory.Hands),
Handle("Legs", [6], EEquipSlotCategory.Legs),
Handle("Feet", [7], EEquipSlotCategory.Feet),
Handle("Ears", [(gearset.Ears, RaptureGearsetModule.GearsetItemIndex.Ears)], EEquipSlotCategory.Ears),
Handle("Neck", [(gearset.Neck, RaptureGearsetModule.GearsetItemIndex.Neck)], EEquipSlotCategory.Neck),
Handle("Wrists", [(gearset.Wrists, RaptureGearsetModule.GearsetItemIndex.Wrists)],
EEquipSlotCategory.Wrists),
Handle("Rings",
[
(gearset.RingLeft, RaptureGearsetModule.GearsetItemIndex.RingLeft),
(gearset.RingRight, RaptureGearsetModule.GearsetItemIndex.RingRight)
],
EEquipSlotCategory.Rings),
Handle("Ears", [8], EEquipSlotCategory.Ears),
Handle("Neck", [9], EEquipSlotCategory.Neck),
Handle("Wrists", [10], EEquipSlotCategory.Wrists),
Handle("Rings", [11, 12], EEquipSlotCategory.Rings),
};
return upgrades.SelectMany(x => x).ToList();
}
private bool HandleGearset(GearsetData gearset,
Dictionary<(uint ItemId, bool Hq), List<EquipmentStats>> inventoryItems, byte? level)
{
List<RecommendedItemChange> upgrades = GetRecommendedUpgrades(gearset, inventoryItems, level);
if (upgrades.Count == 0)
List<SeString> flatUpgrades = upgrades.SelectMany(x => x).ToList();
if (flatUpgrades.Count == 0)
return false;
_chatGui.Print(
new SeStringBuilder()
.Append("Gearset ")
.AddUiForeground(1)
.Add(_linkPayloads[gearset.Id])
.Append($"#{gearset.Id + 1}: ")
.Append(gearset.Name)
.Add(_linkPayloads[gearset->ID])
.Append($"#{gearset->ID + 1}: ")
.Append(name)
.Add(RawPayload.LinkTerminator)
.AddUiForegroundOff()
.AddText(level != null ? $" at {level}" : "")
.Build());
foreach (var upgrade in upgrades)
_chatGui.Print(new SeString(new TextPayload(" - ")).Append(upgrade.Text));
foreach (var upgrade in flatUpgrades)
_chatGui.Print(new SeString(new TextPayload(" - ")).Append(upgrade));
return true;
}
@ -257,114 +207,102 @@ public sealed class GearsetterPlugin : IDalamudPlugin
/// the string ends after the name (and not render ANY text on the same line after the name).
/// </summary>
private unsafe string GetGearsetName(RaptureGearsetModule.GearsetEntry* gearset)
=> gearset->NameString.Split((char)0)[0];
=> Encoding.UTF8.GetString(gearset->Name, 0x2F).Split((char)0)[0];
private List<RecommendedItemChange> HandleGearsetItem(string label, GearsetData gearset,
(EquipmentItem? Item, RaptureGearsetModule.GearsetItemIndex Slot)[] gearsetItems,
Dictionary<(uint ItemId, bool Hq), List<EquipmentStats>> inventoryItems,
private unsafe List<SeString> HandleGearsetItem(string label, RaptureGearsetModule.GearsetEntry* gearset,
RaptureGearsetModule.GearsetItem[] gearsetItem, Dictionary<(uint ItemId, bool Hq), int> inventoryItems,
EEquipSlotCategory equipSlotCategory, byte? level)
{
EClassJob classJob = gearset.ClassJob;
List<RaptureGearsetModule.GearsetItemIndex> availableGearsetSlots = gearsetItems.Select(x => x.Slot).ToList();
EClassJob classJob = (EClassJob)gearset->ClassJob;
var itemLists = _gameDataHolder.GetItemLists(classJob);
if (equipSlotCategory == EEquipSlotCategory.None && gearsetItems.Any(x => x.Item != null))
if (gearsetItem.Any(x => x.ItemID > 0))
{
var firstEquippedItem = gearsetItems.First(x => x.Item != null);
equipSlotCategory = firstEquippedItem.Item!.EquipSlotCategory;
var firstEquippedItem = gearsetItem.First(x => x.ItemID > 0);
equipSlotCategory = (EEquipSlotCategory)(_dataManager.GetExcelSheet<Item>()!
.GetRow(firstEquippedItem.ItemID % 1_000_000)
?.EquipSlotCategory?.Row ?? 0);
}
if (equipSlotCategory == EEquipSlotCategory.None)
{
_pluginLog.Warning("Unable to find item to determine equip slot category");
return [];
_pluginLog.Warning($"Unable to find item to determine equip slot category");
return new List<SeString>();
}
(BaseItem? Item, RaptureGearsetModule.GearsetItemIndex Slot)[] currentItems = gearsetItems
EquipmentItem?[] currentItems = gearsetItem.Select(x => new
{
ItemId = x.ItemID % 1_000_000,
Hq = x.ItemID > 1_000_000
})
.Select(x =>
{
if (x.Item == null)
return (null, x.Slot);
if (x.ItemId == 0)
return null;
var baseItem = itemLists
.SelectMany(y => y.Items.Where(z => x.Item.ItemId == z.ItemId && x.Item.Hq == z.Hq))
return itemLists
.SelectMany(y => y.Items.Where(z => x.ItemId == z.ItemId && x.Hq == z.Hq))
.FirstOrDefault();
return (baseItem, x.Slot);
})
.ToArray();
var availableList = _gameDataHolder.GetItemList(classJob, equipSlotCategory);
if (availableList == null)
return [];
return new List<SeString>();
if (level == null)
level = GetLevel(classJob);
try
{
availableList.ApplyFromInventory(inventoryItems, true);
var bestItems = availableList.Items
.Where(x => x.Level <= level)
.Where(x => x is Model.InventoryItem)
.Take(gearsetItems.Length)
.SelectMany(x =>
{
if (inventoryItems.TryGetValue((x.ItemId, x.Hq), out int count) && count > 0)
return Enumerable.Repeat(x, count);
else
return [];
})
.Take(gearsetItem.Length)
.ToList();
//_pluginLog.Debug(
// $"{equipSlotCategory}: {string.Join(" ", currentItems.Select(x => $"{x.Item}, {x.Slot}"))}");
_pluginLog.Debug(
$"{equipSlotCategory}: {string.Join(" ", currentItems.Select(x => $"{x?.ItemId}|{x?.Hq}"))}");
foreach (var currentItem in currentItems)
{
var foundIndex = bestItems.FindIndex(x =>
currentItem.Item != null && currentItem.Item.ItemId == x.ItemId && currentItem.Item.Hq == x.Hq);
currentItem != null && currentItem.ItemId == x.ItemId && currentItem.Hq == x.Hq);
if (foundIndex >= 0)
{
bestItems.RemoveAt(foundIndex);
availableGearsetSlots.Remove(currentItem.Slot);
}
}
return bestItems
.Select(x =>
{
var slot = availableGearsetSlots[0];
availableGearsetSlots.RemoveAt(0);
return ToItemRecommendation(x, slot,
new SeString(new TextPayload($"{label}: "))
.Append(SeString.CreateItemLink(x.ItemId, x.Hq)));
})
.ToList();
}
finally
{
availableList.ClearFromInventory();
}
.Select(x => new SeString(new TextPayload($"{label}: "))
.Append(SeString.CreateItemLink(x.ItemId, x.Hq))).ToList();
}
private List<RecommendedItemChange> HandleOffHand(GearsetData gearset,
Dictionary<(uint ItemId, bool Hq), List<EquipmentStats>> inventoryItems, byte? level)
private unsafe List<SeString> HandleOffHand(RaptureGearsetModule.GearsetEntry* gearset,
Dictionary<(uint ItemId, bool Hq), int> inventoryItems, byte? level)
{
var mainHand = gearset.MainHand;
if (mainHand == null)
return [];
var mainHand = gearset->ItemsSpan[0];
if (mainHand.ItemID == 0)
return new List<SeString>();
// if it's a twohanded weapon, ignore it
EEquipSlotCategory equipSlotCategory = mainHand.EquipSlotCategory;
EEquipSlotCategory equipSlotCategory =
(EEquipSlotCategory)(_dataManager.GetExcelSheet<Item>()!.GetRow(mainHand.ItemID % 1_000_000)?.RowId ?? 0);
if (equipSlotCategory != EEquipSlotCategory.OneHandedMainHand)
return [];
return new List<SeString>();
return HandleGearsetItem("Off Hand", gearset,
[(gearset.OffHand, RaptureGearsetModule.GearsetItemIndex.OffHand)],
inventoryItems,
return HandleGearsetItem("Off Hand", gearset, [gearset->ItemsSpan[1]], inventoryItems,
EEquipSlotCategory.Shield, level);
}
private unsafe void ChangeGearset(uint commandId, SeString seString)
=> RaptureGearsetModule.Instance()->EquipGearset((byte)commandId);
private unsafe RecommendedItemChange ToItemRecommendation(BaseItem baseItem,
RaptureGearsetModule.GearsetItemIndex targetSlot, SeString text)
public unsafe Dictionary<(uint ItemId, bool Hq), int> GetAllInventoryItems()
{
Dictionary<(uint, bool), int> inventoryItems = new();
InventoryManager* inventoryManager = InventoryManager.Instance();
foreach (var inventoryType in _gameDataHolder.DefaultInventoryTypes)
{
@ -372,41 +310,13 @@ public sealed class GearsetterPlugin : IDalamudPlugin
for (int i = 0; i < container->Size; ++i)
{
var item = container->GetInventorySlot(i);
if (item != null && item->ItemId == baseItem.ItemId &&
item->Flags.HasFlag(InventoryItem.ItemFlags.HighQuality) == baseItem.Hq)
if (item != null && item->ItemID != 0)
{
EquipmentStats expectedMateriaStats = baseItem.Stats;
EquipmentStats actualMateriaStats = FetchMateriaStats(item);
if (expectedMateriaStats == actualMateriaStats)
return new RecommendedItemChange(item->ItemId, inventoryType, i, targetSlot, text);
}
}
}
return new RecommendedItemChange(baseItem.ItemId, null, null, targetSlot, text);
}
internal unsafe Dictionary<(uint ItemId, bool Hq), List<EquipmentStats>> GetAllInventoryItems()
{
Dictionary<(uint, bool), List<EquipmentStats>> inventoryItems = new();
InventoryManager* inventoryManager = InventoryManager.Instance();
foreach (var inventoryType in _gameDataHolder.DefaultInventoryTypes)
{
var container = inventoryManager->GetInventoryContainer(inventoryType);
for (int i = 0; i < container->Size; ++i)
{
var item = container->GetInventorySlot(i);
if (item != null && item->ItemId != 0)
{
var key = (item->ItemId, item->Flags.HasFlag(InventoryItem.ItemFlags.HighQuality));
if (!inventoryItems.TryGetValue(key, out var list))
{
list = new List<EquipmentStats>();
inventoryItems[key] = list;
}
list.Add(FetchMateriaStats(item));
var key = (item->ItemID, item->Flags.HasFlag(InventoryItem.ItemFlags.HQ));
if (inventoryItems.TryGetValue(key, out var value))
inventoryItems[key] = value + 1;
else
inventoryItems[key] = 1;
}
}
}
@ -414,16 +324,13 @@ public sealed class GearsetterPlugin : IDalamudPlugin
return inventoryItems;
}
private unsafe EquipmentStats FetchMateriaStats(InventoryItem* item)
=> _gearStatsCalculator.CalculateGearStats(item);
internal unsafe byte GetLevel(EClassJob classJob)
{
var playerState = PlayerState.Instance();
if (playerState == null)
return 0;
return (byte)playerState->ClassJobLevels[_classJobToArrayIndex[classJob]];
return (byte)playerState->ClassJobLevelArray[_classJobToArrayIndex[classJob]];
}
public void Dispose()
@ -435,6 +342,5 @@ public sealed class GearsetterPlugin : IDalamudPlugin
_pluginInterface.RemoveChatLinkHandler();
_commandManager.RemoveHandler("/gbrowser");
_commandManager.RemoveHandler("/gup");
_gearsetterIpc.Dispose();
}
}

View File

@ -1,54 +0,0 @@
using System.Linq;
using Gearsetter.GameData;
using LLib.GameData;
using LLib.Gear;
using Lumina.Excel.Sheets;
namespace Gearsetter.Model;
internal abstract record BaseItem(Item Item, bool Hq, EquipmentStats Stats)
{
public Item Item { get; } = Item;
public uint ItemId { get; } = Item.RowId;
public bool Hq { get; } = Hq;
public bool CanBeHq { get; } = Item.CanBeHq;
public string Name { get; } = Item.Name.ToString();
public byte Level { get; } = Item.LevelEquip;
public uint ItemLevel { get; } = Item.LevelItem.RowId;
public byte Rarity { get; } = Item.Rarity;
public EEquipSlotCategory EquipSlotCategory { get; } = (EEquipSlotCategory)Item.EquipSlotCategory.RowId;
public uint ItemUiCategory { get; } = Item.ItemUICategory.RowId;
public abstract EClassJob ClassJob { get; init; }
public EquipmentStats Stats { get; } = Stats;
public int PrimaryStat { get; init; } = -1;
public int Damage
{
get
{
if (ClassJob.DealsMagicDamage())
return Item.DamageMag + Stats.Get(EBaseParam.DamageMag);
else if (ClassJob.DealsPhysicalDamage())
return Item.DamagePhys + Stats.Get(EBaseParam.DamagePhys);
else
return 0;
}
}
public bool HasAnyStat(params EBaseParam[] substats)
=> substats.Any(x => Stats.Has(x));
public bool IsCombatRelicWithoutSubstats()
{
return Rarity == 4
&& EquipSlotCategory is EEquipSlotCategory.OneHandedMainHand
or EEquipSlotCategory.TwoHandedMainHand
or EEquipSlotCategory.Shield
&& !ClassJob.IsCrafter()
&& !ClassJob.IsGatherer()
&& !HasAnyStat(EBaseParam.Crit,
EBaseParam.DirectHit, EBaseParam.Determination, EBaseParam.SkillSpeed,
EBaseParam.SpellSpeed, EBaseParam.Tenacity);
}
}

View File

@ -1,10 +1,59 @@
using LLib.GameData;
using LLib.Gear;
using Lumina.Excel.Sheets;
using Gearsetter.GameData;
using Lumina.Excel.GeneratedSheets;
namespace Gearsetter.Model;
internal sealed record EquipmentItem(Item Item, bool Hq, EquipmentStats Stats) : BaseItem(Item, Hq, Stats)
internal sealed record EquipmentItem(Item Item, bool Hq)
{
public override EClassJob ClassJob { get; init; } = EClassJob.Adventurer;
public Item Item { get; } = Item;
public uint ItemId { get; } = Item.RowId;
public bool Hq { get; } = Hq;
public bool CanBeHq { get; } = Item.CanBeHq;
public string Name { get; } = Item.Name.ToString();
public byte Level { get; } = Item.LevelEquip;
public uint ItemLevel { get; } = Item.LevelItem.Row;
public byte Rarity { get; } = Item.Rarity;
public EEquipSlotCategory EquipSlotCategory { get; } = (EEquipSlotCategory)Item.EquipSlotCategory.Row;
public uint ItemUiCategory { get; } = Item.ItemUICategory.Row;
public EClassJob ClassJob { get; init; } = EClassJob.Adventurer;
public EquipmentStats Stats { get; } = new(Item, Hq);
public int PrimaryStat { get; init; } = -1;
public int Damage
{
get
{
if (ClassJob.DealsMagicDamage())
return Item.DamageMag + Stats.Get(EBaseParam.DamageMag);
else if (ClassJob.DealsPhysicalDamage())
return Item.DamagePhys + Stats.Get(EBaseParam.DamagePhys);
else
return 0;
}
}
public bool HasAnyStat(params EBaseParam[] substats)
{
foreach (EBaseParam substat in substats)
{
if (Stats.Get(substat) > 0)
return true;
}
return false;
}
public bool IsCombatRelicWithoutSubstats()
{
return Rarity == 4
&& EquipSlotCategory is EEquipSlotCategory.OneHandedMainHand
or EEquipSlotCategory.TwoHandedMainHand
or EEquipSlotCategory.Shield
&& !ClassJob.IsCrafter()
&& !ClassJob.IsGatherer()
&& !HasAnyStat(EBaseParam.Crit,
EBaseParam.DirectHit, EBaseParam.Determination, EBaseParam.SkillSpeed,
EBaseParam.SpellSpeed, EBaseParam.Tenacity);
}
}

View File

@ -1,5 +1,34 @@
using System.Collections.Generic;
using System.Linq;
using LLib.Gear;
using Gearsetter.GameData;
using Lumina.Excel.GeneratedSheets;
namespace Gearsetter.Model;
internal sealed class EquipmentStats
{
private readonly Dictionary<EBaseParam, short> _values;
public EquipmentStats(Item item, bool hq)
{
_values = item.UnkData59.Where(x => x.BaseParam > 0)
.ToDictionary(x => (EBaseParam)x.BaseParam, x => x.BaseParamValue);
if (hq)
{
foreach (var hqstat in item.UnkData73.Select(x =>
((EBaseParam)x.BaseParamSpecial, x.BaseParamValueSpecial)))
{
if (_values.TryGetValue(hqstat.Item1, out var stat))
_values[hqstat.Item1] = (short)(stat + hqstat.BaseParamValueSpecial);
else
_values[hqstat.Item1] = hqstat.BaseParamValueSpecial;
}
}
}
public short Get(EBaseParam param)
{
_values.TryGetValue(param, out short v);
return v;
}
}

View File

@ -1,58 +0,0 @@
using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
using LLib.GameData;
using LLib.Gear;
using Lumina.Excel.Sheets;
namespace Gearsetter.Model;
internal sealed class GearsetData
{
public unsafe GearsetData(IDataManager dataManager, GearStatsCalculator gearStatsCalculator,
RaptureGearsetModule.GearsetEntry* gearset, string name)
{
Id = gearset->Id;
ClassJob = (EClassJob)gearset->ClassJob;
Name = name;
MainHand = GetItem(dataManager, gearStatsCalculator, gearset, RaptureGearsetModule.GearsetItemIndex.MainHand);
OffHand = GetItem(dataManager, gearStatsCalculator, gearset, RaptureGearsetModule.GearsetItemIndex.OffHand);
Head = GetItem(dataManager, gearStatsCalculator, gearset, RaptureGearsetModule.GearsetItemIndex.Head);
Body = GetItem(dataManager, gearStatsCalculator, gearset, RaptureGearsetModule.GearsetItemIndex.Body);
Hands = GetItem(dataManager, gearStatsCalculator, gearset, RaptureGearsetModule.GearsetItemIndex.Hands);
Legs = GetItem(dataManager, gearStatsCalculator, gearset, RaptureGearsetModule.GearsetItemIndex.Legs);
Feet = GetItem(dataManager, gearStatsCalculator, gearset, RaptureGearsetModule.GearsetItemIndex.Feet);
Ears = GetItem(dataManager, gearStatsCalculator, gearset, RaptureGearsetModule.GearsetItemIndex.Ears);
Neck = GetItem(dataManager, gearStatsCalculator, gearset, RaptureGearsetModule.GearsetItemIndex.Neck);
Wrists = GetItem(dataManager, gearStatsCalculator, gearset, RaptureGearsetModule.GearsetItemIndex.Wrists);
RingLeft = GetItem(dataManager, gearStatsCalculator, gearset, RaptureGearsetModule.GearsetItemIndex.RingLeft);
RingRight = GetItem(dataManager, gearStatsCalculator, gearset, RaptureGearsetModule.GearsetItemIndex.RingRight);
}
private static unsafe EquipmentItem? GetItem(IDataManager dataManager, GearStatsCalculator gearStatsCalculator,
RaptureGearsetModule.GearsetEntry* gearset, RaptureGearsetModule.GearsetItemIndex index)
{
var gearsetItem = gearset->GetItem(index);
if (gearsetItem.ItemId == 0)
return null;
var item = dataManager.GetExcelSheet<Item>().GetRow(gearsetItem.ItemId % 1_000_000);
bool hq = gearsetItem.ItemId > 1_000_000;
return new EquipmentItem(item, hq, gearStatsCalculator.CalculateGearStats(item, hq, []));
}
public byte Id { get; }
public EClassJob ClassJob { get; }
public string Name { get; }
public EquipmentItem? MainHand { get; }
public EquipmentItem? OffHand { get; }
public EquipmentItem? Head { get; }
public EquipmentItem? Body { get; }
public EquipmentItem? Hands { get; }
public EquipmentItem? Legs { get; }
public EquipmentItem? Feet { get; }
public EquipmentItem? Ears { get; }
public EquipmentItem? Neck { get; }
public EquipmentItem? Wrists { get; }
public EquipmentItem? RingLeft { get; }
public EquipmentItem? RingRight { get; }
}

View File

@ -1,10 +0,0 @@
using LLib.GameData;
using LLib.Gear;
using Lumina.Excel.Sheets;
namespace Gearsetter.Model;
internal sealed record InventoryItem(Item Item, bool Hq, EquipmentStats Stats, EClassJob ClassJob)
: BaseItem(Item, Hq, Stats)
{
}

View File

@ -2,9 +2,8 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Dalamud.Logging;
using Gearsetter.GameData;
using LLib.GameData;
using LLib.Gear;
namespace Gearsetter.Model;
@ -12,25 +11,40 @@ internal sealed class ItemList
{
private static readonly ReadOnlyDictionary<uint, byte> PreferredItems = new Dictionary<uint, byte>()
{
{ 16039, 50 },
{ 24589, 70 },
{ 33648, 80 },
{ 41081, 90 },
{ 44410, 60 },
{ 33648, 80 },
{ 24589, 70 },
{ 16039, 50 }
}.AsReadOnly();
public required EClassJob ClassJob { get; init; }
public required EEquipSlotCategory EquipSlotCategory { get; init; }
public required uint ItemUiCategory { get; init; }
public required List<BaseItem> Items { get; set; }
public EBaseParam PrimaryStat { get; set; }
public IReadOnlyList<EBaseParam> SubstatPriorities { get; private set; } = new List<EBaseParam>();
public required List<EquipmentItem> Items { get; set; }
public IReadOnlyList<EBaseParam> SubstatPriorities { get; set; } = new List<EBaseParam>();
public void Sort()
{
Items = Items
.OrderDescending(new ItemComparer(SubstatPriorities))
var preferredItems = Items
.Where(x => PreferredItems.ContainsKey(x.ItemId))
.ToList();
var defaultItems = Items
.Except(preferredItems)
.OrderDescending(new EquipmentItemComparer(SubstatPriorities))
.ToList();
// insert the preferred items
foreach (EquipmentItem preferredItem in preferredItems)
{
int level = PreferredItems[preferredItem.ItemId];
int index = defaultItems.FindIndex(x => x.Level < level);
if (index >= 0)
defaultItems.Insert(index, preferredItem);
else
defaultItems.Add(preferredItem);
}
Items = defaultItems;
}
public void UpdateStats(Dictionary<EClassJob, EBaseParam> primaryStats, Configuration configuration)
@ -54,48 +68,15 @@ internal sealed class ItemList
if (primaryStats.TryGetValue(ClassJob, out EBaseParam primaryStat))
{
PrimaryStat = primaryStat;
Items = Items
.Where(x => x is EquipmentItem)
.Cast<EquipmentItem>()
.Select(x => x with { PrimaryStat = x.Stats.Get(primaryStat) })
.Cast<BaseItem>()
.ToList();
}
}
public void ApplyFromInventory(Dictionary<(uint ItemId, bool Hq), List<EquipmentStats>> inventoryItems,
bool includeWithoutMateria)
private sealed class EquipmentItemComparer(IReadOnlyList<EBaseParam> substatPriorities) : IComparer<EquipmentItem>
{
foreach (var inventoryItem in inventoryItems)
{
var basicItem = Items.SingleOrDefault(x =>
x.ItemId == inventoryItem.Key.ItemId && x.Hq == inventoryItem.Key.Hq);
if (basicItem == null)
continue;
foreach (var inventoryStats in inventoryItem.Value)
{
if (includeWithoutMateria || inventoryStats.HasMateria())
Items.Add(
new InventoryItem(basicItem.Item, basicItem.Hq, inventoryStats, basicItem.ClassJob)
{
PrimaryStat = basicItem.Stats.Get(PrimaryStat)
});
}
}
Sort();
}
public void ClearFromInventory()
{
Items.RemoveAll(x => x is InventoryItem);
}
private sealed class ItemComparer(IReadOnlyList<EBaseParam> substatPriorities) : IComparer<BaseItem>
{
public int Compare(BaseItem? a, BaseItem? b)
public int Compare(EquipmentItem? a, EquipmentItem? b)
{
ArgumentNullException.ThrowIfNull(a);
ArgumentNullException.ThrowIfNull(b);
@ -106,11 +87,6 @@ internal sealed class ItemList
if (damageA != damageB)
return damageA.CompareTo(damageB);
bool hasPriorityA = TryGetPreferredItemPriority(a, b, out byte priorityA);
bool hasPriorityB = TryGetPreferredItemPriority(b, a, out byte priorityB);
if ((hasPriorityA || hasPriorityB) && priorityA != priorityB)
return priorityA.CompareTo(priorityB);
// gear: primary stat wins
//
// we pretend every gear item has at least 1 primary stat to ensure weathered items are sorted last(ish),
@ -173,33 +149,5 @@ internal sealed class ItemList
// fallback
return string.CompareOrdinal(a.Name, b.Name);
}
private static bool TryGetPreferredItemPriority(BaseItem self, BaseItem other, out byte priority)
{
if (PreferredItems.TryGetValue(self.ItemId, out byte levelSelf))
{
// both items are preferred, sort by level only
if (PreferredItems.TryGetValue(other.ItemId, out byte _))
{
priority = levelSelf;
return true;
}
// if they're the same level, place the preferred item last
if (levelSelf == other.Level)
{
priority = (byte)(levelSelf - 1);
return true;
}
priority = levelSelf;
return true;
}
else
{
priority = self.Level;
return false;
}
}
}
}

View File

@ -1,12 +0,0 @@
using Dalamud.Game.Text.SeStringHandling;
using FFXIVClientStructs.FFXIV.Client.Game;
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
namespace Gearsetter.Model;
internal sealed record RecommendedItemChange(
uint ItemId,
InventoryType? SourceInventory,
int? SourceInventorySlot,
RaptureGearsetModule.GearsetItemIndex TargetSlot,
SeString Text);

View File

@ -1,15 +1,15 @@
using Dalamud.Plugin;
using Dalamud.Interface.Windowing;
using Dalamud.Plugin;
using ImGuiNET;
using LLib.ImGui;
namespace Gearsetter.Windows;
internal sealed class ConfigWindow : LWindow
internal sealed class ConfigWindow : Window
{
private readonly IDalamudPluginInterface _pluginInterface;
private readonly DalamudPluginInterface _pluginInterface;
private readonly Configuration _configuration;
public ConfigWindow(IDalamudPluginInterface pluginInterface, Configuration configuration)
public ConfigWindow(DalamudPluginInterface pluginInterface, Configuration configuration)
: base("Gearsetter - Config###GearsetterConfig", ImGuiWindowFlags.AlwaysAutoResize)
{
_pluginInterface = pluginInterface;

View File

@ -6,17 +6,14 @@ using System.Numerics;
using Dalamud.Game.Text;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Windowing;
using Dalamud.Plugin.Services;
using Gearsetter.GameData;
using Gearsetter.Model;
using ImGuiNET;
using LLib.GameData;
using LLib.Gear;
using LLib.ImGui;
namespace Gearsetter.Windows;
internal sealed class EquipmentBrowserWindow : LWindow
internal sealed class EquipmentBrowserWindow : Window
{
private readonly GearsetterPlugin _plugin;
private readonly GameDataHolder _dataHolder;
@ -63,7 +60,7 @@ internal sealed class EquipmentBrowserWindow : LWindow
public override void OnOpen()
{
if (_clientState.LocalPlayer != null)
_selectedClassJob = ((EClassJob)_clientState.LocalPlayer.ClassJob.RowId).AsJob();
_selectedClassJob = ((EClassJob)_clientState.LocalPlayer.ClassJob.Id).AsJob();
UpdateEquipmentCategories();
}
@ -73,7 +70,7 @@ internal sealed class EquipmentBrowserWindow : LWindow
return _clientState.IsLoggedIn;
}
public override unsafe void Draw()
public override void Draw()
{
int currentClassJob = Array.IndexOf(_classJobIds, _selectedClassJob);
if (currentClassJob == -1)
@ -112,10 +109,9 @@ internal sealed class EquipmentBrowserWindow : LWindow
ImGui.SameLine();
ImGui.Checkbox("Hide normal quality items", ref _hideNormalQualityItems);
Dictionary<(uint ItemId, bool Hq), List<EquipmentStats>> ownedItems = _plugin.GetAllInventoryItems();
try
{
itemList.ApplyFromInventory(ownedItems, _onlyShowOwnedItems);
Dictionary<(uint, bool), int>? ownedItems = null;
if (_onlyShowOwnedItems)
ownedItems = _plugin.GetAllInventoryItems();
byte maxLevel = byte.MaxValue;
if (_onlyShowEquippableItems)
@ -126,10 +122,6 @@ internal sealed class EquipmentBrowserWindow : LWindow
or EEquipSlotCategory.TwoHandedMainHand
&& !itemList.ClassJob.IsCrafter()
&& !itemList.ClassJob.IsGatherer();
var hoverColorPtr = ImGui.GetStyleColorVec4(ImGuiCol.HeaderHovered);
var hoverColor = new Vector4(hoverColorPtr->X, hoverColorPtr->Y, hoverColorPtr->Z, 0.3f);
if (ImGui.BeginTable("ItemList", 2 + (includeDamage ? 1 : 0) + itemList.SubstatPriorities.Count,
ImGuiTableFlags.Borders | ImGuiTableFlags.Resizable))
{
@ -138,20 +130,14 @@ internal sealed class EquipmentBrowserWindow : LWindow
if (includeDamage)
ImGui.TableSetupColumn("Damage", ImGuiTableColumnFlags.WidthFixed, 50);
foreach (var substat in itemList.SubstatPriorities)
ImGui.TableSetupColumn(_dataHolder.StatNames.GetValueOrDefault(substat, substat.ToString()),
ImGuiTableColumnFlags.WidthFixed, 50);
ImGui.TableSetupColumn(_dataHolder.StatNames[substat], ImGuiTableColumnFlags.WidthFixed, 50);
ImGui.TableHeadersRow();
ImGui.PushStyleColor(ImGuiCol.HeaderHovered, hoverColor);
foreach (var item in itemList.Items.DistinctBy(x => new
{ x.ItemId, x.Hq, Stats = x.Stats.GetHashCode() }))
foreach (var item in itemList.Items)
{
if (item is not InventoryItem)
{
if (_onlyShowOwnedItems)
if (ownedItems != null && !ownedItems.ContainsKey((item.ItemId, item.Hq)))
continue;
}
if (item.Level > maxLevel)
continue;
@ -175,17 +161,11 @@ internal sealed class EquipmentBrowserWindow : LWindow
string name = item.Name;
if (item.Hq)
name += $" {SeIconChar.HighQuality.ToIconString()}";
if (item is InventoryItem { Stats.MateriaCount: > 0 } inventoryItem)
name +=
$" {string.Join("", Enumerable.Repeat(SeIconChar.Circle.ToIconString(), inventoryItem.Stats.MateriaCount))}";
if (color != null)
ImGui.PushStyleColor(ImGuiCol.Text, color.Value);
ImGui.Selectable(name, false, ImGuiSelectableFlags.SpanAllColumns);
if (color != null)
ImGui.PopStyleColor();
ImGui.TextColored(color.Value, name);
else
ImGui.Text(name);
if (ImGui.IsItemClicked())
{
@ -215,33 +195,18 @@ internal sealed class EquipmentBrowserWindow : LWindow
{
if (ImGui.TableNextColumn())
{
var estat = item.Stats.GetEquipment(substat);
var mstat = item.Stats.GetMateria(substat);
if (estat == 0 && mstat == 0)
var stat = item.Stats.Get(substat);
if (stat == 0)
ImGui.Text("-");
else if (mstat == 0)
ImGui.Text(string.Create(CultureInfo.InvariantCulture, $"{estat}"));
else
ImGui.Text(string.Create(CultureInfo.InvariantCulture, $"{estat} +{mstat}"));
if (item.Stats.IsOvercapped(substat))
{
ImGui.SameLine();
ImGui.Text(SeIconChar.Debuff.ToIconString());
}
ImGui.Text(stat.ToString(CultureInfo.CurrentCulture));
}
}
}
ImGui.PopStyleColor();
ImGui.EndTable();
}
}
finally
{
itemList.ClearFromInventory();
}
}
private void UpdateEquipmentCategories()
{

View File

@ -4,83 +4,9 @@
"net8.0-windows7.0": {
"DalamudPackager": {
"type": "Direct",
"requested": "[11.0.0, )",
"resolved": "11.0.0",
"contentHash": "bjT7XUlhIJSmsE/O76b7weUX+evvGQctbQB8aKXt94o+oPWxHpCepxAGMs7Thow3AzCyqWs7cOpp9/2wcgRRQA=="
},
"DotNet.ReproducibleBuilds": {
"type": "Direct",
"requested": "[1.1.1, )",
"resolved": "1.1.1",
"contentHash": "+H2t/t34h6mhEoUvHi8yGXyuZ2GjSovcGYehJrS2MDm2XgmPfZL2Sdxg+uL2lKgZ4M6tTwKHIlxOob2bgh0NRQ==",
"dependencies": {
"Microsoft.SourceLink.AzureRepos.Git": "1.1.1",
"Microsoft.SourceLink.Bitbucket.Git": "1.1.1",
"Microsoft.SourceLink.GitHub": "1.1.1",
"Microsoft.SourceLink.GitLab": "1.1.1"
}
},
"Microsoft.SourceLink.Gitea": {
"type": "Direct",
"requested": "[8.0.0, )",
"resolved": "8.0.0",
"contentHash": "KOBodmDnlWGIqZt2hT47Q69TIoGhIApDVLCyyj9TT5ct8ju16AbHYcB4XeknoHX562wO1pMS/1DfBIZK+V+sxg==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "8.0.0",
"Microsoft.SourceLink.Common": "8.0.0"
}
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ=="
},
"Microsoft.SourceLink.AzureRepos.Git": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "qB5urvw9LO2bG3eVAkuL+2ughxz2rR7aYgm2iyrB8Rlk9cp2ndvGRCvehk3rNIhRuNtQaeKwctOl1KvWiklv5w==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "1.1.1",
"Microsoft.SourceLink.Common": "1.1.1"
}
},
"Microsoft.SourceLink.Bitbucket.Git": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "cDzxXwlyWpLWaH0em4Idj0H3AmVo3L/6xRXKssYemx+7W52iNskj/SQ4FOmfCb8YQt39otTDNMveCZzYtMoucQ==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "1.1.1",
"Microsoft.SourceLink.Common": "1.1.1"
}
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "1.1.1",
"Microsoft.SourceLink.Common": "1.1.1"
}
},
"Microsoft.SourceLink.GitLab": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "tvsg47DDLqqedlPeYVE2lmiTpND8F0hkrealQ5hYltSmvruy/Gr5nHAKSsjyw5L3NeM/HLMI5ORv7on/M4qyZw==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "1.1.1",
"Microsoft.SourceLink.Common": "1.1.1"
}
},
"llib": {
"type": "Project",
"dependencies": {
"DalamudPackager": "[11.0.0, )"
}
"requested": "[2.1.12, )",
"resolved": "2.1.12",
"contentHash": "Sc0PVxvgg4NQjcI8n10/VfUQBAS4O+Fw2pZrAqBdRMbthYGeogzu5+xmIGCGmsEZ/ukMOBuAqiNiB5qA3MRalg=="
}
}
}

1
LLib

@ -1 +0,0 @@
Subproject commit 3176f6b736a4f310f1fc793c6a9d74ae8ce0b916