forked from aly/qstbak
muffin v7.5.12
This commit is contained in:
parent
3102923ce2
commit
911ed68baa
65 changed files with 2356 additions and 1539 deletions
|
|
@ -125,6 +125,10 @@ internal sealed class AttunementJournalComponent
|
|||
|
||||
private readonly QuestData _questData;
|
||||
|
||||
private readonly QuestRegistry _questRegistry;
|
||||
|
||||
private readonly QuestJournalUtils _questJournalUtils;
|
||||
|
||||
private readonly IDataManager _dataManager;
|
||||
|
||||
private readonly IDalamudPluginInterface _pluginInterface;
|
||||
|
|
@ -219,11 +223,7 @@ internal sealed class AttunementJournalComponent
|
|||
|
||||
private static readonly int CountPadWidth = 9999.ToString(CultureInfo.CurrentCulture).Length;
|
||||
|
||||
public Action<string>? SelectTabAction { get; set; }
|
||||
|
||||
public QuestChainComponent? QuestChainComponent { get; set; }
|
||||
|
||||
public AttunementJournalComponent(AetheryteData aetheryteData, AetherCurrentData aetherCurrentData, AetheryteFunctions aetheryteFunctions, GameFunctions gameFunctions, TerritoryData territoryData, NavRouter navRouter, PlayerNavStateBuilder playerNavStateBuilder, RouteInstructionBuilder instructionBuilder, SmartNavTaskMapper taskMapper, MovementController movementController, AttunementController attunementController, QuestController questController, FateController fateController, SeasonalDutyController seasonalDutyController, CustomDeliveryController customDeliveryController, UiUtils uiUtils, QuestTooltipComponent questTooltipComponent, QuestData questData, IClientState clientState, IObjectTable objectTable, IDataManager dataManager, IDalamudPluginInterface pluginInterface, ILogger<AttunementJournalComponent> logger)
|
||||
public AttunementJournalComponent(AetheryteData aetheryteData, AetherCurrentData aetherCurrentData, AetheryteFunctions aetheryteFunctions, GameFunctions gameFunctions, TerritoryData territoryData, NavRouter navRouter, PlayerNavStateBuilder playerNavStateBuilder, RouteInstructionBuilder instructionBuilder, SmartNavTaskMapper taskMapper, MovementController movementController, AttunementController attunementController, QuestController questController, FateController fateController, SeasonalDutyController seasonalDutyController, CustomDeliveryController customDeliveryController, UiUtils uiUtils, QuestTooltipComponent questTooltipComponent, QuestData questData, QuestRegistry questRegistry, QuestJournalUtils questJournalUtils, IClientState clientState, IObjectTable objectTable, IDataManager dataManager, IDalamudPluginInterface pluginInterface, ILogger<AttunementJournalComponent> logger)
|
||||
{
|
||||
_aetheryteData = aetheryteData;
|
||||
_aetherCurrentData = aetherCurrentData;
|
||||
|
|
@ -243,6 +243,8 @@ internal sealed class AttunementJournalComponent
|
|||
_uiUtils = uiUtils;
|
||||
_questTooltipComponent = questTooltipComponent;
|
||||
_questData = questData;
|
||||
_questRegistry = questRegistry;
|
||||
_questJournalUtils = questJournalUtils;
|
||||
_clientState = clientState;
|
||||
_objectTable = objectTable;
|
||||
_dataManager = dataManager;
|
||||
|
|
@ -727,27 +729,14 @@ internal sealed class AttunementJournalComponent
|
|||
label.AppendLiteral("##");
|
||||
label.AppendFormatted(row.Key);
|
||||
ImGui.Selectable(label);
|
||||
if (current.QuestId != 0 && ImGui.IsItemHovered() && _questData.TryGetQuestInfo(QuestId.FromRowId(current.QuestId), out IQuestInfo questInfo))
|
||||
if (current.QuestId != 0 && _questData.TryGetQuestInfo(QuestId.FromRowId(current.QuestId), out IQuestInfo questInfo))
|
||||
{
|
||||
_questTooltipComponent.Draw(questInfo);
|
||||
}
|
||||
string text = $"##CurrentQuest_{current.AetherCurrentId}";
|
||||
if (ImGui.IsItemClicked(ImGuiMouseButton.Right))
|
||||
{
|
||||
ImGui.OpenPopup(text);
|
||||
}
|
||||
ImRaii.PopupDisposable popupDisposable = ImRaii.Popup(text);
|
||||
try
|
||||
{
|
||||
if (popupDisposable.Success && ImGui.MenuItem("View Quest") && current.QuestId != 0)
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
QuestChainComponent?.SelectQuest(QuestId.FromRowId(current.QuestId));
|
||||
SelectTabAction?.Invoke("Quest Chain");
|
||||
_questTooltipComponent.Draw(questInfo);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
popupDisposable.Dispose();
|
||||
_questRegistry.TryGetQuest(questInfo.QuestId, out Questionable.Model.Quest quest);
|
||||
_questJournalUtils.ShowContextMenu(questInfo, quest, "AttunementJournalComponent");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -759,13 +748,13 @@ internal sealed class AttunementJournalComponent
|
|||
if (!valueOrDefault)
|
||||
{
|
||||
AetherCurrentPosition overworldPosition = _aetherCurrentData.GetOverworldPosition(current.AetherCurrentId);
|
||||
string text2 = $"##AttuneCurrent_{current.AetherCurrentId}";
|
||||
string text = $"##AttuneCurrent_{current.AetherCurrentId}";
|
||||
if (ImGui.IsItemClicked(ImGuiMouseButton.Right))
|
||||
{
|
||||
ImGui.OpenPopup(text2);
|
||||
ImGui.OpenPopup(text);
|
||||
}
|
||||
using ImRaii.PopupDisposable popupDisposable2 = ImRaii.Popup(text2);
|
||||
if ((bool)popupDisposable2)
|
||||
using ImRaii.PopupDisposable popupDisposable = ImRaii.Popup(text);
|
||||
if ((bool)popupDisposable)
|
||||
{
|
||||
bool flag = overworldPosition != null && !IsAnyControllerRunning();
|
||||
using (ImRaii.Disabled(!flag))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue