mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
Fixed some Automation bug
+Fixed the (in)famous "doubling troops bug", this has been the oldest bug I can remember, it lasted 7 years!!! +Reworked the whole lock system, it's more maintanable and easy to read now +Removed some useless class fields, reworked some methods that depended on them
This commit is contained in:
@@ -1567,11 +1567,8 @@ class MYSQLi_DB implements IDbConnection {
|
||||
function regenerateOasisUnits($wid, $automation = false) {
|
||||
global $autoprefix;
|
||||
|
||||
if (is_array($wid)) {
|
||||
$wid = '(' . implode('),(', $wid) . ')';
|
||||
} else {
|
||||
$wid = '(' . (int) $wid . ')';
|
||||
}
|
||||
if (is_array($wid)) $wid = '(' . implode('),(', $wid) . ')';
|
||||
else $wid = '(' . (int) $wid . ')';
|
||||
|
||||
// load the oasis regeneration (in-game) and units generation (during install) SQL file
|
||||
// and replace village IDs for the given $wid
|
||||
@@ -1582,9 +1579,7 @@ class MYSQLi_DB implements IDbConnection {
|
||||
// fetch results of the multi-query in order to allow subsequent query() and multi_query() calls to work
|
||||
while (mysqli_more_results($this->dblink) && mysqli_next_result($this->dblink)) {;}
|
||||
|
||||
if (!$result) {
|
||||
return false;
|
||||
}
|
||||
if (!$result) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user