From 17ab0ae696ed73e21f9c28c3bd28babf0e2ddde3 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Apr 2012 14:37:32 +0300 Subject: [PATCH] fix update spieler.php and graphic.tpl + fix edit forum for player without forum access + fix send resouces + more updates for farmlist (still not 100%) --- GameEngine/Automation.php | 4 +- GameEngine/Market.php | 6 +-- Templates/Alliance/forum.tpl | 2 + Templates/Build/16.tpl | 3 +- Templates/Build/16_99.tpl | 70 +++++++++------------------------ Templates/Profile/graphic.tpl | 4 +- Templates/goldClub/farmlist.tpl | 3 +- build.php | 20 ++++++++++ spieler.php | 5 ++- 9 files changed, 56 insertions(+), 61 deletions(-) diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index e4a47343..52ae3bde 100644 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -1742,8 +1742,10 @@ private function loyaltyRegeneration() { if($data['t11'] > 0){ if ($isoasis != 0) { if ($database->canConquerOasis($data['from'],$data['to'])) { + if($unitssend_def[1] == '0,0,0,0,0,0,0,0,0,0' and $unitssend_def[2] == '0,0,0,0,0,0,0,0,0,0' and $unitssend_def[3] == '0,0,0,0,0,0,0,0,0,0' and $unitssend_def[4] == '0,0,0,0,0,0,0,0,0,0' and $unitssend_def[5] == '0,0,0,0,0,0,0,0,0,0'){ $database->conquerOasis($data['from'],$data['to']); - $info_chief = $hero_pic.",Your hero has conquered this oasis and gained ".$heroxp." XP"; + $info_chief = $hero_pic.",Your hero has conquered this oasis"; + } } else { $OasisInfo = $database->getOasisInfo($data['to']); if ($OasisInfo['conqured'] != 0) { diff --git a/GameEngine/Market.php b/GameEngine/Market.php index df75ae0b..da793072 100644 --- a/GameEngine/Market.php +++ b/GameEngine/Market.php @@ -107,7 +107,7 @@ class Market { $timetaken = $generator->procDistanceTime($coor,$village->coor,$session->tribe,0); $reference = $database->sendResource($resource[0],$resource[1],$resource[2],$resource[3],$reqMerc,0); $database->modifyResource($village->wid,$resource[0],$resource[1],$resource[2],$resource[3],0); - $database->addMovement(0,$village->wid,$id,$reference,time()+$timetaken); + $database->addMovement(0,$village->wid,$id,$reference,time(),time()+$timetaken); $logging->addMarketLog($village->wid,1,array($resource[0],$resource[1],$resource[2],$resource[3],$id)); } } @@ -169,8 +169,8 @@ class Market { $mytime = $generator->procDistanceTime($hiscoor,$village->coor,$session->tribe,0); $targettribe = $database->getUserField($database->getVillageField($infoarray['vref'],"owner"),"tribe",0); $histime = $generator->procDistanceTime($village->coor,$hiscoor,$targettribe,0); - $database->addMovement(0,$village->wid,$infoarray['vref'],$mysendid,$mytime+time()); - $database->addMovement(0,$infoarray['vref'],$village->wid,$hissendid,$histime+time()); + $database->addMovement(0,$village->wid,$infoarray['vref'],$mysendid,time(),$mytime+time()); + $database->addMovement(0,$infoarray['vref'],$village->wid,$hissendid,time(),$histime+time()); $resource = array(1=>0,0,0,0); $resource[$infoarray['wtype']] = $infoarray['wamt']; $database->modifyResource($village->wid,$resource[1],$resource[2],$resource[3],$resource[4],0); diff --git a/Templates/Alliance/forum.tpl b/Templates/Alliance/forum.tpl index f05382f5..f1665f3c 100644 --- a/Templates/Alliance/forum.tpl +++ b/Templates/Alliance/forum.tpl @@ -76,6 +76,7 @@ if(!isset($_GET['admin'])) { $_GET['admin'] = null; } if($_GET['admin']== "switch_admin"){ +if($opt['opt5'] == 1){ if($database->CheckResultEdit($aid) != 1){ $database->CreatResultEdit($aid,1); }else{ @@ -86,6 +87,7 @@ if($_GET['admin']== "switch_admin"){ } } } +} if($_GET['admin']== "pin"){ $database->StickTopic($_GET[idt],1); // stick topic } diff --git a/Templates/Build/16.tpl b/Templates/Build/16.tpl index 4cfc8f6a..d6985289 100644 --- a/Templates/Build/16.tpl +++ b/Templates/Build/16.tpl @@ -7,9 +7,10 @@
Overview | Send troops | - Combat Simulator
goldclub==1){ ?>| + Combat Simulator goldclub==1){ ?>| Farmlist + getMovement("34",$village->wid,1); diff --git a/Templates/Build/16_99.tpl b/Templates/Build/16_99.tpl index 00a4e3d8..1a54a0d4 100644 --- a/Templates/Build/16_99.tpl +++ b/Templates/Build/16_99.tpl @@ -1,58 +1,24 @@ -
-
- -

Camp level resarray['f'.$id]; ?>

-

Your village troops are gathered in this place. From here you can send them to plunder, raid, or conquer other villages are supported.

+goldclub) { + include "Templates/Build/16.tpl"; + }else{ +?> +
+

Rally point level resarray['f'.$id]; ?>

+

Your village's troops meet here. From here you can send them out to conquer, raid or reinforce other villages.

- -
-
-
 
-
 
- -
- -
-
 
-
 
- -
- -
-
 
-
 
- -
- -
-
 
-
 
- -
+
+ Overview | + Send troops | + Combat Simulator goldclub==1){ ?>| + Farmlist +
- goldclub) { ?> -
-
-
-
-
-
-
-
-
-
-
-
-
Gold Club is one of our farm list and need to pay another fee to activate it.
-
-
-
- Gets Gold Club members -
- +
-
\ No newline at end of file + \ No newline at end of file diff --git a/Templates/Profile/graphic.tpl b/Templates/Profile/graphic.tpl index d1886224..d069d2bb 100644 --- a/Templates/Profile/graphic.tpl +++ b/Templates/Profile/graphic.tpl @@ -100,5 +100,7 @@ $database->updateUserField($session->uid,gpack,$_POST["custom_url"],1); uid); + } ?> \ No newline at end of file diff --git a/Templates/goldClub/farmlist.tpl b/Templates/goldClub/farmlist.tpl index e2fa78a2..84826812 100644 --- a/Templates/goldClub/farmlist.tpl +++ b/Templates/goldClub/farmlist.tpl @@ -291,8 +291,9 @@ for($i=$start;$i<=$end;$i++){
+
- ایجاد لیست جدید + » create new list
procTechno($_GET); } } +if($session->goldclub){ + if(isset($_GET['t'])==99) { + + if($_GET['action'] == 'addList') { + include("Templates/goldClub/farmlist_add.tpl"); + } + if($_GET['action'] == 'showSlot' && $_GET['lid']) { + include("Templates/goldClub/farmlist_addraid.tpl"); + }elseif($_GET['action'] == 'showSlot' && $_GET['eid']) { + include("Templates/goldClub/farmlist_editraid.tpl"); + } + if($_GET['action'] == 'deleteList') { + $database->delFarmList($_GET['lid'], $session->uid); + header("Location: build.php?id=39&t=99"); + }elseif($_GET['action'] == 'deleteSlot') { + $database->delSlotFarm($_GET['eid']); + header("Location: build.php?id=39&t=99"); + } + } + } if (isset($_POST['a']) == 533374 && isset($_POST['id']) == 39){ $units->Settlers($_POST); diff --git a/spieler.php b/spieler.php index e064e1f5..f9e619d1 100644 --- a/spieler.php +++ b/spieler.php @@ -146,8 +146,9 @@ else if (isset($_GET['s'])) { if($_GET['s'] == 4) { include("Templates/Profile/graphic.tpl"); } -}else{ -header("Location: ".$_SERVER['PHP_SELF']."?uid=".$session->uid); + if($_GET['s'] > 4) { + header("Location: ".$_SERVER['PHP_SELF']."?uid=".$session->uid); + } } ?>