mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-17 21:37:43 +01:00
Add IPlayerState service
This commit is contained in:
parent
7bf79bdea6
commit
4422622e1e
25 changed files with 1043 additions and 112 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue