do not achieve Achievements with reached deadline or no conditions

This commit is contained in:
coderkun 2014-04-24 12:15:26 +02:00
commit 8bba4fa516

View file

@ -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)