muffin v7.4.12
This commit is contained in:
parent
e3e5a401c3
commit
0f9f445830
38 changed files with 13646 additions and 10442 deletions
|
|
@ -97,12 +97,12 @@ internal sealed class CraftworksSupplyController : IDisposable
|
|||
{
|
||||
return;
|
||||
}
|
||||
ushort contextMenuParentId = address->ContextMenuParentId;
|
||||
if (contextMenuParentId == 0)
|
||||
ushort blockedParentId = address->BlockedParentId;
|
||||
if (blockedParentId == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
AtkUnitBase* addonById = AtkStage.Instance()->RaptureAtkUnitManager->GetAddonById(contextMenuParentId);
|
||||
AtkUnitBase* addonById = AtkStage.Instance()->RaptureAtkUnitManager->GetAddonById(blockedParentId);
|
||||
if (addonById->NameString == "BankaCraftworksSupply")
|
||||
{
|
||||
_logger.LogInformation("Picking item for {AddonName}", addonById->NameString);
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ internal sealed class InteractionUiController : IDisposable
|
|||
|
||||
private readonly ShopController _shopController;
|
||||
|
||||
private readonly FateController _fateController;
|
||||
|
||||
private readonly BossModIpc _bossModIpc;
|
||||
|
||||
private readonly Configuration _configuration;
|
||||
|
|
@ -77,7 +79,7 @@ internal sealed class InteractionUiController : IDisposable
|
|||
{
|
||||
get
|
||||
{
|
||||
if (!_isInitialCheck && !_questController.IsRunning)
|
||||
if (!_isInitialCheck && !_questController.IsRunning && !_fateController.IsRunning)
|
||||
{
|
||||
return _territoryData.IsQuestBattleInstance(_clientState.TerritoryType);
|
||||
}
|
||||
|
|
@ -85,7 +87,7 @@ internal sealed class InteractionUiController : IDisposable
|
|||
}
|
||||
}
|
||||
|
||||
public unsafe InteractionUiController(IAddonLifecycle addonLifecycle, IDataManager dataManager, QuestFunctions questFunctions, AetheryteFunctions aetheryteFunctions, ExcelFunctions excelFunctions, QuestController questController, GatheringPointRegistry gatheringPointRegistry, QuestRegistry questRegistry, QuestData questData, TerritoryData territoryData, IGameGui gameGui, ITargetManager targetManager, IPluginLog pluginLog, IClientState clientState, IObjectTable objectTable, ShopController shopController, BossModIpc bossModIpc, Configuration configuration, ILogger<InteractionUiController> logger)
|
||||
public unsafe InteractionUiController(IAddonLifecycle addonLifecycle, IDataManager dataManager, QuestFunctions questFunctions, AetheryteFunctions aetheryteFunctions, ExcelFunctions excelFunctions, QuestController questController, GatheringPointRegistry gatheringPointRegistry, QuestRegistry questRegistry, QuestData questData, TerritoryData territoryData, IGameGui gameGui, ITargetManager targetManager, IPluginLog pluginLog, IClientState clientState, IObjectTable objectTable, ShopController shopController, FateController fateController, BossModIpc bossModIpc, Configuration configuration, ILogger<InteractionUiController> logger)
|
||||
{
|
||||
_addonLifecycle = addonLifecycle;
|
||||
_dataManager = dataManager;
|
||||
|
|
@ -102,6 +104,7 @@ internal sealed class InteractionUiController : IDisposable
|
|||
_clientState = clientState;
|
||||
_objectTable = objectTable;
|
||||
_shopController = shopController;
|
||||
_fateController = fateController;
|
||||
_bossModIpc = bossModIpc;
|
||||
_configuration = configuration;
|
||||
_logger = logger;
|
||||
|
|
@ -454,6 +457,15 @@ internal sealed class InteractionUiController : IDisposable
|
|||
}
|
||||
}
|
||||
}
|
||||
if (_fateController.IsRunning)
|
||||
{
|
||||
List<DialogueChoice> list4 = _fateController.CurrentFate?.TransformDialogueChoices;
|
||||
if (list4 != null)
|
||||
{
|
||||
_logger.LogInformation("Adding {Count} dialogue choices from active FATE", list4.Count);
|
||||
list.AddRange(list4.Select((DialogueChoice x) => new DialogueChoiceInfo(null, x)));
|
||||
}
|
||||
}
|
||||
if (list.Count == 0)
|
||||
{
|
||||
_logger.LogDebug("No dialogue choices to check");
|
||||
|
|
@ -641,12 +653,31 @@ internal sealed class InteractionUiController : IDisposable
|
|||
return;
|
||||
}
|
||||
QuestController.QuestProgress simulatedQuest = _questController.SimulatedQuest;
|
||||
if (simulatedQuest == null || !HandleTravelYesNo(addonSelectYesno, simulatedQuest, text))
|
||||
if (simulatedQuest != null && HandleTravelYesNo(addonSelectYesno, simulatedQuest, text))
|
||||
{
|
||||
QuestController.QuestProgress nextQuest = _questController.NextQuest;
|
||||
if (nextQuest != null)
|
||||
return;
|
||||
}
|
||||
QuestController.QuestProgress nextQuest = _questController.NextQuest;
|
||||
if ((nextQuest != null && CheckQuestYesNo(addonSelectYesno, nextQuest, text, checkAllSteps)) || !_fateController.IsRunning)
|
||||
{
|
||||
return;
|
||||
}
|
||||
List<DialogueChoice> list = _fateController.CurrentFate?.TransformDialogueChoices;
|
||||
if (list == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
foreach (DialogueChoice item in list)
|
||||
{
|
||||
if (item.Type == EDialogChoiceType.YesNo)
|
||||
{
|
||||
CheckQuestYesNo(addonSelectYesno, nextQuest, text, checkAllSteps);
|
||||
StringOrRegex stringOrRegex = ResolveReference(null, item.ExcelSheet, item.Prompt, item.PromptIsRegularExpression);
|
||||
if (stringOrRegex != null && IsMatch(text, stringOrRegex))
|
||||
{
|
||||
_logger.LogInformation("FATE: Returning {YesNo} for '{Prompt}'", item.Yes ? "Yes" : "No", text);
|
||||
addonSelectYesno->AtkUnitBase.FireCallbackInt((!item.Yes) ? 1 : 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue