Fix reload crush bug

This commit is contained in:
TPLinux
2017-06-29 08:22:28 +00:00
committed by GitHub
parent 57928f4c3c
commit 83c26c024b
+7 -4
View File
@@ -7,7 +7,7 @@
## Version: 22.06.2015 ## ## Version: 22.06.2015 ##
## Filename Building.php ## ## Filename Building.php ##
## Developed by: Mr.php , Advocaite , brainiacX , yi12345 , Shadow , ronix ## ## Developed by: Mr.php , Advocaite , brainiacX , yi12345 , Shadow , ronix ##
## Fixed by: Shadow - STARVATION , HERO FIXED COMPL. ## ## Fixed by: Shadow - STARVATION , HERO FIXED COMPL., TPLinux ##
## Fixed by: InCube - double troops ## ## Fixed by: InCube - double troops ##
## License: TravianZ Project ## ## License: TravianZ Project ##
## Copyright: TravianZ (c) 2010-2015. All rights reserved. ## ## Copyright: TravianZ (c) 2010-2015. All rights reserved. ##
@@ -97,7 +97,7 @@ class Building {
} }
} }
if(isset($get['buildingFinish']) && $session->plus) { if(isset($get['buildingFinish']) && $session->plus) {
if(intval($session->gold) >= 2 && $session->sit == 0) { // edit by TPLinux if(intval($session->gold) >= 2 && $session->sit == 0) {
$this->finishAll(); $this->finishAll();
} }
} }
@@ -278,7 +278,7 @@ class Building {
return $build; return $build;
} }
private function loadBuilding() { public function loadBuilding() {
global $database,$village,$session; global $database,$village,$session;
$this->buildArray = $database->getJobs($village->wid); $this->buildArray = $database->getJobs($village->wid);
$this->allocated = count($this->buildArray); $this->allocated = count($this->buildArray);
@@ -301,8 +301,11 @@ class Building {
} }
} }
} }
// echo var_dump($this->buildArray);
$this->NewBuilding = true; $this->NewBuilding = true;
} }else{
$this->NewBuilding = false;
}
} }
private function removeBuilding($d) { private function removeBuilding($d) {