QUESTGROUP_STATUS_ENTERED
QUESTGROUP_STATUS_ENTERED
Questgroup-status: Entered
Model to interact with Questgroups-table.
getQuestgroupsForHierarchy(integer $hierarchyId, integer $parentQuestgroupId = null) : array
Get all Questgroups for a Questgroup hierarchy.
integer | $hierarchyId | ID of the Questgroup hierarchy to get Questgroups for |
integer | $parentQuestgroupId | ID of the parent Questgroup hierarchy |
Questgroups for the given hierarchy
getNextQuestgroup(integer $questgroupId) : array
Get the next Questgroup.
Determine the next Questgroup. If there is no next Questgroup on the same level as the given Quest then the followed-up Questgroup from a higher hierarchy level is returned.
integer | $questgroupId | ID of Questgroup to get next Questgroup of |
Questgroup data
getPreviousQuestgroup(integer $questgroupId) : array
Get the previous Questgroup.
Determine the previous Questgroup. If there is no previous Questgroup on the same level as the given Quest then the followed-up Questgroup from a higher hierarchy level is returned.
integer | $questgroupId | ID of Questgroup to get previous Questgroup of |
Questgroup data
getAchievedXPsForQuestgroup(integer $questgroupId, integer $characterId) : integer
Summarize XPs of all Quests for a Questgroup and its sub-Questgroups solved by a Character.
integer | $questgroupId | ID of Questgroup |
integer | $characterId | ID of Character |
Sum of XPs
questgroupTitleExists(integer $seminaryId, string $title, integer $questgroupId = null) : boolean
Check if a Questgroups title already exists for a Seminary.
integer | $seminaryId | ID of Seminary |
string | $title | Questgroup title to check |
integer | $questgroupId | Do not check this ID (for editing) |
Whether Questgroup title exists or not
createQuestgroup(integer $userId, integer $seminaryId, string $title) : integer
Create a new Questgroup.
integer | $userId | User-ID that creates the new character |
integer | $seminaryId | ID of Seminary |
string | $title | Title for new Questgroup |
ID of new Questgroup
addQuestgroupToHierarchy(integer $questgroupId, integer $hierarchyId, integer $parentQuestgroupId)
Add a Questgroup to a Questgroupshierarchy.
integer | $questgroupId | Id of Questgroup to add |
integer | $hierarchyId | Id of Hierarchy to add Questgroup to |
integer | $parentQuestgroupId | Id of parent Questgroup |
calculateXPsForQuestgroup(integer $questgroupId, array $calculatedQuests = array()) : integer
Calculate the total amount of achievable XPs for a Questgroup, its sub-Questgroups, related Questgroups etc. and store this value in the database.
integer | $questgroupId | ID of Questgroup |
array | $calculatedQuests | Already calculated Quests |
Sum of calculated XPs
_getNextQuestgroup(integer $parentQuestgroupId, integer $questgroupPos) : array
Get the next (direct) Questgroup.
integer | $parentQuestgroupId | ID of parent Questgroup to get next Questgroup of |
integer | $questgroupPos | Position of Questgroup to get next Questgroup of |
Data of next Questgroup or NULL
_getPreviousQuestgroup(integer $parentQuestgroupId, integer $questgroupPos) : array
Get the previous (direct) Questgroup.
integer | $parentQuestgroupId | ID of parent Questgroup to get previous Questgroup of |
integer | $questgroupPos | Position of Questgroup to get previous Questgroup of |
Data of previous Questgroup or NULL
setQuestgroupStatus(integer $questgroupId, integer $characterId, integer $status, boolean $repeated = true)
Mark a Questgroup for a Character.
integer | $questgroupId | ID of Questgroup to mark |
integer | $characterId | ID of Character to mark the Questgroup for |
integer | $status | Questgroup status to mark |
boolean | $repeated | Insert although status is already set for this Questgroup and Character |
_getAchievedXPsForQuestgroup(integer $questgroupId, integer $characterId) : integer
Get the sum of XPs of Quests for a Questgroup solved by a Character.
integer | $questgroupId | ID of Questgroup |
integer | $characterId | ID of Character |
Sum of XPs of Quests
_calculateXPsForQuestgroup(integer $quest, array $calculatedQuests = array()) : integer
Calculate the total amount of achievable XPs for a Quest and its following Quests by choosing the path with the highest amount of XPs.
integer | $quest | Quest data |
array | $calculatedQuests | Already calculated Quests |
Sum of calculated XPs