mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-14 07:11:02 +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{
|
}else{
|
||||||
$artefact_bouns = 1;
|
$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){
|
if(count($foolartefact) > 0){
|
||||||
foreach($foolartefact as $arte){
|
foreach($foolartefact as $arte){
|
||||||
if($arte['bad_effect'] == 1){
|
if($arte['bad_effect'] == 1){
|
||||||
@@ -5373,10 +5373,10 @@ class Automation {
|
|||||||
$newtime = time()+MEDALINTERVAL;
|
$newtime = time()+MEDALINTERVAL;
|
||||||
$q = "UPDATE ".TB_PREFIX."config SET lastgavemedal=".(int) $newtime;
|
$q = "UPDATE ".TB_PREFIX."config SET lastgavemedal=".(int) $newtime;
|
||||||
$database->query($q);
|
$database->query($q);
|
||||||
$row['lastgavemedal'] = time()+MEDALINTERVAL;
|
}elseif($row['lastgavemedal'] != 0){
|
||||||
}
|
$time = $row['lastgavemedal'] + MEDALINTERVAL;
|
||||||
$time = $row['lastgavemedal'] + MEDALINTERVAL;
|
$giveMedal = $row['lastgavemedal'] < time();
|
||||||
if ($time < time()) $giveMedal = true;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($giveMedal && MEDALINTERVAL > 0){
|
if($giveMedal && MEDALINTERVAL > 0){
|
||||||
|
|||||||
Reference in New Issue
Block a user