mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-02 16:37:15 +00:00
Fixed a bug in the troops training
Troops can now be trained in 0 seconds.
This commit is contained in:
@@ -39,7 +39,7 @@ $dur=round(${'u'.$i}['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 1
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$dur=$generator->getTimeFormat($dur);
|
$dur=$generator->getTimeFormat($dur);
|
||||||
echo ($dur=="0:00:00")? "0:00:01":$dur;
|
echo $dur;
|
||||||
//-- If available resources combined are not enough, remove NPC button
|
//-- If available resources combined are not enough, remove NPC button
|
||||||
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ $dur=round(${'u'.$i}['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 1
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$dur=$generator->getTimeFormat($dur);
|
$dur=$generator->getTimeFormat($dur);
|
||||||
echo ($dur=="0:00:00")? "0:00:01":$dur;
|
echo $dur;
|
||||||
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
||||||
echo "|<a href=\"build.php?gid=17&t=3&r1=".((${'u'.$i}['wood'])*$technology->maxUnitPlus($i))."&r2=".((${'u'.$i}['clay'])*$technology->maxUnitPlus($i))."&r3=".((${'u'.$i}['iron'])*$technology->maxUnitPlus($i))."&r4=".((${'u'.$i}['crop'])*$technology->maxUnitPlus($i))."\" title=\"NPC trade\"><img class=\"npc\" src=\"img/x.gif\" alt=\"NPC trade\" title=\"NPC trade\" /></a>";
|
echo "|<a href=\"build.php?gid=17&t=3&r1=".((${'u'.$i}['wood'])*$technology->maxUnitPlus($i))."&r2=".((${'u'.$i}['clay'])*$technology->maxUnitPlus($i))."&r3=".((${'u'.$i}['iron'])*$technology->maxUnitPlus($i))."&r4=".((${'u'.$i}['crop'])*$technology->maxUnitPlus($i))."\" title=\"NPC trade\"><img class=\"npc\" src=\"img/x.gif\" alt=\"NPC trade\" title=\"NPC trade\" /></a>";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ for($i=4;$i<=6;$i++) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$dur=$generator->getTimeFormat($dur);
|
$dur=$generator->getTimeFormat($dur);
|
||||||
echo ($dur=="0:00:00")? "0:00:01":$dur;
|
echo $dur;
|
||||||
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) {
|
||||||
echo "|<a href=\"build.php?gid=17&t=3&r1=".((${'u'.$i}['wood'])*$technology->maxUnitPlus($i))."&r2=".((${'u'.$i}['clay'])*$technology->maxUnitPlus($i))."&r3=".((${'u'.$i}['iron'])*$technology->maxUnitPlus($i))."&r4=".((${'u'.$i}['crop'])*$technology->maxUnitPlus($i))."\" title=\"NPC trade\"><img class=\"npc\" src=\"img/x.gif\" alt=\"NPC trade\" title=\"NPC trade\" /></a>";
|
echo "|<a href=\"build.php?gid=17&t=3&r1=".((${'u'.$i}['wood'])*$technology->maxUnitPlus($i))."&r2=".((${'u'.$i}['clay'])*$technology->maxUnitPlus($i))."&r3=".((${'u'.$i}['iron'])*$technology->maxUnitPlus($i))."&r4=".((${'u'.$i}['crop'])*$technology->maxUnitPlus($i))."\" title=\"NPC trade\"><img class=\"npc\" src=\"img/x.gif\" alt=\"NPC trade\" title=\"NPC trade\" /></a>";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ for($i=15;$i<=16;$i++) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$dur=$generator->getTimeFormat($dur);
|
$dur=$generator->getTimeFormat($dur);
|
||||||
echo ($dur=="0:00:00")? "0:00:01":$dur;
|
echo $dur;
|
||||||
|
|
||||||
//-- If available resources combined are not enough, remove NPC button
|
//-- If available resources combined are not enough, remove NPC button
|
||||||
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ for($i=23;$i<=26;$i++) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$dur=$generator->getTimeFormat($dur);
|
$dur=$generator->getTimeFormat($dur);
|
||||||
echo ($dur=="0:00:00")? "0:00:01":$dur;
|
echo $dur;
|
||||||
|
|
||||||
//-- If available resources combined are not enough, remove NPC button
|
//-- If available resources combined are not enough, remove NPC button
|
||||||
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ for($i=35;$i<=36;$i++) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$dur=$generator->getTimeFormat($dur);
|
$dur=$generator->getTimeFormat($dur);
|
||||||
echo ($dur=="0:00:00")? "0:00:01":$dur;
|
echo $dur;
|
||||||
|
|
||||||
//-- If available resources combined are not enough, remove NPC button
|
//-- If available resources combined are not enough, remove NPC button
|
||||||
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ for($i=45;$i<=46;$i++) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$dur=$generator->getTimeFormat($dur);
|
$dur=$generator->getTimeFormat($dur);
|
||||||
echo ($dur=="0:00:00")? "0:00:01":$dur;
|
echo $dur;
|
||||||
echo "</div></td>
|
echo "</div></td>
|
||||||
<td class=\"val\">
|
<td class=\"val\">
|
||||||
<input type=\"text\" class=\"text\" name=\"t$i\" value=\"0\" maxlength=\"10\">
|
<input type=\"text\" class=\"text\" name=\"t$i\" value=\"0\" maxlength=\"10\">
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$dur=$generator->getTimeFormat($dur);
|
$dur=$generator->getTimeFormat($dur);
|
||||||
echo ($dur=="0:00:00")? "0:00:01":$dur;
|
echo $dur;
|
||||||
|
|
||||||
//-- If available resources combined are not enough, remove NPC button
|
//-- If available resources combined are not enough, remove NPC button
|
||||||
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ $dur=round(${'u'.$i}['time'] * ($bid25[$village->resarray['f'.$id]]['attri'] / 1
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$dur=$generator->getTimeFormat($dur);
|
$dur=$generator->getTimeFormat($dur);
|
||||||
echo ($dur=="0:00:00")? "0:00:01":$dur;
|
echo $dur;
|
||||||
//-- If available resources combined are not enough, remove NPC button
|
//-- If available resources combined are not enough, remove NPC button
|
||||||
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ $dur=round(${'u'.$i}['time'] * ($bid26[$village->resarray['f'.$id]]['attri'] / 1
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$dur=$generator->getTimeFormat($dur);
|
$dur=$generator->getTimeFormat($dur);
|
||||||
echo ($dur=="0:00:00")? "0:00:01":$dur;
|
echo $dur;
|
||||||
|
|
||||||
//-- If available resources combined are not enough, remove NPC button
|
//-- If available resources combined are not enough, remove NPC button
|
||||||
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ $dur=round(${'u'.$i}['time'] * ($bid29[$village->resarray['f'.$id]]['attri'] / 1
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$dur=$generator->getTimeFormat($dur);
|
$dur=$generator->getTimeFormat($dur);
|
||||||
echo ($dur=="0:00:00")? "0:00:01":$dur;
|
echo $dur;
|
||||||
|
|
||||||
//-- If available resources combined are not enough, remove NPC button
|
//-- If available resources combined are not enough, remove NPC button
|
||||||
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ $dur=round(${'u'.$i}['time'] * ($bid30[$village->resarray['f'.$id]]['attri'] * (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$dur=$generator->getTimeFormat($dur);
|
$dur=$generator->getTimeFormat($dur);
|
||||||
echo ($dur=="0:00:00")? "0:00:01":$dur;
|
echo $dur;
|
||||||
|
|
||||||
//-- If available resources combined are not enough, remove NPC button
|
//-- If available resources combined are not enough, remove NPC button
|
||||||
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ $dur=round(${'u'.$i}['time'] * ($bid42[$village->resarray['f'.$id]]['attri'] / 1
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$dur=$generator->getTimeFormat($dur);
|
$dur=$generator->getTimeFormat($dur);
|
||||||
echo ($dur=="0:00:00")? "0:00:01":$dur;
|
echo $dur;
|
||||||
|
|
||||||
//-- If available resources combined are not enough, remove NPC button
|
//-- If available resources combined are not enough, remove NPC button
|
||||||
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
$total_required = (int)(${'u'.$i}['wood'] + ${'u'.$i}['clay'] + ${'u'.$i}['iron'] + ${'u'.$i}['crop']);
|
||||||
|
|||||||
Reference in New Issue
Block a user