From cb60226297c0e01b36afac3da85de9caca92a18a Mon Sep 17 00:00:00 2001 From: Martin Ambrus Date: Sun, 26 Nov 2017 19:02:43 +0100 Subject: [PATCH] fix: cannot build fields and buildings #383 --- GameEngine/Building.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GameEngine/Building.php b/GameEngine/Building.php index 8ddcdad4..da5ac596 100755 --- a/GameEngine/Building.php +++ b/GameEngine/Building.php @@ -176,8 +176,8 @@ public function canProcess($id,$tid) { // let's see if we should allow building what we want where we want to // (prevent building resource fields in the village ( - ($page == 'dorf1.php' && $tid >= 1 && $tid <= 4) || - ($page == 'dorf2.php' && $tid > 4) + ($page == 'dorf1.php' && $id >= 1 && $id <= 4) || + ($page == 'dorf2.php' && $id > 4) ) && // check that we're not trying to change a standing building type ( @@ -185,7 +185,7 @@ public function canProcess($id,$tid) { $levels['f'.$tid.'t'] == 0 ) ) { - if ( !isset($_GET['master']) && $this->checkResource( $tid, $id ) != 4 ) { + if ( !isset($_GET['master']) && $this->checkResource( $id, $tid ) != 4 ) { if ( $tid >= 19 ) { header( "Location: dorf2.php" ); exit;