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