diff --git a/CurrencyAlert/Configuration.cs b/CurrencyAlert/Configuration.cs index dd020ad..411dd57 100644 --- a/CurrencyAlert/Configuration.cs +++ b/CurrencyAlert/Configuration.cs @@ -51,7 +51,7 @@ public class Configuration : IPluginConfiguration }; [NonSerialized] - private DalamudPluginInterface? pluginInterface; - public void Initialize(DalamudPluginInterface inputPluginInterface) => pluginInterface = inputPluginInterface; + private IDalamudPluginInterface? pluginInterface; + public void Initialize(IDalamudPluginInterface inputPluginInterface) => pluginInterface = inputPluginInterface; public void Save() => pluginInterface!.SavePluginConfig(this); -} \ No newline at end of file +} diff --git a/CurrencyAlert/CurrencyAlert.csproj b/CurrencyAlert/CurrencyAlert.csproj index 1bba633..cee8d94 100644 --- a/CurrencyAlert/CurrencyAlert.csproj +++ b/CurrencyAlert/CurrencyAlert.csproj @@ -8,7 +8,7 @@ - net7.0-windows + net8.0-windows x64 enable latest @@ -27,7 +27,7 @@ - + $(DalamudLibPath)FFXIVClientStructs.dll false diff --git a/CurrencyAlert/DataModels/CurrencyInfo.cs b/CurrencyAlert/DataModels/CurrencyInfo.cs index de380aa..a876dde 100644 --- a/CurrencyAlert/DataModels/CurrencyInfo.cs +++ b/CurrencyAlert/DataModels/CurrencyInfo.cs @@ -1,6 +1,8 @@ using System; using System.Linq; using Dalamud.Interface.Internal; +using Dalamud.Interface.Textures; +using Dalamud.Interface.Textures.TextureWraps; using Dalamud.Utility; using FFXIVClientStructs.FFXIV.Client.Game; using ImGuiScene; @@ -9,12 +11,12 @@ using Lumina.Excel.GeneratedSheets; namespace CurrencyAlert.DataModels; -public class CurrencyInfo : IDisposable +public class CurrencyInfo { public uint ItemID { get; } public string ItemName { get; } = string.Empty; public uint IconID { get; } - public IDalamudTextureWrap? IconTexture { get; } + public ISharedImmediateTexture? IconTexture { get; } public CurrencyInfo(CurrencyName currency) { @@ -25,18 +27,9 @@ public class CurrencyInfo : IDisposable { ItemName = currencyItem.Name.ToDalamudString().TextValue; IconID = currencyItem.Icon; - - if (IconCache.Instance.GetIcon(IconID) is { } iconTexture) - { - IconTexture = iconTexture; - } + IconTexture = IconCache.Instance.GetIcon(IconID); } } - - public void Dispose() - { - IconTexture?.Dispose(); - } public unsafe int GetCurrentQuantity() => InventoryManager.Instance()->GetInventoryItemCount(ItemID); @@ -70,8 +63,8 @@ public class CurrencyInfo : IDisposable { return LuminaCache.Instance .Where(tomestone => tomestone.Tomestones.Row is 3) - .First() - .Item.Row; + .FirstOrDefault() + ?.Item?.Row ?? 0; } // This will always return the ItemID of whatever tomestone is not limited diff --git a/CurrencyAlert/DataModels/TrackedCurrency.cs b/CurrencyAlert/DataModels/TrackedCurrency.cs index e661e08..aaefc01 100644 --- a/CurrencyAlert/DataModels/TrackedCurrency.cs +++ b/CurrencyAlert/DataModels/TrackedCurrency.cs @@ -1,4 +1,5 @@ using System.Numerics; +using Dalamud.Interface.Textures.TextureWraps; using ImGuiNET; using KamiLib.Configuration; @@ -15,9 +16,10 @@ public record TrackedCurrency(CurrencyName Name, Setting Threshold, Setting public void DrawIcon() { - if (CurrencyInfo().IconTexture is { } icon) + var texture = CurrencyInfo().IconTexture; + if (texture != null && texture.TryGetWrap(out IDalamudTextureWrap? wrap, out _)) { - ImGui.Image(icon.ImGuiHandle, new Vector2(20.0f)); + ImGui.Image(wrap.ImGuiHandle, new Vector2(20.0f)); } } diff --git a/CurrencyAlert/Localization/LocalizationManager.cs b/CurrencyAlert/Localization/LocalizationManager.cs index 9b25e63..19152c4 100644 --- a/CurrencyAlert/Localization/LocalizationManager.cs +++ b/CurrencyAlert/Localization/LocalizationManager.cs @@ -30,12 +30,12 @@ internal class LocalizationManager : IDisposable { try { - PluginLog.Information($"Loading Localization for {languageCode}"); + //PluginLog.Information($"Loading Localization for {languageCode}"); Strings.Culture = new CultureInfo(languageCode); } catch (Exception ex) { - PluginLog.Error(ex, "Unable to Load Localization"); + //PluginLog.Error(ex, "Unable to Load Localization"); } } -} \ No newline at end of file +} diff --git a/CurrencyAlert/Plugin.cs b/CurrencyAlert/Plugin.cs index 513b41a..c3f72a3 100644 --- a/CurrencyAlert/Plugin.cs +++ b/CurrencyAlert/Plugin.cs @@ -9,8 +9,8 @@ namespace CurrencyAlert; public sealed class Plugin : IDalamudPlugin { public string Name => "CurrencyAlert"; - - public Plugin(DalamudPluginInterface pluginInterface) + + public Plugin(IDalamudPluginInterface pluginInterface) { pluginInterface.Create(); @@ -33,4 +33,4 @@ public sealed class Plugin : IDalamudPlugin Service.CurrencyTracker.Dispose(); LocalizationManager.Cleanup(); } -} \ No newline at end of file +} diff --git a/CurrencyAlert/Service.cs b/CurrencyAlert/Service.cs index 5ce976f..86e5da8 100644 --- a/CurrencyAlert/Service.cs +++ b/CurrencyAlert/Service.cs @@ -9,7 +9,7 @@ namespace CurrencyAlert; public class Service { - [PluginService] public static DalamudPluginInterface PluginInterface { get; private set; } = null!; + [PluginService] public static IDalamudPluginInterface PluginInterface { get; private set; } = null!; [PluginService] public static IFramework Framework { get; private set; } = null!; [PluginService] public static IClientState ClientState { get; private set; } = null!; diff --git a/CurrencyAlert/System.cs/CurrencyTracker.cs b/CurrencyAlert/System.cs/CurrencyTracker.cs index 84319e7..9d396e4 100644 --- a/CurrencyAlert/System.cs/CurrencyTracker.cs +++ b/CurrencyAlert/System.cs/CurrencyTracker.cs @@ -59,7 +59,7 @@ public class CurrencyTracker : IDisposable else { var lockoutRemaining = TimeSpan.FromMinutes(5) - timer.Elapsed; - PluginLog.Debug($"Zone Change Messages Suppressed, '{lockoutRemaining}' Remaining"); + //PluginLog.Debug($"Zone Change Messages Suppressed, '{lockoutRemaining}' Remaining"); } } diff --git a/CurrencyAlert/packages.lock.json b/CurrencyAlert/packages.lock.json index 7753b54..6cacf3c 100644 --- a/CurrencyAlert/packages.lock.json +++ b/CurrencyAlert/packages.lock.json @@ -1,12 +1,12 @@ { "version": 1, "dependencies": { - "net7.0-windows7.0": { + "net8.0-windows7.0": { "DalamudPackager": { "type": "Direct", - "requested": "[2.1.12, )", - "resolved": "2.1.12", - "contentHash": "Sc0PVxvgg4NQjcI8n10/VfUQBAS4O+Fw2pZrAqBdRMbthYGeogzu5+xmIGCGmsEZ/ukMOBuAqiNiB5qA3MRalg==" + "requested": "[2.1.13, )", + "resolved": "2.1.13", + "contentHash": "rMN1omGe8536f4xLMvx9NwfvpAc9YFFfeXJ1t4P4PE6Gu8WCIoFliR1sh07hM+bfODmesk/dvMbji7vNI+B/pQ==" }, "kamilib": { "type": "Project" diff --git a/KamiLib/Atk/AtkValueHelper.cs b/KamiLib/Atk/AtkValueHelper.cs index 747e4b2..ec19956 100644 --- a/KamiLib/Atk/AtkValueHelper.cs +++ b/KamiLib/Atk/AtkValueHelper.cs @@ -8,6 +8,7 @@ namespace KamiLib.Atk; public static class AtkValueHelper { + /* public static unsafe void PrintAtkValue(AtkValue value, int index) { switch (value.Type) @@ -44,6 +45,7 @@ public static class AtkValueHelper break; } } + */ } public static class AtkValueExtensions @@ -52,4 +54,4 @@ public static class AtkValueExtensions { return Marshal.PtrToStringUTF8(new nint(value.String)) ?? "Unable to Allocate String"; } -} \ No newline at end of file +} diff --git a/KamiLib/Atk/NodeHelper.cs b/KamiLib/Atk/NodeHelper.cs index ba45cbc..96d0bea 100644 --- a/KamiLib/Atk/NodeHelper.cs +++ b/KamiLib/Atk/NodeHelper.cs @@ -96,11 +96,11 @@ public static unsafe class Node foreach (var index in Enumerable.Range(0, uldManager.NodeListCount)) { var currentNode = uldManager.NodeList[index]; - if (currentNode->NodeID != nodeId) continue; + if (currentNode->NodeId != nodeId) continue; return (T*) currentNode; } return null; } -} \ No newline at end of file +} diff --git a/KamiLib/Blacklist/BlacklistDraw.cs b/KamiLib/Blacklist/BlacklistDraw.cs index 955338c..3aa9745 100644 --- a/KamiLib/Blacklist/BlacklistDraw.cs +++ b/KamiLib/Blacklist/BlacklistDraw.cs @@ -76,7 +76,7 @@ public static class BlacklistDraw if (ImGui.InputTextWithHint("###TerritorySearch", Strings.Blacklist_Search, ref _searchString, 60, ImGuiInputTextFlags.AutoSelectAll)) { _searchResults = Search(_searchString, 5); - PluginLog.Debug("Updating TerritorySearch Results"); + //PluginLog.Debug("Updating TerritorySearch Results"); } }) .AddAction(() => DisplayResults(_searchResults)) diff --git a/KamiLib/Caching/IconCache.cs b/KamiLib/Caching/IconCache.cs index c4ead37..2db9e8a 100644 --- a/KamiLib/Caching/IconCache.cs +++ b/KamiLib/Caching/IconCache.cs @@ -2,6 +2,8 @@ using System.Collections.Generic; using System.Threading.Tasks; using Dalamud.Interface.Internal; +using Dalamud.Interface.Textures; +using Dalamud.Interface.Textures.TextureWraps; using Dalamud.Logging; using Dalamud.Utility; using ImGuiScene; @@ -10,7 +12,7 @@ namespace KamiLib.Caching; public class IconCache : IDisposable { - private readonly Dictionary iconTextures = new(); + private readonly Dictionary iconTextures = new(); private const string IconFilePath = "ui/icon/{0:D3}000/{1:D6}_hr1.tex"; @@ -24,11 +26,6 @@ public class IconCache : IDisposable public void Dispose() { - foreach (var texture in iconTextures.Values) - { - texture?.Dispose(); - } - iconTextures.Clear(); } @@ -39,25 +36,18 @@ public class IconCache : IDisposable try { var path = IconFilePath.Format(iconId / 1000, iconId); - var tex = Service.TextureProvider.GetTextureFromGame(path); + var tex = Service.TextureProvider.GetFromGame(path); - if (tex is not null && tex.ImGuiHandle != nint.Zero) - { - iconTextures[iconId] = tex; - } - else - { - tex?.Dispose(); - } - } + iconTextures[iconId] = tex; + } catch (Exception ex) { - PluginLog.LogError($"Failed loading texture for icon {iconId} - {ex.Message}"); + //PluginLog.LogError($"Failed loading texture for icon {iconId} - {ex.Message}"); } }); } - public IDalamudTextureWrap? GetIcon(uint iconId) + public ISharedImmediateTexture? GetIcon(uint iconId) { if (iconTextures.TryGetValue(iconId, out var value)) return value; diff --git a/KamiLib/Caching/LuminaCache.cs b/KamiLib/Caching/LuminaCache.cs index 7b2f18b..b9a6525 100644 --- a/KamiLib/Caching/LuminaCache.cs +++ b/KamiLib/Caching/LuminaCache.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using Dalamud; +using Dalamud.Game; using Lumina.Excel; namespace KamiLib.Caching; @@ -58,4 +59,4 @@ public class LuminaCache : IEnumerable where T : ExcelRow public IEnumerator GetEnumerator() => Service.DataManager.GetExcelSheet()!.GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); -} \ No newline at end of file +} diff --git a/KamiLib/ChatCommands/CommandManager.cs b/KamiLib/ChatCommands/CommandManager.cs index 3f12aea..877a38e 100644 --- a/KamiLib/ChatCommands/CommandManager.cs +++ b/KamiLib/ChatCommands/CommandManager.cs @@ -60,7 +60,7 @@ public class CommandManager : IDisposable { var commandData = Command.GetCommandData(command.ToLower(), arguments.ToLower()); - PluginLog.Debug($"[{KamiCommon.PluginName}] Received Command: {commandData}"); + //PluginLog.Debug($"[{KamiCommon.PluginName}] Received Command: {commandData}"); Command.ProcessCommand(commandData, Commands); } } diff --git a/KamiLib/Drawing/DrawList.cs b/KamiLib/Drawing/DrawList.cs index b26b5eb..9ee3556 100644 --- a/KamiLib/Drawing/DrawList.cs +++ b/KamiLib/Drawing/DrawList.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Numerics; using Dalamud.Interface.Components; +using Dalamud.Interface.Textures.TextureWraps; using Dalamud.Interface.Utility; using ImGuiNET; using KamiLib.Caching; @@ -41,11 +42,11 @@ public abstract class DrawList { var icon = IconCache.Instance.GetIcon(iconID); - if (icon != null) + if (icon != null && icon.TryGetWrap(out IDalamudTextureWrap? wrap, out _)) { DrawActions.Add(() => { - ImGui.Image(icon.ImGuiHandle, size, Vector2.Zero, Vector2.One, color); + ImGui.Image(wrap.ImGuiHandle, size, Vector2.Zero, Vector2.One, color); }); } @@ -56,11 +57,11 @@ public abstract class DrawList { var icon = IconCache.Instance.GetIcon(iconID); - if (icon != null) + if (icon != null && icon.TryGetWrap(out IDalamudTextureWrap? wrap, out _)) { DrawActions.Add(() => { - ImGui.Image(icon.ImGuiHandle, size, Vector2.Zero, Vector2.One, Vector4.One with {W = transparency}); + ImGui.Image(wrap.ImGuiHandle, size, Vector2.Zero, Vector2.One, Vector4.One with {W = transparency}); }); } diff --git a/KamiLib/Extensions/PartyListExtensions.cs b/KamiLib/Extensions/PartyListExtensions.cs index 4cb8f9b..df010db 100644 --- a/KamiLib/Extensions/PartyListExtensions.cs +++ b/KamiLib/Extensions/PartyListExtensions.cs @@ -6,33 +6,33 @@ namespace KamiLib.Extensions; public static class PartyListExtensions { - public static IEnumerable Alive(this IEnumerable list) + public static IEnumerable Alive(this IEnumerable list) { return list.Where(member => member.GameObject != null && !member.GameObject.IsDead); } - public static IEnumerable WithRole(this IEnumerable list, uint roleID) + public static IEnumerable WithRole(this IEnumerable list, uint roleID) { return list.Where(member => member.ClassJob.GameData?.Role == roleID); } - public static IEnumerable WithJob(this IEnumerable list, uint jobID) + public static IEnumerable WithJob(this IEnumerable list, uint jobID) { return list.Where(member => member.ClassJob.Id == jobID); } - public static IEnumerable WithJob(this IEnumerable list, List jobList) + public static IEnumerable WithJob(this IEnumerable list, List jobList) { return list.Where(member => jobList.Contains(member.ClassJob.Id)); } - public static IEnumerable WithStatus(this IEnumerable list, uint statusID) + public static IEnumerable WithStatus(this IEnumerable list, uint statusID) { return list.Where(member => member.HasStatus(statusID)); } - public static IEnumerable WithStatus(this IEnumerable list, List statusList) + public static IEnumerable WithStatus(this IEnumerable list, List statusList) { return list.Where(member => member.HasStatus(statusList)); } -} \ No newline at end of file +} diff --git a/KamiLib/Extensions/PartyMemberExtensions.cs b/KamiLib/Extensions/PartyMemberExtensions.cs index 5500305..ff0d9bc 100644 --- a/KamiLib/Extensions/PartyMemberExtensions.cs +++ b/KamiLib/Extensions/PartyMemberExtensions.cs @@ -6,13 +6,13 @@ namespace KamiLib.Extensions; public static class PartyMemberExtensions { - public static bool HasStatus(this PartyMember character, uint statusId) + public static bool HasStatus(this IPartyMember character, uint statusId) { return character.Statuses.Any(status => status.StatusId == statusId); } - public static bool HasStatus(this PartyMember character, List statusList) + public static bool HasStatus(this IPartyMember character, List statusList) { return character.Statuses.Any(status => statusList.Contains(status.StatusId)); } -} \ No newline at end of file +} diff --git a/KamiLib/Extensions/PlayerCharacterExtensions.cs b/KamiLib/Extensions/PlayerCharacterExtensions.cs index 6ffa3a6..cd5d2fc 100644 --- a/KamiLib/Extensions/PlayerCharacterExtensions.cs +++ b/KamiLib/Extensions/PlayerCharacterExtensions.cs @@ -8,55 +8,55 @@ namespace KamiLib.Extensions; public static class PlayerCharacterExtensions { - public static bool HasStatus(this PlayerCharacter character, uint statusId) + public static bool HasStatus(this IPlayerCharacter character, uint statusId) { return character.StatusList.Any(status => status.StatusId == statusId); } - public static bool HasStatus(this PlayerCharacter character, List statusList) + public static bool HasStatus(this IPlayerCharacter character, List statusList) { return character.StatusList.Any(status => statusList.Contains(status.StatusId)); } - public static bool HasOnlineStatus(this PlayerCharacter character, uint statusId) + public static bool HasOnlineStatus(this IPlayerCharacter character, uint statusId) { return character.OnlineStatus.Id == statusId; } - public static int StatusCount(this PlayerCharacter character, List statusList) + public static int StatusCount(this IPlayerCharacter character, List statusList) { return character.StatusList.Count(status => statusList.Contains(status.StatusId)); } - public static bool HasPet(this PlayerCharacter character) + public static bool HasPet(this IPlayerCharacter character) { - var ownedObjects = Service.ObjectTable.Where(obj => obj.OwnerId == character.ObjectId); + var ownedObjects = Service.ObjectTable.Where(obj => obj.OwnerId == character.GameObjectId); - return ownedObjects.Any(obj => obj.ObjectKind == ObjectKind.BattleNpc && (obj as BattleNpc)?.SubKind == (byte) BattleNpcSubKind.Pet); + return ownedObjects.Any(obj => obj.ObjectKind == ObjectKind.BattleNpc && (obj as IBattleNpc)?.SubKind == (byte) BattleNpcSubKind.Pet); } - public static IEnumerable Alive(this IEnumerable list) + public static IEnumerable Alive(this IEnumerable list) { return list.Where(member => member.CurrentHp > 0); } - public static IEnumerable WithJob(this IEnumerable list, uint jobID) + public static IEnumerable WithJob(this IEnumerable list, uint jobID) { return list.Where(member => member.ClassJob.Id == jobID); } - public static IEnumerable WithJob(this IEnumerable list, List jobList) + public static IEnumerable WithJob(this IEnumerable list, List jobList) { return list.Where(member => jobList.Contains(member.ClassJob.Id)); } - public static IEnumerable WithStatus(this IEnumerable list, uint statusID) + public static IEnumerable WithStatus(this IEnumerable list, uint statusID) { return list.Where(member => member.HasStatus(statusID)); } - public static IEnumerable WithStatus(this IEnumerable list, List statusList) + public static IEnumerable WithStatus(this IEnumerable list, List statusList) { return list.Where(member => member.HasStatus(statusList)); } -} \ No newline at end of file +} diff --git a/KamiLib/Hooking/Delegates.cs b/KamiLib/Hooking/Delegates.cs index 5980ed8..ae64637 100644 --- a/KamiLib/Hooking/Delegates.cs +++ b/KamiLib/Hooking/Delegates.cs @@ -1,4 +1,5 @@ -using FFXIVClientStructs.FFXIV.Component.GUI; +using FFXIVClientStructs.FFXIV.Client.UI.Agent; +using FFXIVClientStructs.FFXIV.Component.GUI; namespace KamiLib.Hooking; diff --git a/KamiLib/Hooking/Safety.cs b/KamiLib/Hooking/Safety.cs index 4ab6405..02cc54a 100644 --- a/KamiLib/Hooking/Safety.cs +++ b/KamiLib/Hooking/Safety.cs @@ -23,10 +23,10 @@ public static class Safety var callingClass = trace.GetMethod()?.DeclaringType; var callingName = trace.GetMethod()?.Name; - PluginLog.Error($"Exception Source: {callingAssembly} :: {callingClass} :: {callingName}"); + //PluginLog.Error($"Exception Source: {callingAssembly} :: {callingClass} :: {callingName}"); } - PluginLog.Error(exception, message ?? "Caught Exception Safely"); + //PluginLog.Error(exception, message ?? "Caught Exception Safely"); } } -} \ No newline at end of file +} diff --git a/KamiLib/KamiCommon.cs b/KamiLib/KamiCommon.cs index 4b11aad..1194f88 100644 --- a/KamiLib/KamiCommon.cs +++ b/KamiLib/KamiCommon.cs @@ -19,7 +19,7 @@ public static class KamiCommon private static Action _saveConfigFunction = null!; - public static void Initialize(DalamudPluginInterface pluginInterface, string pluginName, Action saveConfig) + public static void Initialize(IDalamudPluginInterface pluginInterface, string pluginName, Action saveConfig) { pluginInterface.Create(); @@ -48,4 +48,4 @@ public static class KamiCommon } public static void SaveConfiguration() => _saveConfigFunction(); -} \ No newline at end of file +} diff --git a/KamiLib/KamiLib.csproj b/KamiLib/KamiLib.csproj index fae504c..40dad1c 100644 --- a/KamiLib/KamiLib.csproj +++ b/KamiLib/KamiLib.csproj @@ -1,7 +1,7 @@ - net7.0-windows + net8.0-windows x64 enable preview diff --git a/KamiLib/Localization/LocalizationManager.cs b/KamiLib/Localization/LocalizationManager.cs index c5b6457..b7e46b5 100644 --- a/KamiLib/Localization/LocalizationManager.cs +++ b/KamiLib/Localization/LocalizationManager.cs @@ -30,12 +30,12 @@ internal class LocalizationManager : IDisposable { try { - PluginLog.Information($"Loading Localization for {languageCode}"); + //PluginLog.Information($"Loading Localization for {languageCode}"); Strings.Culture = new CultureInfo(languageCode); } catch (Exception ex) { - PluginLog.Error(ex, "Unable to Load Localization"); + //PluginLog.Error(ex, "Unable to Load Localization"); } } -} \ No newline at end of file +} diff --git a/KamiLib/Misc/DutyLists.cs b/KamiLib/Misc/DutyLists.cs index 156c5f5..03297d2 100644 --- a/KamiLib/Misc/DutyLists.cs +++ b/KamiLib/Misc/DutyLists.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; using Dalamud; +using Dalamud.Game; using KamiLib.Caching; using Lumina.Excel.GeneratedSheets; @@ -73,4 +74,4 @@ public class DutyLists public bool IsType(uint dutyId, DutyType type) => GetDutyType(dutyId) == type; public bool IsType(uint dutyId, IEnumerable types) => types.Any(type => IsType(dutyId, type)); -} \ No newline at end of file +} diff --git a/KamiLib/Service.cs b/KamiLib/Service.cs index 21403d4..cf4eefd 100644 --- a/KamiLib/Service.cs +++ b/KamiLib/Service.cs @@ -6,7 +6,7 @@ namespace KamiLib; internal class Service { - [PluginService] public static DalamudPluginInterface PluginInterface { get; private set; } = null!; + [PluginService] public static IDalamudPluginInterface PluginInterface { get; private set; } = null!; [PluginService] public static ICommandManager Commands { get; private set; } = null!; [PluginService] public static IClientState ClientState { get; private set; } = null!; [PluginService] public static IChatGui Chat { get; private set; } = null!; diff --git a/KamiLib/Teleporter/TeleportManager.cs b/KamiLib/Teleporter/TeleportManager.cs index bf983a1..958d41a 100644 --- a/KamiLib/Teleporter/TeleportManager.cs +++ b/KamiLib/Teleporter/TeleportManager.cs @@ -88,7 +88,7 @@ public class TeleportManager : IDisposable } else { - PluginLog.Error("User attempted to teleport to an aetheryte that is not unlocked"); + //PluginLog.Error("User attempted to teleport to an aetheryte that is not unlocked"); UserError(Strings.Teleport_NotUnlocked); } } @@ -98,7 +98,7 @@ public class TeleportManager : IDisposable return ChatLinkPayloads.First(payload => Equals(payload.Location, targetLocation)).Payload; } - private void Teleport(AetheryteEntry aetheryte) + private void Teleport(IAetheryteEntry aetheryte) { try { @@ -116,7 +116,7 @@ public class TeleportManager : IDisposable } catch (IpcNotReadyError) { - PluginLog.Error("Teleport IPC not found"); + //PluginLog.Error("Teleport IPC not found"); UserError(Strings.Teleport_InstallTeleporter); } } @@ -127,7 +127,7 @@ public class TeleportManager : IDisposable Service.Toast.ShowError(error); } - private string GetAetheryteName(AetheryteEntry aetheryte) + private string GetAetheryteName(IAetheryteEntry aetheryte) { var gameData = aetheryte.AetheryteData.GameData; var placeName = gameData?.PlaceName.Value; @@ -135,7 +135,7 @@ public class TeleportManager : IDisposable return placeName == null ? "[Name Lookup Failed]" : placeName.Name; } - private bool AetheryteUnlocked(ExcelRow aetheryte, out AetheryteEntry? entry) + private bool AetheryteUnlocked(ExcelRow aetheryte, out IAetheryteEntry? entry) { if (Service.AetheryteList.Any(entry => entry.AetheryteId == aetheryte.RowId)) {