From 427a7632eea64f46ed0eb7badd0b47f4949befb1 Mon Sep 17 00:00:00 2001 From: goat Date: Wed, 22 Apr 2020 21:28:57 +0200 Subject: [PATCH] feat: add party list debug --- Dalamud/Interface/DalamudDataWindow.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Dalamud/Interface/DalamudDataWindow.cs b/Dalamud/Interface/DalamudDataWindow.cs index 078713ac6..cc30dc017 100644 --- a/Dalamud/Interface/DalamudDataWindow.cs +++ b/Dalamud/Interface/DalamudDataWindow.cs @@ -1,3 +1,4 @@ +using System.Linq; using System.Numerics; using Dalamud.Game.Chat; using Dalamud.Game.ClientState.Actors.Types; @@ -46,8 +47,8 @@ namespace Dalamud.Interface ImGui.SameLine(); var copy = ImGui.Button("Copy all"); ImGui.SameLine(); - ImGui.Combo("Data kind", ref this.currentKind, new[] {"ServerOpCode", "ContentFinderCondition", "State", "Font Test"}, - 4); + ImGui.Combo("Data kind", ref this.currentKind, new[] {"ServerOpCode", "ContentFinderCondition", "Actor Table", "Font Test", "Party List"}, + 5); ImGui.BeginChild("scrolling", new Vector2(0, 0), false, ImGuiWindowFlags.HorizontalScrollbar); @@ -113,6 +114,20 @@ namespace Dalamud.Interface } ImGui.TextUnformatted(specialChars); + break; + case 4: + var partyString = string.Empty; + + if (this.dalamud.ClientState.PartyList.Length == 0) { + ImGui.TextUnformatted("Data not ready."); + } else { + + partyString += $"{this.dalamud.ClientState.PartyList.Count} Members"; + partyString = this.dalamud.ClientState.PartyList.Aggregate(partyString, (current, member) => current + $"{member.CharacterName} - {member.ObjectKind} - {member.Actor.ActorId}"); + + ImGui.TextUnformatted(partyString); + } + break; } else