mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-28 11:29:18 +01:00
fix: use for loop when showing party members
TODO: fix IEnumerable support
This commit is contained in:
parent
19b09a9077
commit
91d4f90de6
2 changed files with 15 additions and 9 deletions
|
|
@ -122,8 +122,18 @@ namespace Dalamud.Interface
|
|||
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}");
|
||||
partyString += $"{this.dalamud.ClientState.PartyList.Count} Members\n";
|
||||
for (var i = 0; i < this.dalamud.ClientState.PartyList.Count; i++) {
|
||||
var member = this.dalamud.ClientState.PartyList[i];
|
||||
if (member == null) {
|
||||
partyString +=
|
||||
$"[{i}] was null\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
partyString +=
|
||||
$"[{i}] {member.CharacterName} - {member.ObjectKind} - {member.Actor.ActorId}\n";
|
||||
}
|
||||
|
||||
ImGui.TextUnformatted(partyString);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue