Add IPlayerState service

This commit is contained in:
Haselnussbomber 2025-10-05 13:30:34 +02:00
parent 7bf79bdea6
commit 4422622e1e
No known key found for this signature in database
GPG key ID: BB905BB49E7295D1
25 changed files with 1043 additions and 112 deletions

View file

@ -1,4 +1,4 @@
using Dalamud.Bindings.ImGui;
using Dalamud.Bindings.ImGui;
using Dalamud.Game.ClientState;
using Dalamud.Game.ClientState.Objects;
using Dalamud.Interface.Utility;
@ -33,7 +33,7 @@ internal class TargetWidget : IDataWindowWidget
{
ImGui.Checkbox("Resolve GameData"u8, ref this.resolveGameData);
var clientState = Service<ClientState>.Get();
var objectTable = Service<ObjectTable>.Get();
var targetMgr = Service<TargetManager>.Get();
if (targetMgr.Target != null)
@ -80,7 +80,7 @@ internal class TargetWidget : IDataWindowWidget
if (ImGui.Button("Clear FT"u8))
targetMgr.FocusTarget = null;
var localPlayer = clientState.LocalPlayer;
var localPlayer = objectTable.LocalPlayer;
if (localPlayer != null)
{