mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-21 20:16:11 +00:00
Fixed some bugs
+Fixed a bug that selected the capital village instead of the actual village +Medals aren't given to Support/Nature/Natars/TaskMaster/Multihunteranymore +Fixed a bug in 1.tpl (dorf3.php) that showed tigers instead of traps while building traps +Some clean-up in Technology.php
This commit is contained in:
@@ -66,8 +66,7 @@ include("next.tpl");
|
||||
alt="Iron" title="<?php echo IRON; ?>" />10|</span><span><img class="r4" src="img/x.gif"
|
||||
alt="Crop" title="<?php echo CROP; ?>" />20|</span><span><img class="r5" src="img/x.gif" alt="Crop consumption"
|
||||
title="<?php echo CROP_COM; ?>" />0|<img class="clock" src="img/x.gif"
|
||||
alt="Duration" title="<?php echo DURATION; ?>" /><?php $dur=$generator->getTimeFormat(round(${'u99'}['time'] * ($bid19[$village->resarray['f'.$id]]['attri']*TRAPPER_CAPACITY / 100) / SPEED));
|
||||
echo ($dur=="0:00:00")? "0:00:01":$dur; ?></span>
|
||||
alt="Duration" title="<?php echo DURATION; ?>" /><?php echo $generator->getTimeFormat(round(($bid19[$village->resarray['f'.$id]]['attri'] / 100) * ${'u99'}['time'] / SPEED)); ?></span>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -38,11 +38,12 @@
|
||||
$bui .= '<a href="build.php?newdid='.$vid.'&id='.$b['field'].'"><img class="bau" src="img/x.gif" title="'.$building->procResType($b['type']).'" alt="'.$building->procResType($b['type']).'"></a>';
|
||||
}
|
||||
foreach($unitsArray as $key => $c){
|
||||
$gid = in_array($key, $unitsbytype['infantry'])?19:(in_array($key, $unitsbytype['cavalry'])?20:(in_array($key, $unitsbytype['siege'])?21:(in_array(($key-60), $unitsbytype['infantry'])?29:(in_array(($key-60), $unitsbytype['cavalry'])?30:($building->getTypeLevel(26)>0?26:25)))));
|
||||
if($key == 99) $key = 51;
|
||||
$gid = in_array($key, $unitsbytype['infantry'])?19:(in_array($key, $unitsbytype['cavalry'])?20:(in_array($key, $unitsbytype['siege'])?21:(in_array(($key-60), $unitsbytype['infantry'])?29:(in_array(($key-60), $unitsbytype['cavalry'])?30:($key == 51)?36:($building->getTypeLevel(26)>0?26:25)))));
|
||||
if($key > 60) { $key -= 60; }
|
||||
$tro .= '<a href="build.php?newdid='.$vid.'&gid='.$gid.'"><img class="unit u'.$key.'" src="img/x.gif" title="'.$c.'x '.$technology->getUnitName($key).'" alt="'.$c.'x '.$technology->getUnitName($key).'"></a>';
|
||||
$tro .= '<a href="build.php?newdid='.$vid.'&gid='.$gid.'"><img class="unit u'.($key == 51 ? 99 : $key).'" src="img/x.gif" title="'.$c.'x '.$technology->getUnitName($key).'" alt="'.$c.'x '.$technology->getUnitName($key).'"></a>';
|
||||
}
|
||||
if($vdata['capital'] == 1) { $class = 'hl'; } else {$class = ''; }
|
||||
if($vid == $village->wid) { $class = 'hl'; } else {$class = ''; }
|
||||
|
||||
echo '
|
||||
<tr class="'.$class.'">
|
||||
|
||||
@@ -21,7 +21,7 @@ foreach($varray as $vil){
|
||||
if($vdata['clay'] > $vdata['maxstore']) { $clay = $vdata['maxstore']; } else { $clay = $vdata['clay']; }
|
||||
if($vdata['iron'] > $vdata['maxstore']) { $iron = $vdata['maxstore']; } else { $iron = $vdata['iron']; }
|
||||
if($vdata['crop'] > $vdata['maxcrop'] ) { $crop = $vdata['maxcrop']; } else { $crop = $vdata['crop']; }
|
||||
if($vdata['capital'] == 1){$class = 'hl';}else{$class = '';}
|
||||
if($vid == $village->wid){$class = 'hl';}else{$class = '';}
|
||||
echo '
|
||||
<tr class="'.$class.'">
|
||||
<td class="vil fc"><a href="dorf1.php?newdid='.$vid.'">'.$vdata['name'].'</a></td>
|
||||
|
||||
@@ -92,7 +92,7 @@ foreach($varray as $vil){
|
||||
$percentI = floor($iron/($maxs/100));
|
||||
$percentCr = floor($crop/($maxc/100));
|
||||
|
||||
if($vdata['capital'] == 1) {$class = 'hl';} else {$class = '';}
|
||||
if($vid == $village->wid) {$class = 'hl';} else {$class = '';}
|
||||
$cr = 95; //warning percentage
|
||||
if($percentW >= $cr) {$critW = 'crit';} else {$critW = '';}
|
||||
if($percentC >= $cr) {$critC = 'crit';} else {$critC = '';}
|
||||
|
||||
@@ -26,7 +26,7 @@ foreach($varray as $vil){
|
||||
$hasCel = $database->getVillageField($vid,'celebration');
|
||||
if ($hasCel <> 0) { $timer++; }
|
||||
|
||||
if(isset($vdata) && isset($vdata['capital']) && $vdata['capital'] == 1){$class = 'hl';}else{$class = '';}
|
||||
if($vid == $village->wid){$class = 'hl';}else{$class = '';}
|
||||
|
||||
echo '<tr class="'.$class.'"><td class="vil fc"><a href="dorf1.php?newdid='.$vid.'">'.$vil['name'].'</a></td>';
|
||||
echo '<td class="cps">'.$cp.'</td>';
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<?php
|
||||
foreach($varray as $vil) {
|
||||
$vid = $vil['wref'];
|
||||
if(isset($vdata) && $vdata['capital'] == 1){$class = 'hl';}else{$class = '';}
|
||||
if($vid == $village->wid){$class = 'hl';}else{$class = '';}
|
||||
|
||||
$units = $database->getEnforceVillage($vid,1);
|
||||
array_unshift($units,$database->getUnit($vid));
|
||||
|
||||
Reference in New Issue
Block a user