correctly set status of Sidequests
This commit is contained in:
parent
5706d6fe14
commit
5cd7372ad2
2 changed files with 55 additions and 2 deletions
|
|
@ -217,6 +217,27 @@
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Mark a Sidequest as solved for a Character.
|
||||
*
|
||||
* @param int $sidequestId ID of Sidequest to mark as solved
|
||||
* @param int $characterId ID of Character that solved the Sidequest
|
||||
*/
|
||||
public function setSidequestSolved($sidequestId, $characterId)
|
||||
{
|
||||
$this->db->query(
|
||||
'INSERT INTO sidequests_characters '.
|
||||
'(sidequest_id, character_id, status) '.
|
||||
'VALUES '.
|
||||
'(?, ?, ?)',
|
||||
'iii',
|
||||
$sidequestId,
|
||||
$characterId,
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Mark a Quest as unsolved for a Character.
|
||||
*
|
||||
|
|
@ -238,6 +259,27 @@
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Mark a Sidequest as unsolved for a Character.
|
||||
*
|
||||
* @param int $sidequestId ID of Sidequest to mark as unsolved
|
||||
* @param int $characterId ID of Character that unsolved the Sidequest
|
||||
*/
|
||||
public function setSidequestUnsolved($sidequestId, $characterId)
|
||||
{
|
||||
$this->db->query(
|
||||
'INSERT INTO sidequests_characters '.
|
||||
'(sidequest_id, character_id, status) '.
|
||||
'VALUES '.
|
||||
'(?, ?, ?)',
|
||||
'iii',
|
||||
$sidequestId,
|
||||
$characterId,
|
||||
-1
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine if the given Character has solved the given Quest.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue