fix: undefined indexes and variables

This commit is contained in:
Martin Ambrus
2017-10-28 02:18:00 +02:00
parent 6f7c70a0d7
commit eca2c9105c
6 changed files with 35 additions and 23 deletions
+7
View File
@@ -3577,8 +3577,15 @@ class MYSQLi_DB implements IDbConnection {
foreach($returningarray as $ret) {
if($ret['attack_type'] != 1) {
for($i = 1; $i <= 10; $i++) {
if (!isset($movingunits['u' . (($vtribe - 1) * 10 + $i)])) {
$movingunits['u' . (($vtribe - 1) * 10 + $i)] = 0;
}
$movingunits['u' . (($vtribe - 1) * 10 + $i)] += $ret['t' . $i];
}
if (!isset($movingunits['hero'])) {
$movingunits['hero'] = 0;
}
$movingunits['hero'] += $ret['t11'];
}
}