mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-07 13:24:22 +00:00
Fixed trap bugs
+Released troops will now return to their respective villages correctly, (allied or own villages) +Fixed "Released X of own troops" and "Released X of friendly troops" texts, they'll now match the correct amount of own/friendly released troops. +Fixed a bug that didn't permit to release troops in the first attack or if in the attacked village there were prisoners from more than one village +Corrected a wrong stolen resources calculation +Minor improovements and bug fixing
This commit is contained in:
@@ -7695,7 +7695,7 @@ References: User ID/Message ID, Mode
|
||||
return mysqli_query($this->dblink,$q);
|
||||
}
|
||||
|
||||
function getPrisoners($wid,$mode=0, $use_cache = true) {
|
||||
function getPrisoners($wid,$mode = 0, $use_cache = true) {
|
||||
$array_passed = is_array($wid);
|
||||
$mode = (int) $mode;
|
||||
|
||||
@@ -7751,12 +7751,12 @@ References: User ID/Message ID, Mode
|
||||
self::$prisonersCache[$wid[0].$mode] = (count($result) ? [$result] : []);
|
||||
} else {
|
||||
if ($result && count($result)) {
|
||||
if (!isset(self::$prisonersCache[ $record[ ( $mode ? 'from' : 'wref' ) ] . $mode ])) {
|
||||
self::$prisonersCache[ $record[ ( $mode ? 'from' : 'wref' ) ] . $mode ] = [];
|
||||
if (!isset(self::$prisonersCache[$record[($mode ? 'from' : 'wref')].$mode])) {
|
||||
self::$prisonersCache[$record[($mode ? 'from' : 'wref' )].$mode] = [];
|
||||
}
|
||||
|
||||
foreach ( $result as $record ) {
|
||||
self::$prisonersCache[ $record[ ( $mode ? 'from' : 'wref' ) ] . $mode ][] = $record;
|
||||
foreach ($result as $record) {
|
||||
self::$prisonersCache[$record[($mode ? 'from' : 'wref')].$mode][] = $record;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user