From 7fe34e2d8a00163a21995cfa65202d571bc79fae Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 25 Oct 2012 22:12:44 +0200 Subject: [PATCH] updates --- GameEngine/Building.php | 5 ++++- Templates/Build/15_1.tpl | 10 ++++++++-- build.php | 15 ++++++++------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/GameEngine/Building.php b/GameEngine/Building.php index 28b06904..19596f57 100644 --- a/GameEngine/Building.php +++ b/GameEngine/Building.php @@ -677,7 +677,6 @@ class Building { if($jobs['wid']==$village->wid){ $wwvillage = $database->getResourceLevel($jobs['wid']); if($wwvillage['f99t']!=40){ - $ww = 0; $level = $jobs['level']; if($jobs['type'] != 25 AND $jobs['type'] != 26 AND $jobs['type'] != 40) { $finish = 1; @@ -717,6 +716,10 @@ class Building { } } } + $wwvillage1 = $database->getResourceLevel($village->wid); + if($wwvillage1['f99t']!=40){ + $ww = 0; + } if($ww == 0){ $database->finishDemolition($village->wid); $technology->finishTech(); diff --git a/Templates/Build/15_1.tpl b/Templates/Build/15_1.tpl index 0ff19492..03d8edb0 100644 --- a/Templates/Build/15_1.tpl +++ b/Templates/Build/15_1.tpl @@ -31,9 +31,15 @@ if($village->resarray['f'.$id] >= DEMOLISH_LEVEL_REQ) { echo ""; echo "cancel "; echo "Demolition of ".$building->procResType($VillageResourceLevels['f'.$Demolition['buildnumber'].'t']).": ".$generator->getTimeFormat($Demolition['timetofinish']-time()).""; - ?> - Finish all construction and research orders in this village immediately for 2 Gold? + if($session->gold >= 2) { + if($session->access!=BANNED){ + ?> Finish all construction and research orders in this village immediately for 2 Gold? Finish all construction and research orders in this village immediately for 2 Gold? + "; } else { echo " diff --git a/build.php b/build.php index 15cfc81f..6b50290c 100644 --- a/build.php +++ b/build.php @@ -20,12 +20,7 @@ if(isset($_GET['newdid'])) { if($_GET['id'] == 99 && $village->natar == 0){ header("Location: dorf2.php"); } -if(isset($_GET['buildingFinish'])) { - if($session->gold >= 2) { - $building->finishAll(); - header("Location: build.php?gid=15"); - } -} + $start = $generator->pageLoadTimeStart(); $alliance->procAlliForm($_POST); $technology->procTech($_POST); @@ -311,7 +306,7 @@ $automation->isWinner();
resarray['f'.$_GET['id'].'t'].".tpl"); } + if($_GET['buildingFinish'] == 1) { + if($session->gold >= 2) { + $building->finishAll(); + header("Location: build.php?gid=15"); + } + } } }else{ header("Location: dorf1.php");