mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-07 05:14:31 +00:00
fix: residence and palace being built together check did not always work
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user