fix: residence and palace being built together check did not always work

This commit is contained in:
Martin Ambrus
2017-11-26 14:23:01 +01:00
parent 43b7e6c9b0
commit ec81cb70b8
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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;