mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 04:13:40 +01:00
feat: new actor table shenanigans
This commit is contained in:
parent
03e4a4d25c
commit
f80a4e7432
5 changed files with 26 additions and 52 deletions
|
|
@ -69,12 +69,11 @@ namespace Dalamud.Interface
|
|||
var stateString = string.Empty;
|
||||
// LocalPlayer is null in a number of situations (at least with the current visible-actors list)
|
||||
// which would crash here.
|
||||
if (this.dalamud.ClientState.Actors.Length == 0 || this.dalamud.ClientState.LocalPlayer == null)
|
||||
{
|
||||
if (this.dalamud.ClientState.Actors.Length == 0) {
|
||||
ImGui.TextUnformatted("Data not ready.");
|
||||
}
|
||||
else
|
||||
{
|
||||
} else if (this.dalamud.ClientState.LocalPlayer == null) {
|
||||
ImGui.TextUnformatted("LocalPlayer null.");
|
||||
} else {
|
||||
stateString += $"FrameworkBase: {this.dalamud.Framework.Address.BaseAddress.ToInt64():X}\n";
|
||||
|
||||
stateString += $"ActorTableLen: {this.dalamud.ClientState.Actors.Length}\n";
|
||||
|
|
@ -88,6 +87,9 @@ namespace Dalamud.Interface
|
|||
for (var i = 0; i < this.dalamud.ClientState.Actors.Length; i++) {
|
||||
var actor = this.dalamud.ClientState.Actors[i];
|
||||
|
||||
if (actor == null)
|
||||
continue;
|
||||
|
||||
stateString +=
|
||||
$"{actor.Address.ToInt64():X}:{actor.ActorId:X}[{i}] - {actor.ObjectKind} - {actor.Name} - {actor.Position.X} {actor.Position.Y} {actor.Position.Z}\n";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue