diff --git a/Admin/admin.php b/Admin/admin.php index 538939c0..a117db4c 100644 --- a/Admin/admin.php +++ b/Admin/admin.php @@ -365,7 +365,7 @@ if (!empty($_GET['p'])) { - + diff --git a/Templates/Ajax/quest_core.tpl b/Templates/Ajax/quest_core.tpl index 65f58b49..12834460 100644 --- a/Templates/Ajax/quest_core.tpl +++ b/Templates/Ajax/quest_core.tpl @@ -437,7 +437,7 @@ $woodL=$tRes['f1']+$tRes['f3']+$tRes['f14']+$tRes['f17']; if ($woodL<1){?> {"markup":"\n\t\t

\"\" <\/h1>
”<\/i>

<\/div>
<\/span><\/div>\n\t\t

<\/div>\n\t\t","number":"-1","reward":false,"qgsrc":"q_luserinfo['tribe'];?>","msrc":"","altstep":99} -{"markup":"\n\t\t

\"\" <\/h1>
”<\/i>


<\/div>
<\/a><\/span><\/div>\n\t\t

<\/div>\n\t\t","number":"-1","reward":false,"qgsrc":"q_luserinfo['tribe'];?>","msrc":"","altstep":99} +{"markup":"\n\t\t

\"\" <\/h1>
”<\/i>


<\/div>
<\/a><\/span><\/div>\n\t\t

<\/div>\n\t\t","number":"-1","reward":false,"qgsrc":"q_luserinfo['tribe'];?>","msrc":"","altstep":99,"ar":1} {"markup":"\n\t\t

\"\" <\/h1>
”<\/i>

<\/div>
<\/span><\/div>\n\t\t

<\/div>\n\t\t","number":"-1","reward":false,"qgsrc":"q_luserinfo['tribe'];?>","msrc":"","altstep":99} -{"markup":"\n\t\t

\"\" <\/h1>
”<\/i>


<\/div>
<\/a><\/span><\/div>\n\t\t

<\/div>\n\t\t","number":"-1","reward":false,"qgsrc":"q_luserinfo['tribe'];?>","msrc":"","altstep":99} +{"markup":"\n\t\t

\"\" <\/h1>
”<\/i>


<\/div>
<\/a><\/span><\/div>\n\t\t

<\/div>\n\t\t","number":"-1","reward":false,"qgsrc":"q_luserinfo['tribe'];?>","msrc":"","altstep":99,"ar":1} - - - + + + - - - + + + - - - - + + + + diff --git a/allianz.php b/allianz.php index ff02b871..fcce6fc6 100644 --- a/allianz.php +++ b/allianz.php @@ -102,9 +102,9 @@ if(isset($_GET['aid']) or isset($_GET['fid']) or isset($_GET['fid2']) or $sessio - - - + + + - - - - + + + + diff --git a/banned.php b/banned.php index 1dee3c86..ae6e932b 100644 --- a/banned.php +++ b/banned.php @@ -24,9 +24,9 @@ if($session->access == BANNED){ - - - + + + - - - + + + pageLoadTimeStart(); - - - + + + - - - + + + - - - + + + procBuild($_GET); - - - + + + - - - + + + - - - - + + + + diff --git a/manual.php b/manual.php index 765dde50..34992578 100644 --- a/manual.php +++ b/manual.php @@ -22,10 +22,10 @@ include("GameEngine/config.php"); - - - - + + + + diff --git a/packages.php b/packages.php index c8963864..45575227 100644 --- a/packages.php +++ b/packages.php @@ -24,9 +24,9 @@ if($session->access != BANNED){ - - - + + + - - - - + + + + diff --git a/plus.php b/plus.php index 33d7f8cb..ee58977e 100644 --- a/plus.php +++ b/plus.php @@ -57,9 +57,9 @@ $automation->isWinner(); - - - + + + - - - + + + - - - + + + isWinner(); - - - + + + - - - + + + isWinner(); - - - - + + + + diff --git a/todo.txt b/todo.txt index 97399541..245d053c 100644 --- a/todo.txt +++ b/todo.txt @@ -1,7 +1,5 @@ -- quest image should glow red when new task is ready to be read (now it's only red when page is refreshed) - check aliance invitation accepting - apparently it doesn't work too well on first try? - normalize forum tables - varchar is used for numeric values and is joined with int field -- task 1 => construct woodcutter will not reload the page when finished, so it would still seem that woodcutter build is in progress - it's possible to train 2 senators - when 1 is trained, another one is possible to be trained - npc shop button is missing from settlers training (palace) - should random attacks from Natars when building Wonder of the World be unit-less? diff --git a/unx.js b/unx.js index ff1caa8a..b292681f 100644 --- a/unx.js +++ b/unx.js @@ -759,24 +759,73 @@ function qst_handle(){if(quest.anmlock){return false;} quest.markup=false;if(quest.anmstep===false){fd(fi(),function(mf){for(var qd in mf){quest[qd]=mf[qd];} } );} -hi();if(quest.ar){auto_reload=quest.ar;quest.ar=undefined;} +hi(); + +if (quest.ar) { + auto_reload=quest.ar; + quest.ar=undefined; + document.location.href = (document.location.href.indexOf('#') > -1 ? document.location.href.substring(0, document.location.href.indexOf('#')) : document.location.href); +} + } function qst_wfm(){var vi=document.getElementById('popup3');if(!quest.markup||!vi){if(!quest.anmlock){window.setTimeout('qst_wfm(true)',50);} } -else{wi(quest);vi.innerHTML=quest.markup;uc();xi=false;if(quest.reward.finish&&window.bld){var yi=document.getElementById('building_contract');if(bld.length<2&&bld[0].gid==1){yi.innerHTML='';xi=0;} -else{for(var i in bld){if(bld[i].stufe==1&&bld[i].gid==1){yi.getElementsByTagName('table')[0].deleteRow(i);xi=i;break;} +else{ + wi(quest); + vi.innerHTML=quest.markup; + uc(); + xi=false; + + if(quest.reward.finish&&window.bld) { + var yi=document.getElementById('building_contract'); + if (bld.length<2 && bld[0].gid==1) { + yi.innerHTML=''; + xi=0; + } else { + for(var i in bld) { + if (bld[i].stufe==1 && bld[i].gid==1) { + yi.getElementsByTagName('table')[0].deleteRow(i); + xi=i; + break; + } + } + } + + if (xi!==false) { + var zi=$$('#t3 .rf'+bld[xi].aid)[0]; + if(zi) { + zi.removeClass('rf'+bld[xi].stufe); + zi.addClass('rf'+bld[xi].stufe+1); + } else { + $$('.f3')[0].appendChild(new Element('img',{'class':('reslevel rf'+bld[xi].aid+' level'+bld[xi].stufe),'src':'img/x.gif'})); + } + } + + quest.ar=auto_reload; + auto_reload=-1; + } + + if (quest.reward.plus) { + var of=document.getElementById('logo').className='plus'; + } + + quest.markup=false; + quest.msg=false; } + } -if(xi!==false){var zi=$$('#t3 .rf'+bld[xi].aid)[0];if(zi){zi.removeClass('rf'+bld[xi].stufe);zi.addClass('rf'+bld[xi].stufe+1);} -else{$$('.f3')[0].appendChild(new Element('img',{'class':('reslevel rf'+bld[xi].aid+' level'+bld[xi].stufe),'src':'img/x.gif'} -));} + +function qst_weiter(){ + pi(); + fd(fi(), function(mf){ + document.getElementById('popup3').innerHTML=mf.markup; + var $i=document.getElementById('qgei'); + $i.className=mf.qgsrc; + wi(mf); + uc(); + } + ); } -quest.ar=auto_reload;auto_reload=-1;} -if(quest.reward.plus){var of=document.getElementById('logo').className='plus';} -quest.markup=false;quest.msg=false;} -} -function qst_weiter(){pi();fd(fi(),function(mf){document.getElementById('popup3').innerHTML=mf.markup;var $i=document.getElementById('qgei');$i.className=mf.qgsrc;wi(mf);uc();} -);} function pi(){document.getElementById('popup3').innerHTML='';} function qst_enter(jf){if(jf===undefined){jf=false;} var id;if(jf){id={'x':document.getElementById('qst_val_x').value,'y':document.getElementById('qst_val_y').value} diff --git a/version.php b/version.php index c724852b..20529679 100644 --- a/version.php +++ b/version.php @@ -34,9 +34,9 @@ $automation->isWinner(); - - - + + + procSim($_POST); - - - + + + - - - + + +