Initial Update for multiple stains, some facewear support, and API X

This commit is contained in:
Ottermandias 2024-07-11 14:21:25 +02:00
parent c1d9af2dd0
commit 7caf6cc08a
90 changed files with 654 additions and 537 deletions

View file

@ -1,4 +1,4 @@
using Dalamud;
using Dalamud.Game;
using Dalamud.Hooking;
using Dalamud.Plugin.Services;
using Dalamud.Utility;
@ -8,6 +8,7 @@ using Glamourer.GameData;
using Glamourer.Events;
using Glamourer.Services;
using Lumina.Excel.GeneratedSheets;
using Penumbra.GameData;
using Penumbra.GameData.Enums;
namespace Glamourer.Unlocks;
@ -127,8 +128,8 @@ public class CustomizeUnlockManager : IDisposable, ISavable
}
private delegate void SetUnlockLinkValueDelegate(nint uiState, uint data, byte value);
[Signature("48 83 EC ?? 8B C2 44 8B D2", DetourName = nameof(SetUnlockLinkValueDetour))]
[Signature(Sigs.SetUnlockLinkValue, DetourName = nameof(SetUnlockLinkValueDetour))]
private readonly Hook<SetUnlockLinkValueDelegate> _setUnlockLinkValueHook = null!;
private void SetUnlockLinkValueDetour(nint uiState, uint data, byte value)

View file

@ -1,4 +1,4 @@
using Dalamud.Interface.Internal.Notifications;
using Dalamud.Interface.ImGuiNotification;
using Glamourer.Services;
using Newtonsoft.Json;
using OtterGui.Classes;

View file

@ -144,8 +144,7 @@ public class ItemUnlockManager : ISavable, IDisposable, IReadOnlyDictionary<Item
if (newGlamourState != _lastGlamourState)
{
_lastGlamourState = newGlamourState;
// TODO: Make independent from hardcoded value
var span = new ReadOnlySpan<uint>(mirageManager->PrismBoxItemIds, 800);
var span = mirageManager->PrismBoxItemIds;
foreach (var item in span)
changes |= AddItem(item, time);
}
@ -154,10 +153,9 @@ public class ItemUnlockManager : ISavable, IDisposable, IReadOnlyDictionary<Item
if (newPlateState != _lastPlateState)
{
_lastPlateState = newPlateState;
foreach (var plate in mirageManager->GlamourPlatesSpan)
foreach (var plate in mirageManager->GlamourPlates)
{
// TODO: Make independent from hardcoded value
var span = new ReadOnlySpan<uint>(plate.ItemIds, 12);
var span = plate.ItemIds;
foreach (var item in span)
changes |= AddItem(item, time);
}
@ -176,8 +174,8 @@ public class ItemUnlockManager : ISavable, IDisposable, IReadOnlyDictionary<Item
var item = container->GetInventorySlot(_currentInventoryIndex++);
if (item != null)
{
changes |= AddItem(item->ItemID, time);
changes |= AddItem(item->GlamourID, time);
changes |= AddItem(item->ItemId, time);
changes |= AddItem(item->GlamourId, time);
}
}
else

View file

@ -1,4 +1,4 @@
using Dalamud.Interface.Internal.Notifications;
using Dalamud.Interface.ImGuiNotification;
using OtterGui.Classes;
namespace Glamourer.Unlocks;