From 87fe96f64f4194c605a2fc59e08f7c5477fdbc43 Mon Sep 17 00:00:00 2001 From: Aldric Ducreux Date: Mon, 18 Mar 2024 00:15:00 +0100 Subject: [PATCH] add InstanceQuest for qpart --- Event.lua | 6 ++++++ Utils.lua | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/Event.lua b/Event.lua index f57eb63..5d4e21a 100644 --- a/Event.lua +++ b/Event.lua @@ -384,12 +384,18 @@ function AprRC.event.functions.qpart(event, questID) if not AprRC:HasStepOption("Coord") then AprRC:SetStepCoord(currentStep, range) end + if AprRC:IsInInstanceQuest() then + currentStep.InstanceQuest = true + end end tinsert(currentStep.Qpart[questID], index) else local step = {} step.Qpart = {} step.Qpart[questID] = { index } + if AprRC:IsInInstanceQuest() then + step.InstanceQuest = true + end AprRC:SetStepCoord(step, range) AprRC:NewStep(step) end diff --git a/Utils.lua b/Utils.lua index 8ecd954..1bb14ac 100644 --- a/Utils.lua +++ b/Utils.lua @@ -57,3 +57,8 @@ function AprRC:saveQuestInfo() end end end + +function AprRC:IsInInstanceQuest() + local isIntance, type = IsInInstance() + return isIntance and type == "scenario" +end