muffin v6.37

This commit is contained in:
alydev 2025-11-09 04:17:00 +10:00
parent f4b807679b
commit 98989e8a70
6 changed files with 7889 additions and 6587 deletions

3
.gitignore vendored
View file

@ -1,2 +1,5 @@
AssemblyInfo.cs
Solution.sln
.vs
**/bin/
**/obj/

View file

@ -257,6 +257,9 @@
"Item": {
"type": "object",
"properties": {
"InInventory": {
"type": "boolean"
},
"NotInInventory": {
"type": "boolean"
}

File diff suppressed because it is too large Load diff

View file

@ -3,4 +3,6 @@ namespace Questionable.Model.Questing;
public sealed class SkipItemConditions
{
public bool NotInInventory { get; set; }
public bool InInventory { get; set; }
}

View file

@ -247,6 +247,16 @@ internal static class SkipCondition
return true;
}
}
item = skipConditions.Item;
if (item != null && item.InInventory && step != null && step.ItemId.HasValue)
{
InventoryManager* ptr2 = InventoryManager.Instance();
if (ptr2->GetInventoryItemCount(step.ItemId.Value, isHq: false, checkEquipped: true, checkArmory: true, 0) > 0 || ptr2->GetInventoryItemCount(step.ItemId.Value, isHq: true, checkEquipped: true, checkArmory: true, 0) > 0)
{
logger.LogInformation("Skipping step, item with itemId {ItemId} already in inventory", step.ItemId.Value);
return true;
}
}
return false;
}

View file

@ -64,6 +64,8 @@ internal sealed class QuestFunctions
private ElementId? _lastLoggedNotReadyQuest;
private ElementId? _lastLoggedAcceptedHiddenMsq;
public QuestFunctions(QuestRegistry questRegistry, QuestData questData, AetheryteFunctions aetheryteFunctions, AlliedSocietyQuestFunctions alliedSocietyQuestFunctions, AlliedSocietyData alliedSocietyData, AetheryteData aetheryteData, Configuration configuration, IDataManager dataManager, IClientState clientState, IGameGui gameGui, IAetheryteList aetheryteList, ILogger<QuestFunctions> logger)
{
_questRegistry = questRegistry;
@ -437,8 +439,12 @@ internal sealed class QuestFunctions
}
QuestManager* ptr2 = QuestManager.Instance();
if (IsQuestAccepted(questId) && ptr2->GetQuestById(questId.Value)->IsHidden)
{
if (_lastLoggedAcceptedHiddenMsq != questId)
{
_logger.LogInformation("GetMainScenarioQuest: Quest {QuestId} is accepted but hidden", questId);
_lastLoggedAcceptedHiddenMsq = questId;
}
return (QuestReference.NoQuest(MainScenarioQuestState.Available), "Quest accepted but hidden");
}
if (IsQuestComplete(questId))
@ -461,6 +467,7 @@ internal sealed class QuestFunctions
_logger.LogTrace("GetMainScenarioQuest: In loading screen");
return (QuestReference.NoQuest(MainScenarioQuestState.LoadingScreen), "In loading screen");
}
_lastLoggedAcceptedHiddenMsq = null;
return (new QuestReference(questId, QuestManager.GetQuestSequence(questId.Value), MainScenarioQuestState.Available), item);
}