Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Brio/Capabilities/Debug/DebugCapability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ public unsafe class DebugCapability : Capability

public bool IsPosing => _ktisisIPC.IsPosing;

public DebugCapability(IClientState clientState, Entity parent, GPoseService gPoseService, KtisisService ktisisIPC) : base(parent)
public DebugCapability(IClientState clientState, IObjectTable objectTable, Entity parent, GPoseService gPoseService, KtisisService ktisisIPC) : base(parent)
{
_gPoseService = gPoseService;
_ktisisIPC = ktisisIPC;
Widget = new DebugWidget(this, clientState);
Widget = new DebugWidget(this, clientState, objectTable);
}

public void EnterGPose()
Expand Down
2 changes: 1 addition & 1 deletion Brio/Core/MultiValueDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Brio.Core;

public class MultiValueDictionary<TKey, TValue> where TKey : notnull
public class MultiValueDictionary<TKey, TValue> where TKey : notnull
{
private readonly Dictionary<TKey, List<TValue>> _underlyingDictionary = [];

Expand Down
2 changes: 1 addition & 1 deletion Brio/Game/Actor/ActorSpawnService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public bool CreateCharacter([MaybeNullWhen(false)] out ICharacter outCharacter,
{
outCharacter = null;

var localPlayer = _clientState.LocalPlayer;
var localPlayer = _objectTable.LocalPlayer;
if(localPlayer != null)
{
if(CloneCharacter(localPlayer, out outCharacter, flags, disableSpawnCompanion: disableSpawnCompanion))
Expand Down
10 changes: 5 additions & 5 deletions Brio/Game/Core/DalamudService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private void FrameworkOnUpdate(IFramework framework)
IsInCutscene = false;
}

var localPlayer = _clientState.LocalPlayer;
var localPlayer = _objectTable.LocalPlayer;
if(localPlayer != null)
{
_classJobId = localPlayer.ClassJob.RowId;
Expand All @@ -75,12 +75,12 @@ public async Task<uint> GetHomeWorldIdAsync()

public uint GetHomeWorldId()
{
return _clientState.LocalPlayer?.HomeWorld.RowId ?? 0;
return _objectTable.LocalPlayer?.HomeWorld.RowId ?? 0;
}

public bool GetIsPlayerPresent()
{
return _clientState.LocalPlayer != null && _clientState.LocalPlayer.IsValid();
return _objectTable.LocalPlayer != null && _objectTable.LocalPlayer.IsValid();
}

public async Task<bool> GetIsPlayerPresentAsync()
Expand All @@ -90,7 +90,7 @@ public async Task<bool> GetIsPlayerPresentAsync()

public string GetPlayerName()
{
return _clientState.LocalPlayer?.Name.ToString() ?? "--";
return _objectTable.LocalPlayer?.Name.ToString() ?? "--";
}

public bool IsObjectPresent(IGameObject? obj)
Expand All @@ -114,7 +114,7 @@ public async Task<IPlayerCharacter> GetPlayerCharacterAsync()
}
public IPlayerCharacter GetPlayerCharacter()
{
return _clientState.LocalPlayer!;
return _objectTable.LocalPlayer!;
}

public ICharacter? GetGposeCharacterFromObjectTableByName(string name, bool onlyGposeCharacters = false)
Expand Down
6 changes: 3 additions & 3 deletions Brio/UI/Widgets/Debug/DebugWidget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Brio.UI.Widgets.Debug;

public class DebugWidget(DebugCapability capability, IClientState _clientState) : Widget<DebugCapability>(capability)
public class DebugWidget(DebugCapability capability, IClientState _clientState, IObjectTable _objectTable) : Widget<DebugCapability>(capability)
{
public override string HeaderName => "Debug";

Expand Down Expand Up @@ -86,8 +86,8 @@ private void DrawMisc()

ImGui.Text($"MapId - {_clientState.MapId}");
ImGui.Text($"TerritoryType - {_clientState.TerritoryType}");
ImGui.Text($"CurrentWorld - {_clientState.LocalPlayer?.CurrentWorld.Value.Name}");
ImGui.Text($"HomeWorld - {_clientState.LocalPlayer?.HomeWorld.Value.Name}");
ImGui.Text($"CurrentWorld - {_objectTable.LocalPlayer?.CurrentWorld.Value.Name}");
ImGui.Text($"HomeWorld - {_objectTable.LocalPlayer?.HomeWorld.Value.Name}");

ImGui.Text(io.Framerate.ToString("F2") + " FPS");
}
Expand Down
Loading