refactor: update for new API changes
This commit is contained in:
parent
74b0fc3772
commit
f1be5a37ba
|
@ -1 +1,2 @@
|
|||
* text eol=lf
|
||||
*.png binary
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5-windows</TargetFramework>
|
||||
<Version>1.3.5</Version>
|
||||
<Version>1.3.6</Version>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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!;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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<byte>();
|
||||
|
||||
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, "");
|
||||
|
|
Loading…
Reference in New Issue