diff --git a/GameEngine/Building.php b/GameEngine/Building.php index 1b1ad9ab..9864dc8a 100755 --- a/GameEngine/Building.php +++ b/GameEngine/Building.php @@ -45,13 +45,13 @@ class Building { public function residenceOfPalaceBuildInProgress() { global $database, $village; - $residenceOrPalaceInProgress = $database->getBuildingByType($village->resarray, '25, 26'); + $residenceOrPalaceInProgress = $database->getBuildingByType2($village->wid, '25, 26'); $residenceBuildInProgress = false; $palaceBuildInProgress = false; if (count($residenceOrPalaceInProgress)) { foreach ($residenceOrPalaceInProgress as $record) { - if ($record['type'] == 25) { + if ($record == 25) { $residenceBuildInProgress = true; } else { $palaceBuildInProgress = true; diff --git a/GameEngine/Database.php b/GameEngine/Database.php index 91fdd2e6..c42eb5a9 100755 --- a/GameEngine/Database.php +++ b/GameEngine/Database.php @@ -5061,7 +5061,7 @@ References: User ID/Message ID, Mode $wid = (int) $wid; if (!is_array($type)) { - $type = [(int) $type]; + $type = [$type]; } else { foreach ($type as $index => $typeValue) { $type[$index] = (int) $typeValue;