Finished quest state system idea

This commit is contained in:
Filip Maj 2022-02-16 15:32:54 -05:00
parent aae051d73f
commit 1523ae200b
21 changed files with 720 additions and 373 deletions

View file

@ -23,7 +23,8 @@ end
function onEventStarted(player, npc, eventType, eventName)
local defaultTalk = player:GetDefaultTalkQuest(npc);
local tutorialTalk = player:GetTutorialQuest(npc);
local tutorialTalk = player:GetTutorialQuest(npc);
local journalQuests = player:GetJournalQuestsForNpc(npc);
local activeQuests = player:GetQuestsForNpc(npc);
local possibleQuests = {};
@ -34,6 +35,9 @@ function onEventStarted(player, npc, eventType, eventName)
if (tutorialTalk ~= nil and eventType == ETYPE_TALK) then
table.insert(possibleQuests, tutorialTalk);
end
if (journalQuests ~= nil) then
table.insert(possibleQuests, unpack(journalQuests));
end
if (activeQuests ~= nil) then
table.insert(possibleQuests, unpack(activeQuests));
end