diff --git a/QuestPathGenerator/RoslynElements/ComplexCombatDataExtensions.cs b/QuestPathGenerator/RoslynElements/ComplexCombatDataExtensions.cs index f683890f..05afb26c 100644 --- a/QuestPathGenerator/RoslynElements/ComplexCombatDataExtensions.cs +++ b/QuestPathGenerator/RoslynElements/ComplexCombatDataExtensions.cs @@ -21,6 +21,9 @@ internal static class ComplexCombatDataExtensions Assignment(nameof(ComplexCombatData.DataId), complexCombatData.DataId, emptyData.DataId) .AsSyntaxNodeOrToken(), + Assignment(nameof(ComplexCombatData.NameId), complexCombatData.NameId, + emptyData.NameId) + .AsSyntaxNodeOrToken(), Assignment(nameof(ComplexCombatData.MinimumKillCount), complexCombatData.MinimumKillCount, emptyData.MinimumKillCount) .AsSyntaxNodeOrToken(), diff --git a/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1056_Honor Lost.json b/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1056_Honor Lost.json new file mode 100644 index 00000000..b51fe2cc --- /dev/null +++ b/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1056_Honor Lost.json @@ -0,0 +1,114 @@ +{ + "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", + "Author": "liza", + "QuestSequence": [ + { + "Sequence": 0, + "Steps": [ + { + "TerritoryId": 137, + "InteractionType": "EquipItem", + "ItemId": 4542, + "AetheryteShortcut": "Ul'dah", + "AethernetShortcut": [ + "[Ul'dah] Aetheryte Plaza", + "[Ul'dah] The Chamber of Rule" + ], + "SkipConditions": { + "AetheryteShortcutIf": { + "InSameTerritory": true, + "InTerritory": [ + 131 + ] + } + } + }, + { + "DataId": 1006747, + "Position": { + "X": -20.828613, + "Y": 29.999964, + "Z": -2.4262085 + }, + "TerritoryId": 131, + "InteractionType": "AcceptQuest" + } + ] + }, + { + "Sequence": 1, + "Steps": [ + { + "Position": { + "X": -259.72705, + "Y": 67.23717, + "Z": -293.5509 + }, + "TerritoryId": 180, + "InteractionType": "WalkTo", + "AetheryteShortcut": "Outer La Noscea - Camp Overlook", + "Fly": true, + "SkipConditions": { + "StepIf": { + "Flying": "Locked" + } + } + }, + { + "Position": { + "X": -355.4327, + "Y": 63.813503, + "Z": -382.56308 + }, + "TerritoryId": 180, + "InteractionType": "WalkTo", + "Fly": true, + "SkipConditions": { + "StepIf": { + "Flying": "Locked" + } + } + }, + { + "DataId": 2002346, + "Position": { + "X": -312.27594, + "Y": 32.547485, + "Z": -444.9989 + }, + "TerritoryId": 180, + "InteractionType": "Combat", + "EnemySpawnType": "AfterInteraction", + "ComplexCombatData": [ + { + "DataId": 6, + "NameId": 2020 + } + ], + "Fly": true + } + ] + }, + { + "Sequence": 255, + "Steps": [ + { + "DataId": 1006747, + "Position": { + "X": -20.828613, + "Y": 29.999964, + "Z": -2.4262085 + }, + "TerritoryId": 131, + "InteractionType": "CompleteQuest", + "AetheryteShortcut": "Ul'dah", + "AethernetShortcut": [ + "[Ul'dah] Aetheryte Plaza", + "[Ul'dah] The Chamber of Rule" + ], + "NextQuestId": 1057 + } + ] + } + ] +} diff --git a/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1057_Power Struggles.json b/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1057_Power Struggles.json new file mode 100644 index 00000000..2ac204b8 --- /dev/null +++ b/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1057_Power Struggles.json @@ -0,0 +1,75 @@ +{ + "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", + "Author": "liza", + "QuestSequence": [ + { + "Sequence": 0, + "Steps": [ + { + "DataId": 1006747, + "Position": { + "X": -20.828613, + "Y": 29.999964, + "Z": -2.4262085 + }, + "TerritoryId": 131, + "InteractionType": "AcceptQuest", + "AetheryteShortcut": "Ul'dah", + "AethernetShortcut": [ + "[Ul'dah] Aetheryte Plaza", + "[Ul'dah] The Chamber of Rule" + ], + "SkipConditions": { + "AetheryteShortcutIf": { + "InSameTerritory": true, + "InTerritory": [ + 131 + ] + } + } + } + ] + }, + { + "Sequence": 1, + "Steps": [ + { + "DataId": 2002347, + "Position": { + "X": 175.82971, + "Y": -10.452454, + "Z": 84.91638 + }, + "TerritoryId": 145, + "InteractionType": "Combat", + "EnemySpawnType": "AfterInteraction", + "KillEnemyDataIds": [ + 383 + ], + "Fly": true + } + ] + }, + { + "Sequence": 255, + "Steps": [ + { + "DataId": 1006747, + "Position": { + "X": -20.828613, + "Y": 29.999964, + "Z": -2.4262085 + }, + "TerritoryId": 131, + "InteractionType": "CompleteQuest", + "AetheryteShortcut": "Ul'dah", + "AethernetShortcut": [ + "[Ul'dah] Aetheryte Plaza", + "[Ul'dah] The Chamber of Rule" + ], + "NextQuestId": 1058 + } + ] + } + ] +} diff --git a/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1058_Poisoned Hearts.json b/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1058_Poisoned Hearts.json new file mode 100644 index 00000000..c8861e53 --- /dev/null +++ b/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1058_Poisoned Hearts.json @@ -0,0 +1,259 @@ +{ + "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", + "Author": "liza", + "QuestSequence": [ + { + "Sequence": 0, + "Steps": [ + { + "DataId": 1006747, + "Position": { + "X": -20.828613, + "Y": 29.999964, + "Z": -2.4262085 + }, + "TerritoryId": 131, + "InteractionType": "AcceptQuest", + "AetheryteShortcut": "Ul'dah", + "AethernetShortcut": [ + "[Ul'dah] Aetheryte Plaza", + "[Ul'dah] The Chamber of Rule" + ], + "SkipConditions": { + "AetheryteShortcutIf": { + "InSameTerritory": true, + "InTerritory": [ + 131 + ] + } + } + } + ] + }, + { + "Sequence": 1, + "Steps": [ + { + "Position": { + "X": -97.65164, + "Y": 14.866778, + "Z": -189.99821 + }, + "StopDistance": 0.5, + "TerritoryId": 146, + "InteractionType": "Combat", + "EnemySpawnType": "AutoOnEnterArea", + "KillEnemyDataIds": [ + 1923, + 1924 + ], + "AetheryteShortcut": "Southern Thanalan - Little Ala Mhigo", + "Fly": true, + "SkipConditions": { + "AetheryteShortcutIf": { + "InSameTerritory": true + }, + "StepIf": { + "CompletionQuestVariablesFlags": [ + null, + null, + null, + null, + null, + 64 + ] + } + } + }, + { + "DataId": 2002349, + "Position": { + "X": -97.39838, + "Y": 14.846985, + "Z": -188.2201 + }, + "TerritoryId": 146, + "InteractionType": "Interact", + "CompletionQuestVariablesFlags": [ + null, + null, + null, + null, + null, + 64 + ] + }, + { + "Position": { + "X": -97.35628, + "Y": -14.397484, + "Z": -176.70825 + }, + "StopDistance": 0.5, + "TerritoryId": 146, + "InteractionType": "Combat", + "EnemySpawnType": "AutoOnEnterArea", + "KillEnemyDataIds": [ + 1923, + 1924 + ], + "Fly": true, + "SkipConditions": { + "StepIf": { + "CompletionQuestVariablesFlags": [ + null, + null, + null, + null, + null, + 128 + ] + } + } + }, + { + "DataId": 2002348, + "Position": { + "X": -99.4126, + "Y": -14.4198, + "Z": -179.46143 + }, + "TerritoryId": 146, + "InteractionType": "Interact", + "CompletionQuestVariablesFlags": [ + null, + null, + null, + null, + null, + 128 + ] + }, + { + "Position": { + "X": 137.78966, + "Y": 10.371678, + "Z": -427.8172 + }, + "StopDistance": 0.5, + "TerritoryId": 146, + "InteractionType": "Combat", + "EnemySpawnType": "AutoOnEnterArea", + "KillEnemyDataIds": [ + 1923, + 1924 + ], + "SkipConditions": { + "StepIf": { + "CompletionQuestVariablesFlags": [ + null, + null, + null, + null, + null, + 16 + ] + } + } + }, + { + "Position": { + "X": 137.78966, + "Y": 10.371678, + "Z": -427.8172 + }, + "StopDistance": 0.5, + "TerritoryId": 146, + "InteractionType": "WalkTo", + "SkipConditions": { + "StepIf": { + "CompletionQuestVariablesFlags": [ + null, + null, + null, + null, + null, + 16 + ] + } + } + }, + { + "DataId": 2002351, + "Position": { + "X": 137.74304, + "Y": 10.60498, + "Z": -420.5539 + }, + "TerritoryId": 146, + "InteractionType": "Interact", + "DisableNavmesh": true, + "CompletionQuestVariablesFlags": [ + null, + null, + null, + null, + null, + 16 + ] + }, + { + "Position": { + "X": 137.70113, + "Y": 10.371678, + "Z": -427.45047 + }, + "TerritoryId": 146, + "InteractionType": "WalkTo", + "DisableNavmesh": true + }, + { + "Position": { + "X": 116.208305, + "Y": 11.091853, + "Z": -475.35126 + }, + "StopDistance": 0.5, + "TerritoryId": 146, + "InteractionType": "Combat", + "EnemySpawnType": "AutoOnEnterArea", + "KillEnemyDataIds": [ + 1923, + 1924 + ] + }, + { + "DataId": 2002350, + "Position": { + "X": 115.983765, + "Y": 11.184814, + "Z": -482.7802 + }, + "TerritoryId": 146, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 255, + "Steps": [ + { + "DataId": 1006747, + "Position": { + "X": -20.828613, + "Y": 29.999964, + "Z": -2.4262085 + }, + "TerritoryId": 131, + "InteractionType": "CompleteQuest", + "AetheryteShortcut": "Ul'dah", + "AethernetShortcut": [ + "[Ul'dah] Aetheryte Plaza", + "[Ul'dah] The Chamber of Rule" + ], + "NextQuestId": 1059 + } + ] + } + ] +} diff --git a/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1059_Parley in the Sagolii.json b/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1059_Parley in the Sagolii.json new file mode 100644 index 00000000..2f013d5a --- /dev/null +++ b/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1059_Parley in the Sagolii.json @@ -0,0 +1,72 @@ +{ + "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", + "Author": "liza", + "QuestSequence": [ + { + "Sequence": 0, + "Steps": [ + { + "DataId": 1006747, + "Position": { + "X": -20.828613, + "Y": 29.999964, + "Z": -2.4262085 + }, + "TerritoryId": 131, + "InteractionType": "AcceptQuest", + "AetheryteShortcut": "Ul'dah", + "AethernetShortcut": [ + "[Ul'dah] Aetheryte Plaza", + "[Ul'dah] The Chamber of Rule" + ], + "SkipConditions": { + "AetheryteShortcutIf": { + "InSameTerritory": true, + "InTerritory": [ + 131 + ] + } + } + } + ] + }, + { + "Sequence": 1, + "Steps": [ + { + "DataId": 2002356, + "Position": { + "X": -407.4312, + "Y": 7.156433, + "Z": 525.6886 + }, + "TerritoryId": 146, + "InteractionType": "SinglePlayerDuty", + "AetheryteShortcut": "Southern Thanalan - Forgotten Springs", + "Fly": true + } + ] + }, + { + "Sequence": 255, + "Steps": [ + { + "DataId": 1006747, + "Position": { + "X": -20.828613, + "Y": 29.999964, + "Z": -2.4262085 + }, + "TerritoryId": 131, + "InteractionType": "CompleteQuest", + "AetheryteShortcut": "Ul'dah", + "AethernetShortcut": [ + "[Ul'dah] Aetheryte Plaza", + "[Ul'dah] The Chamber of Rule" + ], + "NextQuestId": 1060 + } + ] + } + ] +} diff --git a/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1060_Keeping the Oath.json b/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1060_Keeping the Oath.json new file mode 100644 index 00000000..e9f2519f --- /dev/null +++ b/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1060_Keeping the Oath.json @@ -0,0 +1,100 @@ +{ + "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", + "Author": "liza", + "QuestSequence": [ + { + "Sequence": 0, + "Steps": [ + { + "DataId": 1006747, + "Position": { + "X": -20.828613, + "Y": 29.999964, + "Z": -2.4262085 + }, + "TerritoryId": 131, + "InteractionType": "AcceptQuest", + "AetheryteShortcut": "Ul'dah", + "AethernetShortcut": [ + "[Ul'dah] Aetheryte Plaza", + "[Ul'dah] The Chamber of Rule" + ], + "SkipConditions": { + "AetheryteShortcutIf": { + "InSameTerritory": true, + "InTerritory": [ + 131 + ] + } + } + } + ] + }, + { + "Sequence": 1, + "Steps": [ + { + "DataId": 1007829, + "Position": { + "X": 26.932129, + "Y": 13, + "Z": 44.418945 + }, + "TerritoryId": 141, + "InteractionType": "Interact", + "AetheryteShortcut": "Central Thanalan - Black Brush Station", + "Fly": true + } + ] + }, + { + "Sequence": 2, + "Steps": [ + { + "Position": { + "X": -775.4471, + "Y": 224.95006, + "Z": 29.04266 + }, + "StopDistance": 0.5, + "TerritoryId": 155, + "InteractionType": "WalkTo", + "AetheryteShortcut": "Coerthas Central Highlands - Camp Dragonhead", + "Fly": true + }, + { + "Position": { + "X": -775.4471, + "Y": 224.95006, + "Z": 29.04266 + }, + "StopDistance": 0.5, + "TerritoryId": 155, + "InteractionType": "SinglePlayerDuty", + "Mount": false + } + ] + }, + { + "Sequence": 255, + "Steps": [ + { + "DataId": 1006747, + "Position": { + "X": -20.828613, + "Y": 29.999964, + "Z": -2.4262085 + }, + "TerritoryId": 131, + "InteractionType": "CompleteQuest", + "AetheryteShortcut": "Ul'dah", + "AethernetShortcut": [ + "[Ul'dah] Aetheryte Plaza", + "[Ul'dah] The Chamber of Rule" + ], + "NextQuestId": 2032 + } + ] + } + ] +} diff --git a/QuestPaths/quest-v1.json b/QuestPaths/quest-v1.json index 35969407..7013ea2d 100644 --- a/QuestPaths/quest-v1.json +++ b/QuestPaths/quest-v1.json @@ -617,6 +617,10 @@ "description": "The enemy data id which is supposed to be killed", "type": "integer" }, + "NameId": { + "description": "Name id of the enemy which is supposed to be killed, helpful if multiple nearby enemies share the same DataId", + "type": "integer" + }, "MinimumKillCount": { "description": "Overworld mobs: If this number of mobs has been killed, will wait a bit before attempting to pull another mob to see if the quest progresses", "type": "integer" diff --git a/Questionable.Model/Questing/ComplexCombatData.cs b/Questionable.Model/Questing/ComplexCombatData.cs index 5f85c243..adc80f4a 100644 --- a/Questionable.Model/Questing/ComplexCombatData.cs +++ b/Questionable.Model/Questing/ComplexCombatData.cs @@ -5,6 +5,7 @@ namespace Questionable.Model.Questing; public sealed class ComplexCombatData { public uint DataId { get; set; } + public uint? NameId { get; set; } // TODO Use this public uint? MinimumKillCount { get; set; } diff --git a/Questionable/Controller/CombatController.cs b/Questionable/Controller/CombatController.cs index 91eca6c1..d7ca7fde 100644 --- a/Questionable/Controller/CombatController.cs +++ b/Questionable/Controller/CombatController.cs @@ -242,7 +242,8 @@ internal sealed class CombatController : IDisposable if (_currentFight.Data.CompletedComplexDatas.Contains(i)) continue; - if (complexCombatData[i].DataId == battleNpc.DataId) + if (complexCombatData[i].DataId == battleNpc.DataId && + (complexCombatData[i].NameId == null || complexCombatData[i].NameId == battleNpc.NameId)) return 100; } } @@ -261,7 +262,9 @@ internal sealed class CombatController : IDisposable if (gameObjectStruct->NamePlateIconId is 60093 or 60732) return 0; - var enemyData = _currentFight.Data.ComplexCombatDatas.FirstOrDefault(x => x.DataId == battleNpc.DataId); + var enemyData = _currentFight.Data.ComplexCombatDatas + .FirstOrDefault(x => x.DataId == battleNpc.DataId && + (x.NameId == null || x.NameId == battleNpc.NameId)); if (enemyData is { IgnoreQuestMarker: true }) { if (battleNpc.StatusFlags.HasFlag(StatusFlags.InCombat)) diff --git a/Questionable/Controller/CombatModules/ItemUseModule.cs b/Questionable/Controller/CombatModules/ItemUseModule.cs index 56da033f..65f829a1 100644 --- a/Questionable/Controller/CombatModules/ItemUseModule.cs +++ b/Questionable/Controller/CombatModules/ItemUseModule.cs @@ -86,7 +86,8 @@ internal sealed class ItemUseModule : ICombatModule } if (_combatData.KillEnemyDataIds.Contains(nextTarget.DataId) || - _combatData.ComplexCombatDatas.Any(x => x.DataId == nextTarget.DataId)) + _combatData.ComplexCombatDatas.Any(x => x.DataId == nextTarget.DataId && + (x.NameId == null || (nextTarget is ICharacter character && x.NameId == character.NameId)))) { if (_isDoingRotation) { diff --git a/Questionable/Windows/QuestComponents/CreationUtilsComponent.cs b/Questionable/Windows/QuestComponents/CreationUtilsComponent.cs index 8fc03bb4..be6f31c1 100644 --- a/Questionable/Windows/QuestComponents/CreationUtilsComponent.cs +++ b/Questionable/Windows/QuestComponents/CreationUtilsComponent.cs @@ -11,6 +11,7 @@ using Dalamud.Interface.Colors; using Dalamud.Interface.Components; using Dalamud.Plugin.Services; using FFXIVClientStructs.FFXIV.Client.Game; +using FFXIVClientStructs.FFXIV.Client.Game.Character; using FFXIVClientStructs.FFXIV.Client.Game.Control; using FFXIVClientStructs.FFXIV.Client.Game.Event; using FFXIVClientStructs.FFXIV.Client.Game.Object; @@ -199,9 +200,13 @@ internal sealed class CreationUtilsComponent private unsafe void DrawTargetDetails(IGameObject target) { + string nameId = string.Empty; + if (target is ICharacter character) + nameId = $"; n={character.NameId}"; + ImGui.Separator(); ImGui.Text(string.Create(CultureInfo.InvariantCulture, - $"Target: {target.Name} ({target.ObjectKind}; {target.DataId})")); + $"Target: {target.Name} ({target.ObjectKind}; {target.DataId}{nameId})")); if (_clientState.LocalPlayer != null) {