muffin v7.38.8

This commit is contained in:
alydev 2025-11-30 10:36:46 +10:00
parent 5e2d8f648b
commit 3e10cbbbf2
51 changed files with 2585 additions and 1972 deletions

View file

@ -75,7 +75,7 @@ internal sealed class DebugOverlay : Window
return;
}
IClientState clientState = _clientState;
if (clientState != null && clientState.IsLoggedIn && clientState.LocalPlayer != null && !clientState.IsPvPExcludingDen && _questController.IsQuestWindowOpen)
if (clientState != null && clientState.IsLoggedIn && !clientState.IsPvPExcludingDen && _objectTable.LocalPlayer != null && _questController.IsQuestWindowOpen)
{
DrawCurrentQuest();
DrawHighlightedQuest();
@ -103,7 +103,7 @@ internal sealed class DebugOverlay : Window
QuestStep questStep = questSequence.FindStep(i);
if (questStep != null && TryGetPosition(questStep, out var position))
{
DrawStep(i.ToString(CultureInfo.InvariantCulture), questStep, position.Value, (Vector3.Distance(_clientState.LocalPlayer.Position, position.Value) < questStep.CalculateActualStopDistance()) ? 4278255360u : 4278190335u);
DrawStep(i.ToString(CultureInfo.InvariantCulture), questStep, position.Value, (Vector3.Distance(_objectTable.LocalPlayer.Position, position.Value) < questStep.CalculateActualStopDistance()) ? 4278255360u : 4278190335u);
}
}
}
@ -141,7 +141,7 @@ internal sealed class DebugOverlay : Window
text.AppendLiteral("\n");
text.AppendFormatted(position.ToString("G", CultureInfo.InvariantCulture));
text.AppendLiteral(" [");
text.AppendFormatted((position - _clientState.LocalPlayer.Position).Length(), "N2");
text.AppendFormatted((position - _objectTable.LocalPlayer.Position).Length(), "N2");
text.AppendLiteral("]\n");
text.AppendFormatted(step.Comment);
windowDrawList.AddText(pos, color, text);
@ -175,7 +175,7 @@ internal sealed class DebugOverlay : Window
text.AppendLiteral(" - ");
text.AppendFormatted(item2);
text.AppendLiteral(", ");
text.AppendFormatted(Vector3.Distance(item3.Position, _clientState.LocalPlayer.Position), "N2");
text.AppendFormatted(Vector3.Distance(item3.Position, _objectTable.LocalPlayer.Position), "N2");
text.AppendLiteral(", ");
text.AppendFormatted(item3.IsTargetable);
windowDrawList.AddText(pos, (uint)col, text);

View file

@ -22,6 +22,8 @@ internal sealed class QuestWindow : LWindow, IPersistableWindowConfig
private readonly QuestController _questController;
private readonly IObjectTable _objectTable;
private readonly IClientState _clientState;
private readonly Configuration _configuration;
@ -50,12 +52,13 @@ internal sealed class QuestWindow : LWindow, IPersistableWindowConfig
public bool IsMinimized { get; set; }
public QuestWindow(IDalamudPluginInterface pluginInterface, QuestController questController, IClientState clientState, Configuration configuration, TerritoryData territoryData, ActiveQuestComponent activeQuestComponent, ARealmRebornComponent aRealmRebornComponent, EventInfoComponent eventInfoComponent, CreationUtilsComponent creationUtilsComponent, QuickAccessButtonsComponent quickAccessButtonsComponent, RemainingTasksComponent remainingTasksComponent, IFramework framework, InteractionUiController interactionUiController, ConfigWindow configWindow)
public QuestWindow(IDalamudPluginInterface pluginInterface, QuestController questController, IObjectTable objectTable, IClientState clientState, Configuration configuration, TerritoryData territoryData, ActiveQuestComponent activeQuestComponent, ARealmRebornComponent aRealmRebornComponent, EventInfoComponent eventInfoComponent, CreationUtilsComponent creationUtilsComponent, QuickAccessButtonsComponent quickAccessButtonsComponent, RemainingTasksComponent remainingTasksComponent, IFramework framework, InteractionUiController interactionUiController, ConfigWindow configWindow)
: base("Questionable v" + PluginVersion.ToString(3) + "###Questionable", ImGuiWindowFlags.AlwaysAutoResize)
{
QuestWindow questWindow = this;
_pluginInterface = pluginInterface;
_questController = questController;
_objectTable = objectTable;
_clientState = clientState;
_configuration = configuration;
_territoryData = territoryData;
@ -134,7 +137,7 @@ internal sealed class QuestWindow : LWindow, IPersistableWindowConfig
{
return false;
}
if (!_clientState.IsLoggedIn || _clientState.LocalPlayer == null || _clientState.IsPvPExcludingDen)
if (!_clientState.IsLoggedIn || _objectTable.LocalPlayer == null || _clientState.IsPvPExcludingDen)
{
return false;
}