Fixed some building bugs

Fixed a bug that allowed to build resource fields in the village (the previous fix was still hackable)
Fixed a bug that allowed to build everything with the master builder (even the WW)
Fixed a bug that allowed to build over the twentieth level with the master builder
Fixed a bug that allowed to build level 0 building with the master builder by removing them from the construction queue
This commit is contained in:
Pietro
2018-04-02 18:55:10 +02:00
committed by GitHub
parent a8e39468b4
commit 09ec695997
2 changed files with 44 additions and 27 deletions
+5
View File
@@ -4400,6 +4400,7 @@ References: User ID/Message ID, Mode
}
if($jobs[$i]['master'] == 1) {
$jobMaster = $i;
$level = $jobs[$i]['level'];
}
}
if(count($jobs) > 1 && ($jobs[0]['field'] == $jobs[1]['field'])) {
@@ -4432,6 +4433,10 @@ References: User ID/Message ID, Mode
if(count($jobs) > 3 && ($jobs[1]['field'] == $jobs[2]['field'] && $jobs[2]['field'] == $jobs[3]['field'])) {
$SameBuildCount = 7;
}
if(isset($jobMaster) && isset($level) && $level-1 <= 0){
$SameBuildCount = 0;
}
if($SameBuildCount > 0) {
if($SameBuildCount > 3){
if($SameBuildCount == 4 or $SameBuildCount == 5){