muffin v6.37
This commit is contained in:
parent
f4b807679b
commit
98989e8a70
6 changed files with 7889 additions and 6587 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,2 +1,5 @@
|
||||||
AssemblyInfo.cs
|
AssemblyInfo.cs
|
||||||
Solution.sln
|
Solution.sln
|
||||||
|
.vs
|
||||||
|
**/bin/
|
||||||
|
**/obj/
|
||||||
|
|
|
||||||
|
|
@ -255,13 +255,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Item": {
|
"Item": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"NotInInventory": {
|
"InInventory": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
}
|
},
|
||||||
|
"NotInInventory": {
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
},
|
||||||
"MinimumLevel": {
|
"MinimumLevel": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"description": "Skip this step if the player level is greater than or equal to this value. Useful for steps that should only be done once at low levels (e.g., early aetheryte attunements).",
|
"description": "Skip this step if the player level is greater than or equal to this value. Useful for steps that should only be done once at low levels (e.g., early aetheryte attunements).",
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -3,4 +3,6 @@ namespace Questionable.Model.Questing;
|
||||||
public sealed class SkipItemConditions
|
public sealed class SkipItemConditions
|
||||||
{
|
{
|
||||||
public bool NotInInventory { get; set; }
|
public bool NotInInventory { get; set; }
|
||||||
|
|
||||||
|
public bool InInventory { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -247,6 +247,16 @@ internal static class SkipCondition
|
||||||
return true;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,8 @@ internal sealed class QuestFunctions
|
||||||
|
|
||||||
private ElementId? _lastLoggedNotReadyQuest;
|
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)
|
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;
|
_questRegistry = questRegistry;
|
||||||
|
|
@ -438,7 +440,11 @@ internal sealed class QuestFunctions
|
||||||
QuestManager* ptr2 = QuestManager.Instance();
|
QuestManager* ptr2 = QuestManager.Instance();
|
||||||
if (IsQuestAccepted(questId) && ptr2->GetQuestById(questId.Value)->IsHidden)
|
if (IsQuestAccepted(questId) && ptr2->GetQuestById(questId.Value)->IsHidden)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("GetMainScenarioQuest: Quest {QuestId} is accepted but hidden", questId);
|
if (_lastLoggedAcceptedHiddenMsq != questId)
|
||||||
|
{
|
||||||
|
_logger.LogInformation("GetMainScenarioQuest: Quest {QuestId} is accepted but hidden", questId);
|
||||||
|
_lastLoggedAcceptedHiddenMsq = questId;
|
||||||
|
}
|
||||||
return (QuestReference.NoQuest(MainScenarioQuestState.Available), "Quest accepted but hidden");
|
return (QuestReference.NoQuest(MainScenarioQuestState.Available), "Quest accepted but hidden");
|
||||||
}
|
}
|
||||||
if (IsQuestComplete(questId))
|
if (IsQuestComplete(questId))
|
||||||
|
|
@ -461,6 +467,7 @@ internal sealed class QuestFunctions
|
||||||
_logger.LogTrace("GetMainScenarioQuest: In loading screen");
|
_logger.LogTrace("GetMainScenarioQuest: In loading screen");
|
||||||
return (QuestReference.NoQuest(MainScenarioQuestState.LoadingScreen), "In loading screen");
|
return (QuestReference.NoQuest(MainScenarioQuestState.LoadingScreen), "In loading screen");
|
||||||
}
|
}
|
||||||
|
_lastLoggedAcceptedHiddenMsq = null;
|
||||||
return (new QuestReference(questId, QuestManager.GetQuestSequence(questId.Value), MainScenarioQuestState.Available), item);
|
return (new QuestReference(questId, QuestManager.GetQuestSequence(questId.Value), MainScenarioQuestState.Available), item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue