mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-20 22:47:45 +01:00
Update Dalamud Services and use Dalamuds texture provider.
This commit is contained in:
parent
79ec604e89
commit
0afcc8cca8
24 changed files with 94 additions and 115 deletions
|
|
@ -3,9 +3,8 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using Dalamud;
|
||||
using Dalamud.Data;
|
||||
using Dalamud.Game.ClientState;
|
||||
using Dalamud.Hooking;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Dalamud.Utility;
|
||||
using Dalamud.Utility.Signatures;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.UI;
|
||||
|
|
@ -19,7 +18,7 @@ namespace Glamourer.Unlocks;
|
|||
public class CustomizeUnlockManager : IDisposable, ISavable
|
||||
{
|
||||
private readonly SaveService _saveService;
|
||||
private readonly ClientState _clientState;
|
||||
private readonly IClientState _clientState;
|
||||
private readonly ObjectUnlocked _event;
|
||||
|
||||
private readonly Dictionary<uint, long> _unlocked = new();
|
||||
|
|
@ -29,8 +28,8 @@ public class CustomizeUnlockManager : IDisposable, ISavable
|
|||
public IReadOnlyDictionary<uint, long> Unlocked
|
||||
=> _unlocked;
|
||||
|
||||
public unsafe CustomizeUnlockManager(SaveService saveService, CustomizationService customizations, DataManager gameData,
|
||||
ClientState clientState, ObjectUnlocked @event)
|
||||
public CustomizeUnlockManager(SaveService saveService, CustomizationService customizations, IDataManager gameData,
|
||||
IClientState clientState, ObjectUnlocked @event)
|
||||
{
|
||||
SignatureHelper.Initialise(this);
|
||||
_saveService = saveService;
|
||||
|
|
@ -178,7 +177,7 @@ public class CustomizeUnlockManager : IDisposable, ISavable
|
|||
|
||||
/// <summary> Create a list of all unlockable hairstyles and facepaints. </summary>
|
||||
private static Dictionary<CustomizeData, (uint Data, string Name)> CreateUnlockableCustomizations(CustomizationService customizations,
|
||||
DataManager gameData)
|
||||
IDataManager gameData)
|
||||
{
|
||||
var ret = new Dictionary<CustomizeData, (uint Data, string Name)>();
|
||||
var sheet = gameData.GetExcelSheet<CharaMakeCustomize>(ClientLanguage.English)!;
|
||||
|
|
|
|||
|
|
@ -3,9 +3,8 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Dalamud.Data;
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Game.ClientState;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Dalamud.Utility.Signatures;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.UI;
|
||||
|
|
@ -22,7 +21,7 @@ public class ItemUnlockManager : ISavable, IDisposable, IReadOnlyDictionary<Item
|
|||
{
|
||||
private readonly SaveService _saveService;
|
||||
private readonly ItemManager _items;
|
||||
private readonly ClientState _clientState;
|
||||
private readonly IClientState _clientState;
|
||||
private readonly Framework _framework;
|
||||
private readonly ObjectUnlocked _event;
|
||||
private readonly IdentifierService _identifier;
|
||||
|
|
@ -47,7 +46,7 @@ public class ItemUnlockManager : ISavable, IDisposable, IReadOnlyDictionary<Item
|
|||
|
||||
public readonly IReadOnlyDictionary<ItemId, UnlockRequirements> Unlockable;
|
||||
|
||||
public ItemUnlockManager(SaveService saveService, ItemManager items, ClientState clientState, DataManager gameData, Framework framework,
|
||||
public ItemUnlockManager(SaveService saveService, ItemManager items, IClientState clientState, IDataManager gameData, Framework framework,
|
||||
ObjectUnlocked @event, IdentifierService identifier)
|
||||
{
|
||||
SignatureHelper.Initialise(this);
|
||||
|
|
@ -282,7 +281,7 @@ public class ItemUnlockManager : ISavable, IDisposable, IReadOnlyDictionary<Item
|
|||
private void OnLogin(object? _, EventArgs _2)
|
||||
=> Scan();
|
||||
|
||||
private static Dictionary<ItemId, UnlockRequirements> CreateUnlockData(DataManager gameData, ItemManager items)
|
||||
private static Dictionary<ItemId, UnlockRequirements> CreateUnlockData(IDataManager gameData, ItemManager items)
|
||||
{
|
||||
var ret = new Dictionary<ItemId, UnlockRequirements>();
|
||||
var cabinet = gameData.GetExcelSheet<Cabinet>()!;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue