refactor: update for new API changes
This commit is contained in:
parent
74b0fc3772
commit
f1be5a37ba
|
@ -1 +1,2 @@
|
||||||
* text eol=lf
|
* text eol=lf
|
||||||
|
*.png binary
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net5-windows</TargetFramework>
|
<TargetFramework>net5-windows</TargetFramework>
|
||||||
<Version>1.3.5</Version>
|
<Version>1.3.6</Version>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace ExpandedSearchInfo {
|
||||||
// Updated: 4.5
|
// Updated: 4.5
|
||||||
var actorId = *(uint*) (data + 48);
|
var actorId = *(uint*) (data + 48);
|
||||||
|
|
||||||
var searchInfo = this.Plugin.SeStringManager.ReadRawSeString(searchInfoPtr);
|
var searchInfo = Util.ReadRawSeString(searchInfoPtr);
|
||||||
|
|
||||||
this.ReceiveSearchInfo?.Invoke(actorId, searchInfo);
|
this.ReceiveSearchInfo?.Invoke(actorId, searchInfo);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
using Dalamud.Game.ClientState.Objects;
|
using Dalamud.Game.ClientState.Objects;
|
||||||
using Dalamud.Game.Command;
|
using Dalamud.Game.Command;
|
||||||
using Dalamud.Game.Gui;
|
using Dalamud.Game.Gui;
|
||||||
using Dalamud.Game.Text.SeStringHandling;
|
|
||||||
using Dalamud.IoC;
|
using Dalamud.IoC;
|
||||||
using Dalamud.Plugin;
|
using Dalamud.Plugin;
|
||||||
|
|
||||||
|
@ -23,9 +22,6 @@ namespace ExpandedSearchInfo {
|
||||||
[PluginService]
|
[PluginService]
|
||||||
internal ObjectTable ObjectTable { get; init; } = null!;
|
internal ObjectTable ObjectTable { get; init; } = null!;
|
||||||
|
|
||||||
[PluginService]
|
|
||||||
internal SeStringManager SeStringManager { get; init; } = null!;
|
|
||||||
|
|
||||||
[PluginService]
|
[PluginService]
|
||||||
internal SigScanner SigScanner { get; init; } = null!;
|
internal SigScanner SigScanner { get; init; } = null!;
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ namespace ExpandedSearchInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
var addon = (AtkUnitBase*) addonPtr;
|
var addon = (AtkUnitBase*) addonPtr;
|
||||||
if (addon->IsVisible) {
|
if (!addon->IsVisible) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,6 +166,7 @@ namespace ExpandedSearchInfo {
|
||||||
ImGui.SetNextWindowSize(new Vector2(-1, -1));
|
ImGui.SetNextWindowSize(new Vector2(-1, -1));
|
||||||
|
|
||||||
if (!ImGui.Begin(this.Plugin.Name, ImGuiWindowFlags.NoTitleBar)) {
|
if (!ImGui.Begin(this.Plugin.Name, ImGuiWindowFlags.NoTitleBar)) {
|
||||||
|
ImGui.End();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace ExpandedSearchInfo {
|
||||||
internal static class Util {
|
internal static class Util {
|
||||||
private static readonly Regex BbCodeTag = new(@"\[/?\w+(?:=.+?)?\]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
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<byte>();
|
var bytes = new List<byte>();
|
||||||
|
|
||||||
var ptr = (byte*) data;
|
var ptr = (byte*) data;
|
||||||
|
@ -17,7 +17,7 @@ namespace ExpandedSearchInfo {
|
||||||
ptr += 1;
|
ptr += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return manager.Parse(bytes.ToArray());
|
return SeString.Parse(bytes.ToArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string StripBbCode(this string input) => BbCodeTag.Replace(input, "");
|
internal static string StripBbCode(this string input) => BbCodeTag.Replace(input, "");
|
||||||
|
|
Loading…
Reference in New Issue