General fixes

+Fixed a bug that permitted to see troops movement with a 0 level rally
point
+Fixed a bug that permitted to send attacks, enforcements, etc. with a 0
level rally point
+Fixed a bug that counted the moral bonus for attacks against WW
villages
+Fixed a bug that didn't permit to finish all buildings/researches, etc.
without a plus account
+Recoded part of Natars timer for being more generic
+Natars/Artifacts spawn, WW villages spawn, WW building plans spawn are
now based on the start date of the server and not on the installation
date
+Better indentation of some code
This commit is contained in:
iopietro
2018-05-18 15:46:15 +02:00
parent e5d823cda0
commit 0322a0ae49
10 changed files with 578 additions and 622 deletions
+4 -4
View File
@@ -200,7 +200,7 @@ class Building {
$this->constructBuilding($get['id'], $get['a']);
}
}
elseif(isset($get['buildingFinish']) && $session->plus && intval($session->gold) >= 2 && $session->sit == 0) $this->finishAll();
elseif(isset($get['buildingFinish']) && $session->gold >= 2 && $session->sit == 0) $this->finishAll();
}
public function canBuild($id, $tid) {
@@ -762,9 +762,9 @@ class Building {
}
public function finishAll($redirect_url = '') {
global $database,$session,$logging,$village,$bid18,$bid10,$bid11,$technology,$_SESSION;
global $database, $session, $logging, $village, $bid18, $bid10, $bid11, $technology, $_SESSION;
if ($session->access!=BANNED) {
if ($session->access != BANNED) {
// will be true if we should decrease player's gold by 2
// for the immediate completion action
$countPlus2Gold = false;
@@ -779,7 +779,7 @@ class Building {
$deletIDs = [];
foreach ($this->buildArray as $jobs) {
if ($jobs['wid']==$village->wid) {
if ($jobs['wid'] == $village->wid) {
$wwvillage = $database->getResourceLevel($jobs['wid']);
if ($wwvillage['f99t'] != 40) {
$level = $jobs['level'];