Skip to content

Commit

Permalink
add InstanceQuest for qpart
Browse files Browse the repository at this point in the history
  • Loading branch information
Neogeekmo committed Mar 17, 2024
1 parent f3380ac commit 87fe96f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Event.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions Utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,8 @@ function AprRC:saveQuestInfo()
end
end
end

function AprRC:IsInInstanceQuest()
local isIntance, type = IsInInstance()
return isIntance and type == "scenario"
end

0 comments on commit 87fe96f

Please sign in to comment.