fix: cannot build fields and buildings

#383
This commit is contained in:
Martin Ambrus
2017-11-26 19:02:43 +01:00
parent d247e5fa27
commit cb60226297
+3 -3
View File
@@ -176,8 +176,8 @@ class Building {
// 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 @@ class Building {
$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;