[v9] Update ClientStructs and fix build (#1398)

* Update ClientStructs

* Use IFramework in AddonLifecycle

* Fix for ClientStructs breaking changes
This commit is contained in:
Haselnussbomber 2023-09-18 09:18:01 +02:00 committed by GitHub
parent 9f231da4ca
commit af39add38e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View file

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@ -97,7 +97,7 @@ internal unsafe class AddonLifecycle : IDisposable, IServiceType
} }
// Used to prevent concurrency issues if plugins try to register during iteration of listeners. // Used to prevent concurrency issues if plugins try to register during iteration of listeners.
private void OnFrameworkUpdate(Framework unused) private void OnFrameworkUpdate(IFramework unused)
{ {
if (this.newEventListeners.Any()) if (this.newEventListeners.Any())
{ {

View file

@ -1,5 +1,6 @@
using System; using System;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Dalamud.Game; using Dalamud.Game;
@ -416,7 +417,7 @@ internal unsafe class UiDebug
$"MultiplyRGB: {node->MultiplyRed} {node->MultiplyGreen} {node->MultiplyBlue}"); $"MultiplyRGB: {node->MultiplyRed} {node->MultiplyGreen} {node->MultiplyBlue}");
} }
private bool DrawUnitListHeader(int index, uint count, ulong ptr, bool highlight) private bool DrawUnitListHeader(int index, ushort count, ulong ptr, bool highlight)
{ {
ImGui.PushStyleColor(ImGuiCol.Text, highlight ? 0xFFAAAA00 : 0xFFFFFFFF); ImGui.PushStyleColor(ImGuiCol.Text, highlight ? 0xFFAAAA00 : 0xFFFFFFFF);
if (!string.IsNullOrEmpty(this.searchInput) && !this.doingSearch) if (!string.IsNullOrEmpty(this.searchInput) && !this.doingSearch)
@ -455,8 +456,6 @@ internal unsafe class UiDebug
this.selectedInList[i] = false; this.selectedInList[i] = false;
var unitManager = &unitManagers[i]; var unitManager = &unitManagers[i];
var unitBaseArray = &unitManager->AtkUnitEntries;
var headerOpen = true; var headerOpen = true;
if (!searching) if (!searching)
@ -468,7 +467,7 @@ internal unsafe class UiDebug
for (var j = 0; j < unitManager->Count && headerOpen; j++) for (var j = 0; j < unitManager->Count && headerOpen; j++)
{ {
var unitBase = unitBaseArray[j]; var unitBase = *(AtkUnitBase**)Unsafe.AsPointer(ref unitManager->EntriesSpan[j]);
if (this.selectedUnitBase != null && unitBase == this.selectedUnitBase) if (this.selectedUnitBase != null && unitBase == this.selectedUnitBase)
{ {
this.selectedInList[i] = true; this.selectedInList[i] = true;
@ -513,7 +512,8 @@ internal unsafe class UiDebug
{ {
for (var j = 0; j < unitManager->Count; j++) for (var j = 0; j < unitManager->Count; j++)
{ {
if (this.selectedUnitBase == null || unitBaseArray[j] != this.selectedUnitBase) continue; var unitBase = *(AtkUnitBase**)Unsafe.AsPointer(ref unitManager->EntriesSpan[j]);
if (this.selectedUnitBase == null || unitBase != this.selectedUnitBase) continue;
this.selectedInList[i] = true; this.selectedInList[i] = true;
foundSelected = true; foundSelected = true;
} }

@ -1 +1 @@
Subproject commit 06e3ca2336031ba86ef95d022a2af722e5d00a7e Subproject commit fd5ba8a27ec911a69eeb93ceb0202091279dfceb