Skip to content

Commit

Permalink
fix: cannot build fields and buildings
Browse files Browse the repository at this point in the history
  • Loading branch information
martinambrus committed Nov 26, 2017
1 parent d247e5f commit cb60226
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions GameEngine/Building.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,16 @@ 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
(
$levels['f'.$tid.'t'] == $id ||
$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;
Expand Down

0 comments on commit cb60226

Please sign in to comment.