From 383aa36e540a6c8835f60c9f30fafafef4d4b489 Mon Sep 17 00:00:00 2001 From: Martin Ambrus Date: Wed, 18 Oct 2017 12:50:45 +0200 Subject: [PATCH] fix: Multihunter login can no longer build fields above level 20 --- GameEngine/Building.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/GameEngine/Building.php b/GameEngine/Building.php index d2f17e5b..38ffa364 100755 --- a/GameEngine/Building.php +++ b/GameEngine/Building.php @@ -635,8 +635,19 @@ class Building { public function isMax($id,$field,$loop=0) { $name = "bid".$id; - global $$name,$village; + global $$name,$village,$session; $dataarray = $$name; + + // special case for Multihunter login which mathematically (because of the resarray length) + // allows for building resource fields above level 20 + if ($session->tribe == 0) { + if ($village->resarray['f'.$field] == 20) { + return true; + } else { + return false; + } + } + if($id <= 4) { if($village->capital == 1) { return ($village->resarray['f'.$field] == (count($dataarray) - 1 - $loop));