Class: QuestManager

QuestManager


new QuestManager()

Properties:
Name Type Description
quests Object
Source:

Methods


addQuest(id, name, important)

Parameters:
Name Type Description
id string
name string
important boolean
Source:
Returns:
Type
Quest

complete(questID, subquestID [, onCompleteParameter])

Completing a quest sets the quest status to true and runs the onComplete function if there is one.

Parameters:
Name Type Argument Description
questID string
subquestID string
onCompleteParameter * <optional>

If you need to pass anything into the onCompleteParameter function

Source:

getActiveQuests( [mapKey])

Returns subquests

Parameters:
Name Type Argument Description
mapKey string <optional>
Source:
Returns:
Type
Array.<SubQuest>

getAllQuests()

Source:
Returns:
Type
object

getQuest(questID [, subquestID])

Parameters:
Name Type Argument Description
questID string
subquestID string <optional>
Source:
Returns:
Type
Quest | SubQuest

isComplete(questID [, subquestID])

Parameters:
Name Type Argument Description
questID string
subquestID string <optional>
Source:
Returns:
Type
boolean

isQuestActive(questID, subquestID)

Parameters:
Name Type Description
questID
subquestID
Source:
Returns:
Type
boolean