tribe - 1) * 10 + 1; $end = $session->tribe * 10; $level = (int)$village->resarray['f'.$id]; $horseDrinking = $building->getTypeLevel(41); $success = 0; for ($i = $start; $i <= $end; $i++): // FIX (triburi noi): Great Stable antreneaza DOAR cavaleria tribului, la fel // ca Stable-ul normal (20_train.tpl). Filtrul generic $unitsbytype['cavalry'] // acopera si triburile 6-9; vechea excludere 3/13/14 lasa sa treaca toate // unitatile (infanterie, berbeci, catapulte). if (!in_array($i, $unitsbytype['cavalry'])) continue; if (!$technology->getTech($i)) continue; $success++; $unit = ${'u'.$i}; $costWood = (int)$unit['wood'] * 3; $costClay = (int)$unit['clay'] * 3; $costIron = (int)$unit['iron'] * 3; $costCrop = (int)$unit['crop'] * 3; $pop = (int)$unit['pop'] - ($horseDrinking >= 1 ? 1 : 0); $available = (int)$village->unitarray['u'.$i]; $max = $technology->maxUnit($i, true); $maxPlus = $technology->maxUnitPlus($i); $speedMod = $bid30[$level]['attri'] / 100; if ($horseDrinking >= 1) $speedMod *= (1 / $bid41[$horseDrinking]['attri']); $time = $database->getArtifactsValueInfluence($session->uid, $village->wid, 5, round($unit['time'] * $speedMod / SPEED)); $totalRequired = (int)($unit['wood'] + $unit['clay'] + $unit['iron'] + $unit['crop']); $showNpc = $session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $totalRequired; ?>
<?php echo $technology->getUnitName($i);?> getUnitName($i);?> (: )
| | | | | getTimeFormat($time);?> |<?php echo NPC_TRADE; ?>
()