mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-04 01:17:17 +00:00
Fixed a medals bug
+First medals will now be given on the next Sunday (at 12 PM) from the start of the server
This commit is contained in:
@@ -4576,7 +4576,7 @@ class Automation {
|
|||||||
$row = mysqli_fetch_assoc($result);
|
$row = mysqli_fetch_assoc($result);
|
||||||
$stime = strtotime(START_DATE) - strtotime(date('m/d/Y')) + strtotime(START_TIME);
|
$stime = strtotime(START_DATE) - strtotime(date('m/d/Y')) + strtotime(START_TIME);
|
||||||
if($row['lastgavemedal'] == 0 && $stime < time()){
|
if($row['lastgavemedal'] == 0 && $stime < time()){
|
||||||
$newtime = time()+MEDALINTERVAL;
|
$newtime = strtotime('next monday');
|
||||||
$q = "UPDATE ".TB_PREFIX."config SET lastgavemedal = ".(int) $newtime;
|
$q = "UPDATE ".TB_PREFIX."config SET lastgavemedal = ".(int) $newtime;
|
||||||
$database->query($q);
|
$database->query($q);
|
||||||
}elseif($row['lastgavemedal'] != 0){
|
}elseif($row['lastgavemedal'] != 0){
|
||||||
|
|||||||
Reference in New Issue
Block a user