mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-14 16:46:08 +00:00
fix regenrate oasis troops
This commit is contained in:
@@ -4341,11 +4341,12 @@ $crannyimg = "<img src=\"".GP_LOCATE."img/g/g23.gif\" height=\"20\" width=\"15\"
|
||||
private function regenerateOasisTroops() {
|
||||
global $database;
|
||||
$time = time();
|
||||
$q = "SELECT * FROM " . TB_PREFIX . "odata where conqured = 0 and $time - lastupdated > 3600";
|
||||
$time2 = NATURE_REGTIME;
|
||||
$q = "SELECT * FROM " . TB_PREFIX . "odata where conqured = 0 and $time - lastupdated2 > $time2";
|
||||
$array = $database->query_return($q);
|
||||
foreach($array as $oasis) {
|
||||
$database->populateOasisUnits($oasis['wref'],$oasis['high']);
|
||||
$database->updateOasis($oasis['wref']);
|
||||
$database->updateOasis2($oasis['wref']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user