mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-01 01:54:22 +00:00
Fixed a bug in medals
Medals are now given at the right date
This commit is contained in:
@@ -2120,7 +2120,7 @@ class Automation {
|
||||
}else{
|
||||
$artefact_bouns = 1;
|
||||
}
|
||||
$foolartefact = $database->getFoolArtefactInfo(7,(isset($vid) ? $vid : 0),$session->uid);
|
||||
$foolartefact = $database->getFoolArtefactInfo(7, (isset($vid) ? $vid : 0), $DefenderID);
|
||||
if(count($foolartefact) > 0){
|
||||
foreach($foolartefact as $arte){
|
||||
if($arte['bad_effect'] == 1){
|
||||
@@ -5373,10 +5373,10 @@ class Automation {
|
||||
$newtime = time()+MEDALINTERVAL;
|
||||
$q = "UPDATE ".TB_PREFIX."config SET lastgavemedal=".(int) $newtime;
|
||||
$database->query($q);
|
||||
$row['lastgavemedal'] = time()+MEDALINTERVAL;
|
||||
}
|
||||
$time = $row['lastgavemedal'] + MEDALINTERVAL;
|
||||
if ($time < time()) $giveMedal = true;
|
||||
}elseif($row['lastgavemedal'] != 0){
|
||||
$time = $row['lastgavemedal'] + MEDALINTERVAL;
|
||||
$giveMedal = $row['lastgavemedal'] < time();
|
||||
}
|
||||
}
|
||||
|
||||
if($giveMedal && MEDALINTERVAL > 0){
|
||||
|
||||
Reference in New Issue
Block a user