mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-01 08:07:14 +00:00
fix: Multihunter login can no longer build fields above level 20
This commit is contained in:
+12
-1
@@ -635,8 +635,19 @@ class Building {
|
|||||||
|
|
||||||
public function isMax($id,$field,$loop=0) {
|
public function isMax($id,$field,$loop=0) {
|
||||||
$name = "bid".$id;
|
$name = "bid".$id;
|
||||||
global $$name,$village;
|
global $$name,$village,$session;
|
||||||
$dataarray = $$name;
|
$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($id <= 4) {
|
||||||
if($village->capital == 1) {
|
if($village->capital == 1) {
|
||||||
return ($village->resarray['f'.$field] == (count($dataarray) - 1 - $loop));
|
return ($village->resarray['f'.$field] == (count($dataarray) - 1 - $loop));
|
||||||
|
|||||||
Reference in New Issue
Block a user