master
Liza 2024-09-22 23:02:22 +02:00
parent e6e3a1f297
commit 6dfc18ee6a
Signed by: liza
GPG Key ID: 7199F8D727D55F67
4 changed files with 22 additions and 16 deletions

17
Shop/IShopWindow.cs Normal file
View File

@ -0,0 +1,17 @@
using System.Numerics;
using FFXIVClientStructs.FFXIV.Component.GUI;
namespace LLib.Shop;
public interface IShopWindow
{
public bool IsEnabled { get; }
public bool IsOpen { get; set; }
public Vector2? Position { get; set; }
public int GetCurrencyCount();
public unsafe void UpdateShopStock(AtkUnitBase* addon);
public unsafe void TriggerPurchase(AtkUnitBase* addonShop, int buyNow);
public void SaveExternalPluginState();
public void RestoreExternalPluginState();
}

View File

@ -1,4 +1,4 @@
namespace Workshoppa.GameData.Shops; namespace LLib.Shop.Model;
public sealed class ItemForSale public sealed class ItemForSale
{ {

View File

@ -1,6 +1,6 @@
using System; using System;
namespace Workshoppa.GameData.Shops; namespace LLib.Shop.Model;
public sealed class PurchaseState public sealed class PurchaseState
{ {

View File

@ -1,4 +1,5 @@
using System; using System;
using System.Diagnostics.CodeAnalysis;
using System.Numerics; using System.Numerics;
using Dalamud.Game.Addon.Lifecycle; using Dalamud.Game.Addon.Lifecycle;
using Dalamud.Game.Addon.Lifecycle.AddonArgTypes; using Dalamud.Game.Addon.Lifecycle.AddonArgTypes;
@ -6,23 +7,11 @@ using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.Game; using FFXIVClientStructs.FFXIV.Client.Game;
using FFXIVClientStructs.FFXIV.Component.GUI; using FFXIVClientStructs.FFXIV.Component.GUI;
using LLib.GameUI; using LLib.GameUI;
using Workshoppa.GameData.Shops; using LLib.Shop.Model;
namespace LLib.Shop; namespace LLib.Shop;
public interface IShopWindow [SuppressMessage("ReSharper", "ClassCanBeSealed.Global")]
{
public bool IsEnabled { get; }
public bool IsOpen { get; set; }
public Vector2? Position { get; set; }
public int GetCurrencyCount();
public unsafe void UpdateShopStock(AtkUnitBase* addon);
public unsafe void TriggerPurchase(AtkUnitBase* addonShop, int buyNow);
public void SaveExternalPluginState();
public void RestoreExternalPluginState();
}
public class RegularShopBase public class RegularShopBase
{ {
private readonly IShopWindow _parentWindow; private readonly IShopWindow _parentWindow;