forked from Caraxi/SimpleTweaksPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPartyDebugging.cs
More file actions
51 lines (40 loc) · 1.92 KB
/
PartyDebugging.cs
File metadata and controls
51 lines (40 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System.Collections.Generic;
using FFXIVClientStructs.FFXIV.Client.Game.Group;
using FFXIVClientStructs.FFXIV.Client.Game.Object;
using FFXIVClientStructs.Interop;
using ImGuiNET;
namespace SimpleTweaksPlugin.Debugging;
public unsafe class PartyDebugging : DebugHelper {
public override string Name => "Party Debugging";
public override void Draw() {
var groupManager = GroupManager.Instance();
DebugManager.ClickToCopyText($"{(ulong)groupManager:X}");
ImGui.SameLine();
DebugManager.PrintOutObject(*groupManager, (ulong)groupManager, new List<string>());
if (groupManager->MainGroup.MemberCount < 1) {
ImGui.Text("Not in a party");
} else {
ImGui.Text($"Party Member Count: {groupManager->MainGroup.MemberCount}");
for (var i = 0; i < 8 && i < groupManager->MainGroup.PartyMembers.Length && i < groupManager->MainGroup.MemberCount; i++) {
var partyMember = groupManager->MainGroup.PartyMembers.GetPointer(i);
if (partyMember->EntityId == 0xE0000000) continue;
var name = partyMember->NameString;
DebugManager.ClickToCopy(partyMember);
ImGui.SameLine();
ImGui.Text($"{partyMember->NameString}");
ImGui.SameLine();
ImGui.Text($"Lv{partyMember->Level}");
ImGui.SameLine();
DebugManager.ClickToCopyText($"{partyMember->EntityId:X}");
if (partyMember->EntityId != 0) {
var chara = GameObjectManager.Instance()->Objects.GetObjectByEntityId(partyMember->EntityId);
if (chara != null) {
ImGui.SameLine();
DebugManager.PrintOutObject(chara);
}
}
ImGui.Spacing();
}
}
}
}