fix regenrate oasis troops

This commit is contained in:
yi12345
2013-07-23 01:11:37 +03:00
parent f1157b588d
commit 33730f5cbb
4 changed files with 20 additions and 6 deletions
+3 -2
View File
@@ -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']);
}
}