mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-09 21:01:00 +00:00
General fixes
+Added an image in: Natars/Artifacts spawn message, WW villages spawn message and WW building plans spawn message +Fixed a wrong time calculation when removing a building from the construction queue, if there was present a master builder order
This commit is contained in:
+12
-8
@@ -8,14 +8,18 @@
|
||||
|
||||
<p class="build_desc"><?php echo TREASURY_DESC; ?></p>
|
||||
<?php
|
||||
include("27_menu.tpl");
|
||||
if(isset($_GET['show']) && !empty($_GET['show']) && $_GET['show'] > 0) include("27_show.tpl");
|
||||
else
|
||||
{
|
||||
if(!isset($_GET['t'])) include("27_1.tpl");
|
||||
elseif(isset($_GET['t']) && $_GET['t'] == 2) include("27_2.tpl");
|
||||
elseif(isset($_GET['t']) && $_GET['t'] == 3) include("27_3.tpl");
|
||||
}
|
||||
|
||||
if($building->getTypeLevel(27) > 0){
|
||||
include("27_menu.tpl");
|
||||
if(isset($_GET['show']) && !empty($_GET['show']) && $_GET['show'] > 0) include("27_show.tpl");
|
||||
else
|
||||
{
|
||||
if(!isset($_GET['t'])) include("27_1.tpl");
|
||||
elseif(isset($_GET['t']) && $_GET['t'] == 2) include("27_2.tpl");
|
||||
elseif(isset($_GET['t']) && $_GET['t'] == 3) include("27_3.tpl");
|
||||
}
|
||||
}
|
||||
else echo '<b>'.TREASURY_COMMENCE.'</b><br>';
|
||||
include("upgrade.tpl");
|
||||
?>
|
||||
</div>
|
||||
@@ -4,8 +4,7 @@ unset($_GET['bid']);
|
||||
$bindicator = $building->canBuild($id,$bid);
|
||||
$loopsame = ($building->isCurrent($id) || $building->isLoop($id))?1:0;
|
||||
$doublebuild = ($building->isCurrent($id) && $building->isLoop($id))?1:0;
|
||||
$uprequire = $building->resourceRequired($id,$bid);
|
||||
$mastertime = $uprequire['time'];
|
||||
$uprequire = $building->resourceRequired($id, $bid);
|
||||
?>
|
||||
<td class="res">
|
||||
<img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /><?php echo $uprequire['wood']; ?> | <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /><?php echo $uprequire['clay']; ?> | <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /><?php echo $uprequire['iron']; ?> | <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /><?php echo $uprequire['crop']; ?> | <img class="r5" src="img/x.gif" alt="Crop consumption" title="Crop consumption" /><?php echo $uprequire['pop']; ?> | <img class="clock" src="img/x.gif" alt="duration" title="duration" /><?php echo $generator->getTimeFormat($uprequire['time']);
|
||||
@@ -23,7 +22,7 @@ $mastertime = $uprequire['time'];
|
||||
?> </br>
|
||||
<?php
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">Constructing with master builder </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&c=$session->checker\">Constructing with master builder </a>";
|
||||
echo '<font color="#B3B3B3">(costs: <img src="'.GP_LOCATE.'img/a/gold_g.gif" alt="Gold" title="Gold"/>1)</font>';
|
||||
}else{
|
||||
echo "<span class=\"none\">Constructing with master builder</span>";
|
||||
@@ -37,7 +36,7 @@ $mastertime = $uprequire['time'];
|
||||
?> </br>
|
||||
<?php
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">Constructing with master builder </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&c=$session->checker\">Constructing with master builder </a>";
|
||||
echo '<font color="#B3B3B3">(costs: <img src="'.GP_LOCATE.'img/a/gold_g.gif" alt="Gold" title="Gold"/>1)</font>';
|
||||
}else{
|
||||
echo "<span class=\"none\">Constructing with master builder</span>";
|
||||
@@ -61,7 +60,7 @@ $mastertime = $uprequire['time'];
|
||||
?> </br>
|
||||
<?php
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">Constructing with master builder </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&c=$session->checker\">Constructing with master builder </a>";
|
||||
echo '<font color="#B3B3B3">(costs: <img src="'.GP_LOCATE.'img/a/gold_g.gif" alt="Gold" title="Gold"/>1)</font>';
|
||||
}else{
|
||||
echo "<span class=\"none\">Constructing with master builder</span>";
|
||||
|
||||
+11
-13
@@ -9,18 +9,16 @@ if($bindicate == 1) {
|
||||
} else if($bindicate == 11) {
|
||||
echo "<p><span class=\"none\">".BUILDING_BEING_DEMOLISHED."</span></p>";
|
||||
} else {
|
||||
$loopsame = ($building->isCurrent($id) || $building->isLoop($id))?1:0;
|
||||
$doublebuild = ($building->isCurrent($id) && $building->isLoop($id))?1:0;
|
||||
$loopsame = ($building->isCurrent($id) || $building->isLoop($id)) ? 1 : 0;
|
||||
$doublebuild = ($building->isCurrent($id) && $building->isLoop($id)) ? 1 : 0;
|
||||
$master = count($database->getMasterJobsByField($village->wid,$id));
|
||||
|
||||
// master and loopsame would have duplicated level display,
|
||||
// so we need to decrease loopsame if master is the only job left
|
||||
if ($master == 1 && $loopsame == 1) {
|
||||
$loopsame = 0;
|
||||
}
|
||||
if ($master == 1 && $loopsame == 1) $loopsame = 0;
|
||||
|
||||
//-- If available resources combined are not enough, remove NPC button
|
||||
$uprequire = $building->resourceRequired($id,$village->resarray['f'.$id.'t'],1+$loopsame+$doublebuild+$master);
|
||||
$mastertime = $uprequire['time'];
|
||||
$uprequire = $building->resourceRequired($id,$village->resarray['f'.$id.'t'],1 + $loopsame + $doublebuild + $master);
|
||||
?>
|
||||
<?php
|
||||
$total_required = (int)($uprequire['wood'] + $uprequire['clay'] + $uprequire['iron'] + $uprequire['crop']);
|
||||
@@ -38,7 +36,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $villa
|
||||
<?php
|
||||
if($id <= 18) {
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">".CONSTRUCTING_MASTER_BUILDER." </a>";
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&c=$session->checker\">".CONSTRUCTING_MASTER_BUILDER." </a>";
|
||||
echo '<font color="#B3B3B3">('.COSTS.': <img src="'.GP_LOCATE.'img/a/gold_g.gif" alt="Gold" title="'.GOLD.'"/>1)</font>';
|
||||
}else{
|
||||
echo "<span class=\"none\">".CONSTRUCTING_MASTER_BUILDER."</span>";
|
||||
@@ -46,7 +44,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $villa
|
||||
}
|
||||
}else{
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">".CONSTRUCTING_MASTER_BUILDER." </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&c=$session->checker\">".CONSTRUCTING_MASTER_BUILDER." </a>";
|
||||
echo '<font color="#B3B3B3">('.COSTS.': <img src="'.GP_LOCATE.'img/a/gold_g.gif" alt="Gold" title="'.GOLD.'"/>1)</font>';
|
||||
}else{
|
||||
echo "<span class=\"none\">".CONSTRUCTING_MASTER_BUILDER."</span>";
|
||||
@@ -62,7 +60,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $villa
|
||||
<?php
|
||||
if($id <= 18) {
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">".CONSTRUCTING_MASTER_BUILDER." </a>";
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&c=$session->checker\">".CONSTRUCTING_MASTER_BUILDER." </a>";
|
||||
echo '<font color="#B3B3B3">('.COSTS.': <img src="'.GP_LOCATE.'img/a/gold_g.gif" alt="Gold" title="'.GOLD.'"/>1)</font>';
|
||||
}else{
|
||||
echo "<span class=\"none\">".CONSTRUCTING_MASTER_BUILDER."</span>";
|
||||
@@ -70,7 +68,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $villa
|
||||
}
|
||||
}else{
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">".CONSTRUCTING_MASTER_BUILDER." </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&c=$session->checker\">".CONSTRUCTING_MASTER_BUILDER." </a>";
|
||||
echo '<font color="#B3B3B3">('.COSTS.': <img src="'.GP_LOCATE.'img/a/gold_g.gif" alt="Gold" title="'.GOLD.'"/>1)</font>';
|
||||
}else{
|
||||
echo "<span class=\"none\">".CONSTRUCTING_MASTER_BUILDER."</span>";
|
||||
@@ -100,7 +98,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $villa
|
||||
<?php
|
||||
if($id <= 18) {
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">".CONSTRUCTING_MASTER_BUILDER." </a>";
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&c=$session->checker\">".CONSTRUCTING_MASTER_BUILDER." </a>";
|
||||
echo '<font color="#B3B3B3">('.COSTS.': <img src="'.GP_LOCATE.'img/a/gold_g.gif" alt="Gold" title="'.GOLD.'"/>1)</font>';
|
||||
}else{
|
||||
echo "<span class=\"none\">".CONSTRUCTING_MASTER_BUILDER."</span>";
|
||||
@@ -108,7 +106,7 @@ if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $villa
|
||||
}
|
||||
}else{
|
||||
if($session->gold >= 1 && $village->master == 0){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime&c=$session->checker\">".CONSTRUCTING_MASTER_BUILDER." </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&c=$session->checker\">".CONSTRUCTING_MASTER_BUILDER." </a>";
|
||||
echo '<font color="#B3B3B3">('.COSTS.': <img src="'.GP_LOCATE.'img/a/gold_g.gif" alt="Gold" title="'.GOLD.'"/>1)</font>';
|
||||
}else{
|
||||
echo "<span class=\"none\">".CONSTRUCTING_MASTER_BUILDER."</span>";
|
||||
|
||||
@@ -20,7 +20,6 @@ if ( $building->allowWwUpgrade() ) {
|
||||
$doublebuild = ( $building->isCurrent( $id ) && $building->isLoop( $id ) ) ? 1 : 0;
|
||||
$master = count( $database->getMasterJobsByField( $village->wid, $id ) );
|
||||
$uprequire = $building->resourceRequired( $id, $village->resarray[ 'f' . $id . 't' ], 1 + $loopsame + $doublebuild + $master );
|
||||
$mastertime = $uprequire['time'];
|
||||
?>
|
||||
<p id="contract">
|
||||
<b><?php echo COSTS_UPGRADING_LEVEL; ?> <?php echo $village->resarray[ 'f' . $id ] + 1 + $loopsame + $doublebuild + $master; ?>
|
||||
@@ -50,7 +49,7 @@ if ( $building->allowWwUpgrade() ) {
|
||||
<?php
|
||||
if ( $id <= 18 ) {
|
||||
if ( $session->gold >= 1 && $village->master == 0 ) {
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&time=$mastertime\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo '<font color="#B3B3B3">(' . COSTS . ': <img src="' . GP_LOCATE . 'img/a/gold_g.gif" alt="Gold" title="' . GOLD . '"/>1)</font>';
|
||||
} else {
|
||||
echo "<span class=\"none\">" . CONSTRUCTING_MASTER_BUILDER . "</span>";
|
||||
@@ -58,7 +57,7 @@ if ( $building->allowWwUpgrade() ) {
|
||||
}
|
||||
} else {
|
||||
if ( $session->gold >= 1 && $village->master == 0 ) {
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo '<font color="#B3B3B3">(' . COSTS . ': <img src="' . GP_LOCATE . 'img/a/gold_g.gif" alt="Gold" title="' . GOLD . '"/>1)</font>';
|
||||
} else {
|
||||
echo "<span class=\"none\">" . CONSTRUCTING_MASTER_BUILDER . "</span>";
|
||||
@@ -73,7 +72,7 @@ if ( $building->allowWwUpgrade() ) {
|
||||
<?php
|
||||
if ( $id <= 18 ) {
|
||||
if ( $session->gold >= 1 && $village->master == 0 ) {
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&time=$mastertime\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo '<font color="#B3B3B3">(' . COSTS . ': <img src="' . GP_LOCATE . 'img/a/gold_g.gif" alt="Gold" title="' . GOLD . '"/>1)</font>';
|
||||
} else {
|
||||
echo "<span class=\"none\">" . CONSTRUCTING_MASTER_BUILDER . "</span>";
|
||||
@@ -81,7 +80,7 @@ if ( $building->allowWwUpgrade() ) {
|
||||
}
|
||||
} else {
|
||||
if ( $session->gold >= 1 && $village->master == 0 ) {
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo '<font color="#B3B3B3">(' . COSTS . ': <img src="' . GP_LOCATE . 'img/a/gold_g.gif" alt="Gold" title="' . GOLD . '"/>1)</font>';
|
||||
} else {
|
||||
echo "<span class=\"none\">" . CONSTRUCTING_MASTER_BUILDER . "</span>";
|
||||
@@ -107,7 +106,7 @@ if ( $building->allowWwUpgrade() ) {
|
||||
<?php
|
||||
if ( $id <= 18 ) {
|
||||
if ( $session->gold >= 1 && $village->master == 0 ) {
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id&time=$mastertime\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo "<a class=\"build\" href=\"dorf1.php?master=$bid&id=$id\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo '<font color="#B3B3B3">(' . COSTS . ': <img src="' . GP_LOCATE . 'img/a/gold_g.gif" alt="Gold" title="' . GOLD . '"/>1)</font>';
|
||||
} else {
|
||||
echo "<span class=\"none\">" . CONSTRUCTING_MASTER_BUILDER . "</span>";
|
||||
@@ -115,7 +114,7 @@ if ( $building->allowWwUpgrade() ) {
|
||||
}
|
||||
} else {
|
||||
if ( $session->gold >= 1 && $village->master == 0 ) {
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id&time=$mastertime\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo "<a class=\"build\" href=\"dorf2.php?master=$bid&id=$id\">" . CONSTRUCTING_MASTER_BUILDER . " </a>";
|
||||
echo '<font color="#B3B3B3">(' . COSTS . ': <img src="' . GP_LOCATE . 'img/a/gold_g.gif" alt="Gold" title="' . GOLD . '"/>1)</font>';
|
||||
} else {
|
||||
echo "<span class=\"none\">" . CONSTRUCTING_MASTER_BUILDER . "</span>";
|
||||
|
||||
Reference in New Issue
Block a user