1
0
Fork 0
forked from aly/qstbak

muffin v7.5.5

This commit is contained in:
alydev 2026-08-17 20:25:32 +10:00
parent a8f2c1df37
commit 6266f9e6b7
110 changed files with 14907 additions and 6073 deletions

View file

@ -1,6 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq;
using System.Numerics;
using Dalamud.Bindings.ImGui;
using Dalamud.Game.ClientState.Conditions;
@ -154,30 +153,31 @@ internal sealed class DebugOverlay : Window
{
return;
}
foreach (IGameObject item3 in _objectTable.Skip(1))
for (int i = 1; i < _objectTable.Length; i++)
{
if (item3 is IBattleNpc && _gameGui.WorldToScreen(item3.Position, out var screenPos))
IGameObject gameObject = _objectTable[i];
if (gameObject != null && gameObject is IBattleNpc battleNpc && _gameGui.WorldToScreen(battleNpc.Position, out var screenPos))
{
(int Priority, string Reason) killPriority = _combatController.GetKillPriority(item3);
(int Priority, string Reason) killPriority = _combatController.GetKillPriority(battleNpc);
int item = killPriority.Priority;
string item2 = killPriority.Reason;
ImDrawListPtr windowDrawList = ImGui.GetWindowDrawList();
Vector2 pos = screenPos + new Vector2(10f, -8f);
int col = ((item > 0) ? (-16711936) : (-1));
ImU8String text = new ImU8String(12, 7);
text.AppendFormatted(item3.Name);
text.AppendFormatted(battleNpc.Name);
text.AppendLiteral("/");
text.AppendFormatted(item3.GameObjectId, "X");
text.AppendFormatted(battleNpc.GameObjectId, "X");
text.AppendLiteral(", ");
text.AppendFormatted(item3.BaseId);
text.AppendFormatted(battleNpc.BaseId);
text.AppendLiteral(", ");
text.AppendFormatted(item);
text.AppendLiteral(" - ");
text.AppendFormatted(item2);
text.AppendLiteral(", ");
text.AppendFormatted(Vector3.Distance(item3.Position, _objectTable.LocalPlayer.Position), "N2");
text.AppendFormatted(Vector3.Distance(battleNpc.Position, _objectTable.LocalPlayer.Position), "N2");
text.AppendLiteral(", ");
text.AppendFormatted(item3.IsTargetable);
text.AppendFormatted(battleNpc.IsTargetable);
windowDrawList.AddText(pos, (uint)col, text);
}
}