diff --git a/GatheringPaths/Properties/AssemblyInfo.cs b/GatheringPaths/Properties/AssemblyInfo.cs index db4c224..1859744 100644 --- a/GatheringPaths/Properties/AssemblyInfo.cs +++ b/GatheringPaths/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ using System.Runtime.Versioning; [assembly: AssemblyCompany("GatheringPaths")] [assembly: AssemblyConfiguration("Release")] -[assembly: AssemblyFileVersion("6.14.0.0")] -[assembly: AssemblyInformationalVersion("6.14+47775848820b6b7dabd835e0661a48b7791f01c8")] +[assembly: AssemblyFileVersion("6.15.0.0")] +[assembly: AssemblyInformationalVersion("6.15+fa9d726e067f739fff28fea7966f665e8dcfde88")] [assembly: AssemblyProduct("GatheringPaths")] [assembly: AssemblyTitle("GatheringPaths")] [assembly: TargetPlatform("Windows7.0")] [assembly: SupportedOSPlatform("Windows7.0")] -[assembly: AssemblyVersion("6.14.0.0")] +[assembly: AssemblyVersion("6.15.0.0")] [module: RefSafetyRules(11)] diff --git a/LLib/Properties/AssemblyInfo.cs b/LLib/Properties/AssemblyInfo.cs index 2e24d42..efd15ab 100644 --- a/LLib/Properties/AssemblyInfo.cs +++ b/LLib/Properties/AssemblyInfo.cs @@ -7,12 +7,12 @@ using System.Security.Permissions; [assembly: AssemblyCompany("LLib")] [assembly: AssemblyConfiguration("Release")] -[assembly: AssemblyFileVersion("6.14.0.0")] -[assembly: AssemblyInformationalVersion("6.14+5367edf45faba59401605531555000d1429966c1")] +[assembly: AssemblyFileVersion("6.15.0.0")] +[assembly: AssemblyInformationalVersion("6.15+5367edf45faba59401605531555000d1429966c1")] [assembly: AssemblyProduct("LLib")] [assembly: AssemblyTitle("LLib")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/WigglyMuffin/LLib.git")] [assembly: TargetPlatform("Windows7.0")] [assembly: SupportedOSPlatform("Windows7.0")] -[assembly: AssemblyVersion("6.14.0.0")] +[assembly: AssemblyVersion("6.15.0.0")] [module: RefSafetyRules(11)] diff --git a/QuestPaths/Properties/AssemblyInfo.cs b/QuestPaths/Properties/AssemblyInfo.cs index 72ed848..44c2d8d 100644 --- a/QuestPaths/Properties/AssemblyInfo.cs +++ b/QuestPaths/Properties/AssemblyInfo.cs @@ -5,9 +5,9 @@ using System.Runtime.Versioning; [assembly: AssemblyCompany("QuestPaths")] [assembly: AssemblyConfiguration("Release")] -[assembly: AssemblyFileVersion("6.14.0.0")] -[assembly: AssemblyInformationalVersion("6.14+47775848820b6b7dabd835e0661a48b7791f01c8")] +[assembly: AssemblyFileVersion("6.15.0.0")] +[assembly: AssemblyInformationalVersion("6.15+fa9d726e067f739fff28fea7966f665e8dcfde88")] [assembly: AssemblyProduct("QuestPaths")] [assembly: AssemblyTitle("QuestPaths")] -[assembly: AssemblyVersion("6.14.0.0")] +[assembly: AssemblyVersion("6.15.0.0")] [module: RefSafetyRules(11)] diff --git a/Questionable.Model/Properties/AssemblyInfo.cs b/Questionable.Model/Properties/AssemblyInfo.cs index dff2382..fa81ac4 100644 --- a/Questionable.Model/Properties/AssemblyInfo.cs +++ b/Questionable.Model/Properties/AssemblyInfo.cs @@ -5,9 +5,9 @@ using System.Runtime.Versioning; [assembly: AssemblyCompany("Questionable.Model")] [assembly: AssemblyConfiguration("Release")] -[assembly: AssemblyFileVersion("6.14.0.0")] -[assembly: AssemblyInformationalVersion("6.14+47775848820b6b7dabd835e0661a48b7791f01c8")] +[assembly: AssemblyFileVersion("6.15.0.0")] +[assembly: AssemblyInformationalVersion("6.15+fa9d726e067f739fff28fea7966f665e8dcfde88")] [assembly: AssemblyProduct("Questionable.Model")] [assembly: AssemblyTitle("Questionable.Model")] -[assembly: AssemblyVersion("6.14.0.0")] +[assembly: AssemblyVersion("6.15.0.0")] [module: RefSafetyRules(11)] diff --git a/Questionable/Properties/AssemblyInfo.cs b/Questionable/Properties/AssemblyInfo.cs index 94ae026..cb425b9 100644 --- a/Questionable/Properties/AssemblyInfo.cs +++ b/Questionable/Properties/AssemblyInfo.cs @@ -7,12 +7,12 @@ using System.Security.Permissions; [assembly: AssemblyCompany("Questionable")] [assembly: AssemblyConfiguration("Release")] -[assembly: AssemblyFileVersion("6.14.0.0")] -[assembly: AssemblyInformationalVersion("6.14+47775848820b6b7dabd835e0661a48b7791f01c8")] +[assembly: AssemblyFileVersion("6.15.0.0")] +[assembly: AssemblyInformationalVersion("6.15+fa9d726e067f739fff28fea7966f665e8dcfde88")] [assembly: AssemblyProduct("Questionable")] [assembly: AssemblyTitle("Questionable")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/WigglyMuffin/Ambivalence")] [assembly: TargetPlatform("Windows7.0")] [assembly: SupportedOSPlatform("Windows7.0")] -[assembly: AssemblyVersion("6.14.0.0")] +[assembly: AssemblyVersion("6.15.0.0")] [module: RefSafetyRules(11)] diff --git a/Questionable/Questionable.Controller.CombatModules/ItemUseModule.cs b/Questionable/Questionable.Controller.CombatModules/ItemUseModule.cs index 18e5517..75c4639 100644 --- a/Questionable/Questionable.Controller.CombatModules/ItemUseModule.cs +++ b/Questionable/Questionable.Controller.CombatModules/ItemUseModule.cs @@ -84,7 +84,7 @@ internal sealed class ItemUseModule : ICombatModule { _delegate.Update(nextTarget); } - else if (_combatData.KillEnemyDataIds.Contains(nextTarget.DataId) || _combatData.ComplexCombatDatas.Any((ComplexCombatData x) => x.DataId == nextTarget.DataId && (!x.NameId.HasValue || (nextTarget is ICharacter character && x.NameId == character.NameId)))) + else if (_combatData.KillEnemyDataIds.Contains(nextTarget.BaseId) || _combatData.ComplexCombatDatas.Any((ComplexCombatData x) => x.DataId == nextTarget.BaseId && (!x.NameId.HasValue || (nextTarget is ICharacter character && x.NameId == character.NameId)))) { if (_isDoingRotation) { diff --git a/Questionable/Questionable.Controller.CombatModules/Mount128Module.cs b/Questionable/Questionable.Controller.CombatModules/Mount128Module.cs index 7352230..64b30a8 100644 --- a/Questionable/Questionable.Controller.CombatModules/Mount128Module.cs +++ b/Questionable/Questionable.Controller.CombatModules/Mount128Module.cs @@ -50,8 +50,8 @@ internal sealed class Mount128Module : ICombatModule public bool CanAttack(IBattleNpc target) { - uint dataId = target.DataId; - if (dataId - 7504 <= 1 || dataId == 14107) + uint baseId = target.BaseId; + if (baseId - 7504 <= 1 || baseId == 14107) { return true; } diff --git a/Questionable/Questionable.Controller.CombatModules/Mount147Module.cs b/Questionable/Questionable.Controller.CombatModules/Mount147Module.cs index d31692a..4806ebd 100644 --- a/Questionable/Questionable.Controller.CombatModules/Mount147Module.cs +++ b/Questionable/Questionable.Controller.CombatModules/Mount147Module.cs @@ -46,6 +46,6 @@ internal sealed class Mount147Module : ICombatModule public bool CanAttack(IBattleNpc target) { - return target.DataId == 8593; + return target.BaseId == 8593; } } diff --git a/Questionable/Questionable.Controller.GameUi/InteractionUiController.cs b/Questionable/Questionable.Controller.GameUi/InteractionUiController.cs index 8cd0695..2d42f14 100644 --- a/Questionable/Questionable.Controller.GameUi/InteractionUiController.cs +++ b/Questionable/Questionable.Controller.GameUi/InteractionUiController.cs @@ -436,7 +436,7 @@ internal sealed class InteractionUiController : IDisposable IGameObject target = _targetManager.Target; if (target != null) { - foreach (IQuestInfo item in from x in _questData.GetAllByIssuerDataId(target.DataId) + foreach (IQuestInfo item in from x in _questData.GetAllByIssuerDataId(target.BaseId) where x.QuestId is QuestId select x) { @@ -485,9 +485,9 @@ internal sealed class InteractionUiController : IDisposable _logger.LogDebug("Ignoring entry in DialogueChoices, no answer"); continue; } - if (dialogueChoice2.DataId.HasValue && dialogueChoice2.DataId != _targetManager.Target?.DataId) + if (dialogueChoice2.DataId.HasValue && dialogueChoice2.DataId != _targetManager.Target?.BaseId) { - _logger.LogDebug("Skipping entry in DialogueChoice expecting target dataId {ExpectedDataId}, actual target is {ActualTargetId}", dialogueChoice2.DataId, _targetManager.Target?.DataId); + _logger.LogDebug("Skipping entry in DialogueChoice expecting target dataId {ExpectedDataId}, actual target is {ActualTargetId}", dialogueChoice2.DataId, _targetManager.Target?.BaseId); continue; } StringOrRegex stringOrRegex = ResolveReference(quest3, dialogueChoice2.ExcelSheet, dialogueChoice2.Prompt, dialogueChoice2.PromptIsRegularExpression); @@ -739,9 +739,9 @@ internal sealed class InteractionUiController : IDisposable { continue; } - if (dialogueChoice.DataId.HasValue && dialogueChoice.DataId != _targetManager.Target?.DataId) + if (dialogueChoice.DataId.HasValue && dialogueChoice.DataId != _targetManager.Target?.BaseId) { - _logger.LogDebug("Skipping entry in DialogueChoice expecting target dataId {ExpectedDataId}, actual target is {ActualTargetId}", dialogueChoice.DataId, _targetManager.Target?.DataId); + _logger.LogDebug("Skipping entry in DialogueChoice expecting target dataId {ExpectedDataId}, actual target is {ActualTargetId}", dialogueChoice.DataId, _targetManager.Target?.BaseId); continue; } StringOrRegex stringOrRegex = ResolveReference(quest, dialogueChoice.ExcelSheet, dialogueChoice.Prompt, dialogueChoice.PromptIsRegularExpression); diff --git a/Questionable/Questionable.Controller.Steps.Gathering/MoveToLandingLocation.cs b/Questionable/Questionable.Controller.Steps.Gathering/MoveToLandingLocation.cs index 996b3a7..63ebb1a 100644 --- a/Questionable/Questionable.Controller.Steps.Gathering/MoveToLandingLocation.cs +++ b/Questionable/Questionable.Controller.Steps.Gathering/MoveToLandingLocation.cs @@ -33,7 +33,7 @@ internal static class MoveToLandingLocation GatheringLocation location = base.Task.GatheringNode.Locations.First(); if (base.Task.GatheringNode.Locations.Count > 1) { - IGameObject gameObject = objectTable.SingleOrDefault((IGameObject x) => x.ObjectKind == ObjectKind.GatheringPoint && x.DataId == base.Task.GatheringNode.DataId && x.IsTargetable); + IGameObject gameObject = objectTable.SingleOrDefault((IGameObject x) => x.ObjectKind == ObjectKind.GatheringPoint && x.BaseId == base.Task.GatheringNode.DataId && x.IsTargetable); if (gameObject == null) { return false; diff --git a/Questionable/Questionable.Controller.Steps.Interactions/SinglePlayerDuty.cs b/Questionable/Questionable.Controller.Steps.Interactions/SinglePlayerDuty.cs index 1fa9ae4..ceec543 100644 --- a/Questionable/Questionable.Controller.Steps.Interactions/SinglePlayerDuty.cs +++ b/Questionable/Questionable.Controller.Steps.Interactions/SinglePlayerDuty.cs @@ -251,11 +251,11 @@ internal static class SinglePlayerDuty public override ETaskResult Update() { - if (targetManager.Target?.DataId == base.Task.DataId) + if (targetManager.Target?.BaseId == base.Task.DataId) { return ETaskResult.TaskComplete; } - IGameObject gameObject = objectTable.FirstOrDefault((IGameObject x) => x.DataId == base.Task.DataId); + IGameObject gameObject = objectTable.FirstOrDefault((IGameObject x) => x.BaseId == base.Task.DataId); if (gameObject == null) { return ETaskResult.StillRunning; diff --git a/Questionable/Questionable.Controller/CombatController.cs b/Questionable/Questionable.Controller/CombatController.cs index b479290..27a61b3 100644 --- a/Questionable/Questionable.Controller/CombatController.cs +++ b/Questionable/Questionable.Controller/CombatController.cs @@ -342,13 +342,13 @@ internal sealed class CombatController : IDisposable { for (int i = 0; i < complexCombatDatas.Count; i++) { - if (!_currentFight.Data.CompletedComplexDatas.Contains(i) && (!flag || complexCombatDatas[i].IgnoreQuestMarker || address->NamePlateIconId != 0) && complexCombatDatas[i].DataId == battleNpc.DataId && (!complexCombatDatas[i].NameId.HasValue || complexCombatDatas[i].NameId == battleNpc.NameId)) + if (!_currentFight.Data.CompletedComplexDatas.Contains(i) && (!flag || complexCombatDatas[i].IgnoreQuestMarker || address->NamePlateIconId != 0) && complexCombatDatas[i].DataId == battleNpc.BaseId && (!complexCombatDatas[i].NameId.HasValue || complexCombatDatas[i].NameId == battleNpc.NameId)) { return (Priority: 100, Reason: "CCD"); } } } - else if ((!flag || address->NamePlateIconId != 0) && _currentFight.Data.KillEnemyDataIds.Contains(battleNpc.DataId)) + else if ((!flag || address->NamePlateIconId != 0) && _currentFight.Data.KillEnemyDataIds.Contains(battleNpc.BaseId)) { return (Priority: 90, Reason: "KED"); } @@ -441,7 +441,7 @@ internal sealed class CombatController : IDisposable } if (!flag4) { - _logger.LogInformation("Moving to {TargetName} ({DataId}) to attack", gameObject.Name, gameObject.DataId); + _logger.LogInformation("Moving to {TargetName} ({BaseId}) to attack", gameObject.Name, gameObject.BaseId); MovementController movementController = _movementController; int num4 = 1; List list = new List(num4); @@ -453,7 +453,7 @@ internal sealed class CombatController : IDisposable } else { - _logger.LogInformation("Moving to {TargetName} ({DataId}) to attack (with navmesh)", gameObject.Name, gameObject.DataId); + _logger.LogInformation("Moving to {TargetName} ({BaseId}) to attack (with navmesh)", gameObject.Name, gameObject.BaseId); _movementController.NavigateTo(EMovementType.Combat, null, gameObject.Position, fly: false, sprint: false, num3 + num - 0.25f, float.MaxValue); } } diff --git a/Questionable/Questionable.Controller/CommandHandler.cs b/Questionable/Questionable.Controller/CommandHandler.cs index 14e3f9d..bc1afd0 100644 --- a/Questionable/Questionable.Controller/CommandHandler.cs +++ b/Questionable/Questionable.Controller/CommandHandler.cs @@ -215,7 +215,7 @@ internal sealed class CommandHandler : IDisposable List list3 = new List(); ExcelSheet excelSheet = _dataManager.GetExcelSheet(); UIState* ptr = UIState.Instance(); - for (byte b2 = 0; b2 < ptr->ChocoboTaxiStandsBitmask.Length * 8; b2++) + for (byte b2 = 0; b2 < ptr->UnlockedChocoboTaxiStandsBitmask.Length * 8; b2++) { if (ptr->IsChocoboTaxiStandUnlocked(b2)) { diff --git a/Questionable/Questionable.Controller/GatheringController.cs b/Questionable/Questionable.Controller/GatheringController.cs index c75588c..90c3b96 100644 --- a/Questionable/Questionable.Controller/GatheringController.cs +++ b/Questionable/Questionable.Controller/GatheringController.cs @@ -207,7 +207,7 @@ internal sealed class GatheringController : MiniTaskController x.ObjectKind == ObjectKind.GatheringPoint && x.IsTargetable && x.DataId == node.DataId); + return !_objectTable.Any((IGameObject x) => x.ObjectKind == ObjectKind.GatheringPoint && x.IsTargetable && x.BaseId == node.DataId); } private GatheringNode? FindNextTargetableNodeAndUpdateIndex(CurrentRequest currentRequest) @@ -216,7 +216,7 @@ internal sealed class GatheringController : MiniTaskController source = currentNode.Locations.Select((GatheringLocation x) => _objectTable.FirstOrDefault((IGameObject y) => currentNode.DataId == y.DataId && Vector3.Distance(x.Position, y.Position) < 0.1f)).ToList(); + List source = currentNode.Locations.Select((GatheringLocation x) => _objectTable.FirstOrDefault((IGameObject y) => currentNode.DataId == y.BaseId && Vector3.Distance(x.Position, y.Position) < 0.1f)).ToList(); if (source.Any((IGameObject x) => x == null)) { currentRequest.CurrentIndex = (num + 1) % currentRequest.Nodes.Count; diff --git a/Questionable/Questionable.Controller/QuestController.cs b/Questionable/Questionable.Controller/QuestController.cs index 3eaca69..a5664be 100644 --- a/Questionable/Questionable.Controller/QuestController.cs +++ b/Questionable/Questionable.Controller/QuestController.cs @@ -513,37 +513,35 @@ internal sealed class QuestController : MiniTaskController } if (_startedQuest != null && !_questFunctions.IsQuestAccepted(_startedQuest.Quest.Id)) { - if (!_startedQuest.Quest.Info.IsRepeatable && !_questFunctions.IsQuestComplete(_startedQuest.Quest.Id) && _questFunctions.IsReadyToAcceptQuest(_startedQuest.Quest.Id)) + if (_questFunctions.IsQuestComplete(_startedQuest.Quest.Id)) { - _logger.LogInformation("Quest {QuestId} is ready to accept but not yet accepted, moving to next quest", _startedQuest.Quest.Id); - SetNextQuest(_startedQuest.Quest); + _logger.LogDebug("Quest {QuestId} is complete, clearing started quest", _startedQuest.Quest.Id); _startedQuest = null; - return; } - if (_startedQuest.Quest.Info.IsRepeatable) + else { + if (!_startedQuest.Quest.Info.IsRepeatable) + { + _logger.LogInformation("Quest {QuestId} was abandoned, clearing started quest", _startedQuest.Quest.Id); + (ElementId, byte)? tuple = (from x in ManualPriorityQuests + where _questFunctions.IsReadyToAcceptQuest(x.Id) + select ((ElementId Id, byte))(Id: x.Id, 0)).FirstOrDefault(); + if (tuple.HasValue) + { + (ElementId, byte) valueOrDefault = tuple.GetValueOrDefault(); + if ((object)valueOrDefault.Item1 != null && _questRegistry.TryGetQuest(valueOrDefault.Item1, out Quest quest)) + { + _logger.LogInformation("Setting priority quest {QuestId} as next quest", valueOrDefault.Item1); + SetNextQuest(quest); + } + } + _startedQuest = null; + Stop("Quest abandoned"); + return; + } _logger.LogInformation("Repeatable quest {QuestId} is no longer accepted, clearing started quest", _startedQuest.Quest.Id); _startedQuest = null; } - else if (!_questFunctions.IsQuestComplete(_startedQuest.Quest.Id)) - { - _logger.LogInformation("Quest {QuestId} was abandoned, clearing started quest", _startedQuest.Quest.Id); - (ElementId, byte)? tuple = (from x in ManualPriorityQuests - where _questFunctions.IsReadyToAcceptQuest(x.Id) - select ((ElementId Id, byte))(Id: x.Id, 0)).FirstOrDefault(); - if (tuple.HasValue) - { - (ElementId, byte) valueOrDefault = tuple.GetValueOrDefault(); - if ((object)valueOrDefault.Item1 != null && _questRegistry.TryGetQuest(valueOrDefault.Item1, out Quest quest)) - { - _logger.LogInformation("Setting priority quest {QuestId} as next quest", valueOrDefault.Item1); - SetNextQuest(quest); - } - } - _startedQuest = null; - Stop("Quest abandoned"); - return; - } } if (_simulatedQuest == null && _nextQuest != null && !((!_nextQuest.Quest.Info.IsRepeatable) ? (!_questFunctions.IsQuestAcceptedOrComplete(_nextQuest.Quest.Id)) : (!_questFunctions.IsQuestAccepted(_nextQuest.Quest.Id)))) { @@ -616,7 +614,7 @@ internal sealed class QuestController : MiniTaskController if ((object)valueOrDefault2.Item1 != null) { (elementId, b) = valueOrDefault2; - goto IL_08b5; + goto IL_084c; } } Quest quest2 = ManualPriorityQuests.FirstOrDefault((Quest x) => _questFunctions.IsReadyToAcceptQuest(x.Id)); @@ -626,7 +624,7 @@ internal sealed class QuestController : MiniTaskController SetNextQuest(quest2); return; } - goto IL_08b5; + goto IL_084c; } questProgress = _startedQuest; b = _startedQuest.Sequence; @@ -673,8 +671,8 @@ internal sealed class QuestController : MiniTaskController } } } - goto IL_0be5; - IL_0be5: + goto IL_0b7c; + IL_0b7c: if (questProgress == null) { DebugState = "No quest active"; @@ -733,7 +731,7 @@ internal sealed class QuestController : MiniTaskController DebugState = null; } return; - IL_08b5: + IL_084c: if (elementId == null || elementId.Value == 0) { if (_startedQuest != null) @@ -793,7 +791,7 @@ internal sealed class QuestController : MiniTaskController } questProgress = _startedQuest; } - goto IL_0be5; + goto IL_0b7c; } } diff --git a/Questionable/Questionable.Functions/GameFunctions.cs b/Questionable/Questionable.Functions/GameFunctions.cs index 0191371..ea06f02 100644 --- a/Questionable/Questionable.Functions/GameFunctions.cs +++ b/Questionable/Questionable.Functions/GameFunctions.cs @@ -133,7 +133,7 @@ internal sealed class GameFunctions { Dalamud.Game.ClientState.Objects.Enums.ObjectKind objectKind = item.ObjectKind; bool flag = ((objectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Player || objectKind - 8 <= Dalamud.Game.ClientState.Objects.Enums.ObjectKind.BattleNpc || objectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Housing) ? true : false); - if (!flag && (item == null || item.ObjectKind != Dalamud.Game.ClientState.Objects.Enums.ObjectKind.GatheringPoint || item.IsTargetable) && item.DataId == dataId && (!kind.HasValue || kind.Value == item.ObjectKind)) + if (!flag && (item == null || item.ObjectKind != Dalamud.Game.ClientState.Objects.Enums.ObjectKind.GatheringPoint || item.IsTargetable) && item.BaseId == dataId && (!kind.HasValue || kind.Value == item.ObjectKind)) { return item; } @@ -155,7 +155,7 @@ internal sealed class GameFunctions public unsafe bool InteractWith(IGameObject gameObject) { - _logger.LogInformation("Setting target with {DataId} to {ObjectId}", gameObject.DataId, gameObject.EntityId); + _logger.LogInformation("Setting target with {DataId} to {ObjectId}", gameObject.BaseId, gameObject.EntityId); _targetManager.Target = null; _targetManager.Target = gameObject; if (gameObject.ObjectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.GatheringPoint) @@ -459,7 +459,7 @@ internal sealed class GameFunctions { return false; } - if (_targetManager.Target == null || _targetManager.Target.DataId != currentQuest.Info.IssuerDataId) + if (_targetManager.Target == null || _targetManager.Target.BaseId != currentQuest.Info.IssuerDataId) { return false; } diff --git a/Questionable/Questionable.Functions/QuestFunctions.cs b/Questionable/Questionable.Functions/QuestFunctions.cs index ccfd5af..0e781e2 100644 --- a/Questionable/Questionable.Functions/QuestFunctions.cs +++ b/Questionable/Questionable.Functions/QuestFunctions.cs @@ -54,6 +54,8 @@ internal sealed class QuestFunctions private readonly HashSet _alreadyLoggedUnobtainableQuestsDetailed = new HashSet(); + private readonly HashSet _alreadyLoggedLevelRequirements = new HashSet(); + 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 logger) { _questRegistry = questRegistry; @@ -574,12 +576,18 @@ internal sealed class QuestFunctions } if (quest != null && quest.Info.Level > b) { - _logger.LogDebug("Quest {QuestId} level requirement not met: required {RequiredLevel}, current {CurrentLevel}", questId, quest.Info.Level, b); + if (_alreadyLoggedLevelRequirements.Add(questId.Value)) + { + _logger.LogDebug("Quest {QuestId} level requirement not met: required {RequiredLevel}, current {CurrentLevel}", questId, quest.Info.Level, b); + } return false; } if (quest == null && questId is QuestId questId3 && _questData.TryGetQuestInfo(questId3, out IQuestInfo questInfo) && questInfo is QuestInfo questInfo2 && questInfo2.Level > b) { - _logger.LogDebug("Quest {QuestId} (from data) level requirement not met: required {RequiredLevel}, current {CurrentLevel}", questId3, questInfo2.Level, b); + if (_alreadyLoggedLevelRequirements.Add(questId3.Value)) + { + _logger.LogDebug("Quest {QuestId} (from data) level requirement not met: required {RequiredLevel}, current {CurrentLevel}", questId3, questInfo2.Level, b); + } return false; } } diff --git a/Questionable/Questionable.Windows.QuestComponents/CreationUtilsComponent.cs b/Questionable/Questionable.Windows.QuestComponents/CreationUtilsComponent.cs index 66379ab..d82c9f8 100644 --- a/Questionable/Questionable.Windows.QuestComponents/CreationUtilsComponent.cs +++ b/Questionable/Questionable.Windows.QuestComponents/CreationUtilsComponent.cs @@ -125,7 +125,7 @@ internal sealed class CreationUtilsComponent handler.AppendLiteral(" ("); handler.AppendFormatted(target.ObjectKind); handler.AppendLiteral("; "); - handler.AppendFormatted(target.DataId); + handler.AppendFormatted(target.BaseId); handler.AppendFormatted(value); handler.AppendLiteral(")"); ImGui.Text(string.Create(provider, ref handler)); @@ -169,7 +169,7 @@ internal sealed class CreationUtilsComponent { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Bullseye, "To Target")) { - _movementController.NavigateTo(EMovementType.DebugWindow, target.DataId, target.Position, _condition[ConditionFlag.Mounted] && _gameFunctions.IsFlyingUnlockedInCurrentZone(), sprint: true); + _movementController.NavigateTo(EMovementType.DebugWindow, target.BaseId, target.Position, _condition[ConditionFlag.Mounted] && _gameFunctions.IsFlyingUnlockedInCurrentZone(), sprint: true); } } else if (ImGui.Button("Cancel pathfinding")) @@ -178,7 +178,7 @@ internal sealed class CreationUtilsComponent } ImGui.EndDisabled(); ImGui.SameLine(); - ImGui.BeginDisabled(!_questData.IsIssuerOfAnyQuest(target.DataId)); + ImGui.BeginDisabled(!_questData.IsIssuerOfAnyQuest(target.BaseId)); bool num = ImGuiComponents.IconButton(FontAwesomeIcon.MapMarkerAlt); if (ImGui.IsItemHovered()) { @@ -219,7 +219,7 @@ internal sealed class CreationUtilsComponent { clipboardText = new ImU8String(59, 4); clipboardText.AppendLiteral("\"DataId\": "); - clipboardText.AppendFormatted(target.DataId); + clipboardText.AppendFormatted(target.BaseId); clipboardText.AppendLiteral(",\n\"Position\": {\n \"X\": "); clipboardText.AppendFormatted(target.Position.X.ToString(CultureInfo.InvariantCulture)); clipboardText.AppendLiteral(",\n \"Y\": "); @@ -264,7 +264,7 @@ internal sealed class CreationUtilsComponent string value = text; clipboardText = new ImU8String(99, 6); clipboardText.AppendLiteral("\"DataId\": "); - clipboardText.AppendFormatted(target.DataId); + clipboardText.AppendFormatted(target.BaseId); clipboardText.AppendLiteral(",\n\"Position\": {\n \"X\": "); clipboardText.AppendFormatted(target.Position.X.ToString(CultureInfo.InvariantCulture)); clipboardText.AppendLiteral(",\n \"Y\": "); @@ -283,12 +283,12 @@ internal sealed class CreationUtilsComponent DefaultInterpolatedStringHandler handler; if (target.ObjectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Aetheryte) { - EAetheryteLocation dataId = (EAetheryteLocation)target.DataId; + EAetheryteLocation baseId = (EAetheryteLocation)target.BaseId; IFormatProvider invariantCulture = CultureInfo.InvariantCulture; IFormatProvider provider = invariantCulture; handler = new DefaultInterpolatedStringHandler(36, 4, invariantCulture); handler.AppendLiteral("{EAetheryteLocation."); - handler.AppendFormatted(dataId); + handler.AppendFormatted(baseId); handler.AppendLiteral(", new("); handler.AppendFormatted(target.Position.X); handler.AppendLiteral("f, "); diff --git a/Questionable/Questionable.Windows/DebugOverlay.cs b/Questionable/Questionable.Windows/DebugOverlay.cs index 7cb1442..5344a41 100644 --- a/Questionable/Questionable.Windows/DebugOverlay.cs +++ b/Questionable/Questionable.Windows/DebugOverlay.cs @@ -169,7 +169,7 @@ internal sealed class DebugOverlay : Window text.AppendLiteral("/"); text.AppendFormatted(item3.GameObjectId, "X"); text.AppendLiteral(", "); - text.AppendFormatted(item3.DataId); + text.AppendFormatted(item3.BaseId); text.AppendLiteral(", "); text.AppendFormatted(item); text.AppendLiteral(" - "); diff --git a/Questionable/Questionable.Windows/QuestSelectionWindow.cs b/Questionable/Questionable.Windows/QuestSelectionWindow.cs index 5264368..1bc782d 100644 --- a/Questionable/Questionable.Windows/QuestSelectionWindow.cs +++ b/Questionable/Questionable.Windows/QuestSelectionWindow.cs @@ -82,10 +82,10 @@ internal sealed class QuestSelectionWindow : LWindow { if (gameObject != null) { - uint dataId = gameObject.DataId; + uint baseId = gameObject.BaseId; string value = gameObject.Name.ToString(); - base.WindowName = $"Quests starting with {value} [{dataId}]{"###QuestionableQuestSelection"}"; - _quests = _questData.GetAllByIssuerDataId(dataId); + base.WindowName = $"Quests starting with {value} [{baseId}]{"###QuestionableQuestSelection"}"; + _quests = _questData.GetAllByIssuerDataId(baseId); if (_gameGui.TryGetAddonByName("SelectIconString", out var addonPtr)) { List answers = InteractionUiController.GetChoices(addonPtr); diff --git a/Solution.sln b/Solution.sln index a28fb10..5205cb2 100644 --- a/Solution.sln +++ b/Solution.sln @@ -2,15 +2,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.24720.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuestPaths", "QuestPaths\QuestPaths.csproj", "{8543D75D-1A2C-4045-9927-61FB7462F896}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuestPaths", "QuestPaths\QuestPaths.csproj", "{33884875-12A7-4737-9AE0-22BA23C5F933}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GatheringPaths", "GatheringPaths\GatheringPaths.csproj", "{6B22392B-ADAB-4D34-B7DD-7443345BEE26}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GatheringPaths", "GatheringPaths\GatheringPaths.csproj", "{577D196C-BA5A-410B-99D8-8242BA2EC631}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Questionable", "Questionable\Questionable.csproj", "{4C05BCC5-1221-4DAA-B897-52C8C3E2CD09}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Questionable", "Questionable\Questionable.csproj", "{589FE93D-4A62-47CD-91FF-833BCE031B3D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Questionable.Model", "Questionable.Model\Questionable.Model.csproj", "{5C131661-EDC1-4590-AC47-C38B0A5BA139}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Questionable.Model", "Questionable.Model\Questionable.Model.csproj", "{932D91F5-DA79-4120-862D-3E35C6F92408}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LLib", "LLib\LLib.csproj", "{CC748521-A62A-43A0-BB7B-90F96740C38E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LLib", "LLib\LLib.csproj", "{6E090518-C6E6-4D84-A889-67976D3C2CB5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -20,46 +20,46 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8543D75D-1A2C-4045-9927-61FB7462F896}.Debug|AnyCPU.ActiveCfg = Debug|AnyCPU - {8543D75D-1A2C-4045-9927-61FB7462F896}.Debug|AnyCPU.Build.0 = Debug|AnyCPU - {8543D75D-1A2C-4045-9927-61FB7462F896}.Debug|x64.ActiveCfg = Debug|AnyCPU - {8543D75D-1A2C-4045-9927-61FB7462F896}.Debug|x64.Build.0 = Debug|AnyCPU - {8543D75D-1A2C-4045-9927-61FB7462F896}.Release|AnyCPU.ActiveCfg = Release|AnyCPU - {8543D75D-1A2C-4045-9927-61FB7462F896}.Release|AnyCPU.Build.0 = Release|AnyCPU - {8543D75D-1A2C-4045-9927-61FB7462F896}.Release|x64.ActiveCfg = Release|AnyCPU - {8543D75D-1A2C-4045-9927-61FB7462F896}.Release|x64.Build.0 = Release|AnyCPU - {6B22392B-ADAB-4D34-B7DD-7443345BEE26}.Debug|AnyCPU.ActiveCfg = Debug|AnyCPU - {6B22392B-ADAB-4D34-B7DD-7443345BEE26}.Debug|AnyCPU.Build.0 = Debug|AnyCPU - {6B22392B-ADAB-4D34-B7DD-7443345BEE26}.Debug|x64.ActiveCfg = Debug|AnyCPU - {6B22392B-ADAB-4D34-B7DD-7443345BEE26}.Debug|x64.Build.0 = Debug|AnyCPU - {6B22392B-ADAB-4D34-B7DD-7443345BEE26}.Release|AnyCPU.ActiveCfg = Release|AnyCPU - {6B22392B-ADAB-4D34-B7DD-7443345BEE26}.Release|AnyCPU.Build.0 = Release|AnyCPU - {6B22392B-ADAB-4D34-B7DD-7443345BEE26}.Release|x64.ActiveCfg = Release|AnyCPU - {6B22392B-ADAB-4D34-B7DD-7443345BEE26}.Release|x64.Build.0 = Release|AnyCPU - {4C05BCC5-1221-4DAA-B897-52C8C3E2CD09}.Debug|AnyCPU.ActiveCfg = Debug|x64 - {4C05BCC5-1221-4DAA-B897-52C8C3E2CD09}.Debug|AnyCPU.Build.0 = Debug|x64 - {4C05BCC5-1221-4DAA-B897-52C8C3E2CD09}.Debug|x64.ActiveCfg = Debug|x64 - {4C05BCC5-1221-4DAA-B897-52C8C3E2CD09}.Debug|x64.Build.0 = Debug|x64 - {4C05BCC5-1221-4DAA-B897-52C8C3E2CD09}.Release|AnyCPU.ActiveCfg = Release|x64 - {4C05BCC5-1221-4DAA-B897-52C8C3E2CD09}.Release|AnyCPU.Build.0 = Release|x64 - {4C05BCC5-1221-4DAA-B897-52C8C3E2CD09}.Release|x64.ActiveCfg = Release|x64 - {4C05BCC5-1221-4DAA-B897-52C8C3E2CD09}.Release|x64.Build.0 = Release|x64 - {5C131661-EDC1-4590-AC47-C38B0A5BA139}.Debug|AnyCPU.ActiveCfg = Debug|AnyCPU - {5C131661-EDC1-4590-AC47-C38B0A5BA139}.Debug|AnyCPU.Build.0 = Debug|AnyCPU - {5C131661-EDC1-4590-AC47-C38B0A5BA139}.Debug|x64.ActiveCfg = Debug|AnyCPU - {5C131661-EDC1-4590-AC47-C38B0A5BA139}.Debug|x64.Build.0 = Debug|AnyCPU - {5C131661-EDC1-4590-AC47-C38B0A5BA139}.Release|AnyCPU.ActiveCfg = Release|AnyCPU - {5C131661-EDC1-4590-AC47-C38B0A5BA139}.Release|AnyCPU.Build.0 = Release|AnyCPU - {5C131661-EDC1-4590-AC47-C38B0A5BA139}.Release|x64.ActiveCfg = Release|AnyCPU - {5C131661-EDC1-4590-AC47-C38B0A5BA139}.Release|x64.Build.0 = Release|AnyCPU - {CC748521-A62A-43A0-BB7B-90F96740C38E}.Debug|AnyCPU.ActiveCfg = Debug|x64 - {CC748521-A62A-43A0-BB7B-90F96740C38E}.Debug|AnyCPU.Build.0 = Debug|x64 - {CC748521-A62A-43A0-BB7B-90F96740C38E}.Debug|x64.ActiveCfg = Debug|x64 - {CC748521-A62A-43A0-BB7B-90F96740C38E}.Debug|x64.Build.0 = Debug|x64 - {CC748521-A62A-43A0-BB7B-90F96740C38E}.Release|AnyCPU.ActiveCfg = Release|x64 - {CC748521-A62A-43A0-BB7B-90F96740C38E}.Release|AnyCPU.Build.0 = Release|x64 - {CC748521-A62A-43A0-BB7B-90F96740C38E}.Release|x64.ActiveCfg = Release|x64 - {CC748521-A62A-43A0-BB7B-90F96740C38E}.Release|x64.Build.0 = Release|x64 + {33884875-12A7-4737-9AE0-22BA23C5F933}.Debug|AnyCPU.ActiveCfg = Debug|AnyCPU + {33884875-12A7-4737-9AE0-22BA23C5F933}.Debug|AnyCPU.Build.0 = Debug|AnyCPU + {33884875-12A7-4737-9AE0-22BA23C5F933}.Debug|x64.ActiveCfg = Debug|AnyCPU + {33884875-12A7-4737-9AE0-22BA23C5F933}.Debug|x64.Build.0 = Debug|AnyCPU + {33884875-12A7-4737-9AE0-22BA23C5F933}.Release|AnyCPU.ActiveCfg = Release|AnyCPU + {33884875-12A7-4737-9AE0-22BA23C5F933}.Release|AnyCPU.Build.0 = Release|AnyCPU + {33884875-12A7-4737-9AE0-22BA23C5F933}.Release|x64.ActiveCfg = Release|AnyCPU + {33884875-12A7-4737-9AE0-22BA23C5F933}.Release|x64.Build.0 = Release|AnyCPU + {577D196C-BA5A-410B-99D8-8242BA2EC631}.Debug|AnyCPU.ActiveCfg = Debug|AnyCPU + {577D196C-BA5A-410B-99D8-8242BA2EC631}.Debug|AnyCPU.Build.0 = Debug|AnyCPU + {577D196C-BA5A-410B-99D8-8242BA2EC631}.Debug|x64.ActiveCfg = Debug|AnyCPU + {577D196C-BA5A-410B-99D8-8242BA2EC631}.Debug|x64.Build.0 = Debug|AnyCPU + {577D196C-BA5A-410B-99D8-8242BA2EC631}.Release|AnyCPU.ActiveCfg = Release|AnyCPU + {577D196C-BA5A-410B-99D8-8242BA2EC631}.Release|AnyCPU.Build.0 = Release|AnyCPU + {577D196C-BA5A-410B-99D8-8242BA2EC631}.Release|x64.ActiveCfg = Release|AnyCPU + {577D196C-BA5A-410B-99D8-8242BA2EC631}.Release|x64.Build.0 = Release|AnyCPU + {589FE93D-4A62-47CD-91FF-833BCE031B3D}.Debug|AnyCPU.ActiveCfg = Debug|x64 + {589FE93D-4A62-47CD-91FF-833BCE031B3D}.Debug|AnyCPU.Build.0 = Debug|x64 + {589FE93D-4A62-47CD-91FF-833BCE031B3D}.Debug|x64.ActiveCfg = Debug|x64 + {589FE93D-4A62-47CD-91FF-833BCE031B3D}.Debug|x64.Build.0 = Debug|x64 + {589FE93D-4A62-47CD-91FF-833BCE031B3D}.Release|AnyCPU.ActiveCfg = Release|x64 + {589FE93D-4A62-47CD-91FF-833BCE031B3D}.Release|AnyCPU.Build.0 = Release|x64 + {589FE93D-4A62-47CD-91FF-833BCE031B3D}.Release|x64.ActiveCfg = Release|x64 + {589FE93D-4A62-47CD-91FF-833BCE031B3D}.Release|x64.Build.0 = Release|x64 + {932D91F5-DA79-4120-862D-3E35C6F92408}.Debug|AnyCPU.ActiveCfg = Debug|AnyCPU + {932D91F5-DA79-4120-862D-3E35C6F92408}.Debug|AnyCPU.Build.0 = Debug|AnyCPU + {932D91F5-DA79-4120-862D-3E35C6F92408}.Debug|x64.ActiveCfg = Debug|AnyCPU + {932D91F5-DA79-4120-862D-3E35C6F92408}.Debug|x64.Build.0 = Debug|AnyCPU + {932D91F5-DA79-4120-862D-3E35C6F92408}.Release|AnyCPU.ActiveCfg = Release|AnyCPU + {932D91F5-DA79-4120-862D-3E35C6F92408}.Release|AnyCPU.Build.0 = Release|AnyCPU + {932D91F5-DA79-4120-862D-3E35C6F92408}.Release|x64.ActiveCfg = Release|AnyCPU + {932D91F5-DA79-4120-862D-3E35C6F92408}.Release|x64.Build.0 = Release|AnyCPU + {6E090518-C6E6-4D84-A889-67976D3C2CB5}.Debug|AnyCPU.ActiveCfg = Debug|x64 + {6E090518-C6E6-4D84-A889-67976D3C2CB5}.Debug|AnyCPU.Build.0 = Debug|x64 + {6E090518-C6E6-4D84-A889-67976D3C2CB5}.Debug|x64.ActiveCfg = Debug|x64 + {6E090518-C6E6-4D84-A889-67976D3C2CB5}.Debug|x64.Build.0 = Debug|x64 + {6E090518-C6E6-4D84-A889-67976D3C2CB5}.Release|AnyCPU.ActiveCfg = Release|x64 + {6E090518-C6E6-4D84-A889-67976D3C2CB5}.Release|AnyCPU.Build.0 = Release|x64 + {6E090518-C6E6-4D84-A889-67976D3C2CB5}.Release|x64.ActiveCfg = Release|x64 + {6E090518-C6E6-4D84-A889-67976D3C2CB5}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE