diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index 792486f8..abb3585c 100755 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -35,7 +35,7 @@ class Automation { $isThere = mysql_num_rows($q); if($isThere > 0) { - header('Location: /winner.php'); + header('Location: winner.php'); }else{ ## there is no winner } diff --git a/GameEngine/Building.php b/GameEngine/Building.php index 98242098..16ce3ae0 100755 --- a/GameEngine/Building.php +++ b/GameEngine/Building.php @@ -7,7 +7,7 @@ ## Version: 22.06.2015 ## ## Filename Building.php ## ## 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 ## ## License: TravianZ Project ## ## Copyright: TravianZ (c) 2010-2015. All rights reserved. ## @@ -97,7 +97,7 @@ class Building { } } if(isset($get['buildingFinish']) && $session->plus) { - if($session->gold >= 2 && $session->sit == 0) { + if(intval($session->gold) >= 2 && $session->sit == 0) { $this->finishAll(); } } @@ -278,7 +278,7 @@ class Building { return $build; } - private function loadBuilding() { + public function loadBuilding() { global $database,$village,$session; $this->buildArray = $database->getJobs($village->wid); $this->allocated = count($this->buildArray); @@ -301,8 +301,11 @@ class Building { } } } + // echo var_dump($this->buildArray); $this->NewBuilding = true; - } + }else{ + $this->NewBuilding = false; + } } private function removeBuilding($d) { diff --git a/README b/README index b1a8b6e8..764c2248 100644 --- a/README +++ b/README @@ -138,3 +138,21 @@ TienTN changes: I found out that unx.js handle a static map size(400x400). So I fixed this with a m_c.world_max variable from mapview.tpl and changed the unx.js accordingly. 7. Fix the constructor global variable missing in Session.php + + +TPLinux Changes: +1. Fix FinishAll with two gold issue/bug +2. Fix Reload crush issue after building construction finished +3. Fix in_array bug in show more buldings in WWV +4. Fix winner redirection +5. Fix winner WW image path +6. Convert '' To ' 5 +10. Fixing Quest not appears if press (play no tasks) +11. Fix the redirection from rally point when attack is finished +12. Remove Rally point advantage +13. Fix fullscreen map in rtl layout +14. Fix divesion by Zero bug in general statics +-- diff --git a/Templates/Ajax/quest_core25.tpl b/Templates/Ajax/quest_core25.tpl index c17de09b..79922d38 100644 --- a/Templates/Ajax/quest_core25.tpl +++ b/Templates/Ajax/quest_core25.tpl @@ -40,9 +40,8 @@ if(SPEED == '1'){ } else if(SPEED <= '5'){ $skipp_time="7200"; } else if(SPEED > '5'){ - $skipp_time="3600"; + $skipp_time= 3600 / SPEED; } - if (isset($qact)){ if ($qact == $_SESSION['qst']+1 && (($_SESSION['qst']>= 1 && $_SESSION['qst']<=30) || (time()-$_SESSION['qst_time']>=0 && ($_SESSION['qst'] >= 90 && $_SESSION['qst'] <=97))) || ($_SESSION['qst']== 0 && ($qact == "enter" || $qact == "skip")) || ($qact == "rank" && ($_SESSION['qst']== 4 || $_SESSION['qst']== 18)) || ($_SESSION['qst']== 7 && $qact == "coor") || ($_SESSION['qst']== 16 && $qact == "lumber") || ($_SESSION['qst']== 19 && $qact == 23) || ($_SESSION['qst']== 22 && $qact == 26) || ($_SESSION['qst']== 27 && $qact == "gold")) { //avoid hacking gold, resources or reward -- added by Ronix - Fixed by Pietro switch($qact) { diff --git a/Templates/Build/avaliable.tpl b/Templates/Build/avaliable.tpl index 28873714..b1511277 100644 --- a/Templates/Build/avaliable.tpl +++ b/Templates/Build/avaliable.tpl @@ -171,14 +171,16 @@ $query = mysql_query("SELECT * FROM ".TB_PREFIX."vdata WHERE owner = ".$user."") while($villaggi_array = mysql_fetch_array($query)){ //loop structure village - $query1 = mysql_query("SELECT * FROM ".TB_PREFIX."fdata WHERE vref = ".$villaggi_array['wref'].""); - $strutture= mysql_fetch_array($query1); - + $query1 = mysql_query("SELECT * FROM ".TB_PREFIX."fdata WHERE vref = ".$villaggi_array['wref'].""); + $strutture= mysql_fetch_array($query1); + if($strutture == false) + $strutture = []; //search Castle in array structure village -$test = in_array(26,$strutture); +$test = in_array(26,$strutture); + if ($test){ - break; - } + break; +} } @@ -297,7 +299,10 @@ while($villaggi_array = mysql_fetch_array($query)){ $strutture= mysql_fetch_array($query1); //search Castle in array structure village -$test = in_array(26,$strutture); + if($strutture !== false) + $test = in_array(26,$strutture); + else + $test = in_array(26,[]); if ($test){ break; } @@ -466,4 +471,4 @@ function show_build_list(list) { - \ No newline at end of file + diff --git a/Templates/Building.tpl b/Templates/Building.tpl index e85be398..15585389 100644 --- a/Templates/Building.tpl +++ b/Templates/Building.tpl @@ -8,11 +8,12 @@ ## Copyright: TravianX (c) 2010-2011. All rights reserved. ## ## ## ################################################################################# +$building->loadBuilding(); ?> - +NewBuilding){ ?>
+ |
gold >= 2) {
@@ -57,3 +58,8 @@
| |
|---|



-
-
-
-
+
+
+
+Please verify the information.
It will let us know if the data is incorrect.
Please mail your username, package, order time and email used to our billing address.
- +Please verify the information.
It will let us know if the data is incorrect.
Please mail your username, package, order time and email used to our billing address.
- +Please verify the information.
It will let us know if the data is incorrect.
Please mail your username, package, order time and email used to our billing address.
- +Please verify the information.
It will let us know if the data is incorrect.
Please mail your username, package, order time and email used to our billing address.
- +Please verify the information.
It will let us know if the data is incorrect.
Please mail your username, package, order time and email used to our billing address.
- +Please verify the information.
It will let us know if the data is incorrect.
Please mail your username, package, order time and email used to our billing address.
- diff --git a/unx.js b/unx.js index f6fa7496..a755779e 100644 --- a/unx.js +++ b/unx.js @@ -1,3 +1,4 @@ +window.dlang = 'ar'; // edit it to en if fullscreen map not working var timer=new Object();var ab=new Object();var bb=new Object();var cb=db();var eb=0;var auto_reload=1;var fb=new Object();var is_opera=window.opera!==undefined;var is_ie=document.all!==undefined&&window.opera===undefined;var is_ie6p=document.compatMode!==undefined&&document.all!==undefined&&window.opera===undefined;var is_ie7=document.documentElement!==undefined&&document.documentElement.style.maxHeight!==undefined;var is_ie6=is_ie6p&&!is_ie7;var is_ff2p=window.Iterator!==undefined;var is_ff3p=document.getElementsByClassName!==undefined;var is_ff2=is_ff2p&&!is_ff3p function gb(){return hb('height');} function ib(){return hb('width');} @@ -58,15 +59,40 @@ for(i=1;;i++){pb=document.getElementById("timer"+i);if(pb!=null){bb[i]=new Objec else{break;} } executeCounter();} -function executeCounter(){for(var i in ab){wb=db()-cb;xb=rb(ab[i].counter_time+wb);ab[i].node.innerHTML=xb;} -for(i in bb){wb=db()-cb;yb=bb[i].counter_time-wb; -if(eb==0&&yb<1){eb=1;if(auto_reload==1){setTimeout("document.location.reload()",1000);} -else if(auto_reload==0){setTimeout("mreload()",1000);} -} -else{} -xb=rb(yb);bb[i].node.innerHTML=xb;} -if(eb==0){window.setTimeout("executeCounter()",1000);} +function executeCounter(){ + for(var i in ab){ + wb = db() - cb; + xb = rb(ab[i].counter_time + wb); + ab[i].node.innerHTML = xb; + } + for(i in bb){ + wb = db() - cb; + yb = bb[i].counter_time - wb; + // console.log('yb: ' + yb); + if(eb == 0 && yb < 0){ + bb[i] = null; + eb = 1; + setTimeout(function(){window.location.href = ''},1000); + } + // eb = 1; + // if(auto_reload == 1){ + // setTimeout("document.location.reload()",1000); + // } + // else if(auto_reload==0){ + // setTimeout("mreload()",1000); + // } + //} + else{ + xb=rb(yb); + bb[i].node.innerHTML = xb; + } + if(eb == 0 && yb >= 0){ + setTimeout("executeCounter()",1000); + } + } + setTimeout("executeCounter()",1000); } + function mb(zb){pb=document.getElementById(zb);if(pb!=null){fb[zb]=new Object();var $b=pb.innerHTML.match(/(\d+)\/(\d+)/);element=$b[0].split("/");_b=parseInt(element[0]);ac=parseInt(element[1]);bc=pb.title;if(bc!=0){cc=nb();timer[zb]=new Object();timer[zb].start=cc;timer[zb].production=bc;timer[zb].start_res=_b;timer[zb].max_res=ac;timer[zb].ms=3600000/bc;dc=100;if(timer[zb].ms
+
Dear Players,