do not achieve Achievements with reached deadline or no conditions
This commit is contained in:
parent
eabf48cf70
commit
8bba4fa516
1 changed files with 10 additions and 0 deletions
|
|
@ -165,6 +165,11 @@
|
|||
// Check conditions
|
||||
foreach($achievements as &$achievement)
|
||||
{
|
||||
// Check deadline
|
||||
if($achievement['deadline'] < date('Y-m-d H:i:s')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Get conditions
|
||||
$conditions = array();
|
||||
$progress = 0;
|
||||
|
|
@ -237,6 +242,11 @@
|
|||
break;
|
||||
}
|
||||
|
||||
// Do not achieve Achievements without conditions
|
||||
if(empty($conditions)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check conditions
|
||||
$achieved = ($achievement['all_conditions'] == 1);
|
||||
foreach($conditions as &$condition)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue