diff --git a/.gitattributes b/.gitattributes index fcadb2c..d0c0c4c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ * text eol=lf +*.png binary diff --git a/ExpandedSearchInfo/ExpandedSearchInfo.csproj b/ExpandedSearchInfo/ExpandedSearchInfo.csproj index 23362d5..6d04650 100755 --- a/ExpandedSearchInfo/ExpandedSearchInfo.csproj +++ b/ExpandedSearchInfo/ExpandedSearchInfo.csproj @@ -2,7 +2,7 @@ net5-windows - 1.3.5 + 1.3.6 latest enable true diff --git a/ExpandedSearchInfo/GameFunctions.cs b/ExpandedSearchInfo/GameFunctions.cs index d1c8cc7..0a025c4 100644 --- a/ExpandedSearchInfo/GameFunctions.cs +++ b/ExpandedSearchInfo/GameFunctions.cs @@ -34,7 +34,7 @@ namespace ExpandedSearchInfo { // Updated: 4.5 var actorId = *(uint*) (data + 48); - var searchInfo = this.Plugin.SeStringManager.ReadRawSeString(searchInfoPtr); + var searchInfo = Util.ReadRawSeString(searchInfoPtr); this.ReceiveSearchInfo?.Invoke(actorId, searchInfo); } catch (Exception ex) { diff --git a/ExpandedSearchInfo/Plugin.cs b/ExpandedSearchInfo/Plugin.cs index df9234a..d31d4ab 100644 --- a/ExpandedSearchInfo/Plugin.cs +++ b/ExpandedSearchInfo/Plugin.cs @@ -2,7 +2,6 @@ using Dalamud.Game.ClientState.Objects; using Dalamud.Game.Command; using Dalamud.Game.Gui; -using Dalamud.Game.Text.SeStringHandling; using Dalamud.IoC; using Dalamud.Plugin; @@ -23,9 +22,6 @@ namespace ExpandedSearchInfo { [PluginService] internal ObjectTable ObjectTable { get; init; } = null!; - [PluginService] - internal SeStringManager SeStringManager { get; init; } = null!; - [PluginService] internal SigScanner SigScanner { get; init; } = null!; diff --git a/ExpandedSearchInfo/PluginUi.cs b/ExpandedSearchInfo/PluginUi.cs index 2f200fe..d8bec0b 100644 --- a/ExpandedSearchInfo/PluginUi.cs +++ b/ExpandedSearchInfo/PluginUi.cs @@ -137,7 +137,7 @@ namespace ExpandedSearchInfo { } var addon = (AtkUnitBase*) addonPtr; - if (addon->IsVisible) { + if (!addon->IsVisible) { return; } @@ -166,6 +166,7 @@ namespace ExpandedSearchInfo { ImGui.SetNextWindowSize(new Vector2(-1, -1)); if (!ImGui.Begin(this.Plugin.Name, ImGuiWindowFlags.NoTitleBar)) { + ImGui.End(); return; } diff --git a/ExpandedSearchInfo/Util.cs b/ExpandedSearchInfo/Util.cs index de77ca8..cf0085d 100644 --- a/ExpandedSearchInfo/Util.cs +++ b/ExpandedSearchInfo/Util.cs @@ -8,7 +8,7 @@ namespace ExpandedSearchInfo { internal static class Util { private static readonly Regex BbCodeTag = new(@"\[/?\w+(?:=.+?)?\]", RegexOptions.Compiled | RegexOptions.IgnoreCase); - internal static unsafe SeString ReadRawSeString(this SeStringManager manager, IntPtr data) { + internal static unsafe SeString ReadRawSeString(IntPtr data) { var bytes = new List(); var ptr = (byte*) data; @@ -17,7 +17,7 @@ namespace ExpandedSearchInfo { ptr += 1; } - return manager.Parse(bytes.ToArray()); + return SeString.Parse(bytes.ToArray()); } internal static string StripBbCode(this string input) => BbCodeTag.Replace(input, ""); diff --git a/icon.png b/icon.png old mode 100644 new mode 100755 index 0a8e7c2..8cd5c5c Binary files a/icon.png and b/icon.png differ