fix regenerate oasis troops (tested and it works)

This commit is contained in:
yi12345
2013-08-12 22:12:54 +03:00
parent 1e8d1e3dc2
commit 2075515208
3 changed files with 36 additions and 28 deletions
+2 -2
View File
@@ -4340,11 +4340,11 @@ $crannyimg = "<img src=\"".GP_LOCATE."img/g/g23.gif\" height=\"20\" width=\"15\"
global $database;
$time = time();
$time2 = NATURE_REGTIME;
$q = "SELECT * FROM " . TB_PREFIX . "odata where conqured = 0 and $time - lastupdated2 > $time2";
$q = "SELECT * FROM " . TB_PREFIX . "odata where conqured = 0 and lastupdated2 + $time2 < $time";
$array = $database->query_return($q);
foreach($array as $oasis) {
$database->populateOasisUnits($oasis['wref'],$oasis['high']);
$database->updateOasis2($oasis['wref']);
$database->updateOasis2($oasis['wref'], $time2);
}
}