fix(market): raise resource input maxlength so high-speed servers can send full convoys

The send/trade-route resource fields were capped at maxlength="5", limiting
input to 99,999 per resource. On high-speed servers a single convoy carries far
more (e.g. Teutons: 1000 x speed), so players could not fill their merchants.
Raise the cap to maxlength="9" (~1 billion), which covers any server speed.
The server already validates against available resources and merchant capacity,
so no server-side change is needed and no over-send is possible.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Ferywir
2026-06-12 16:24:47 +02:00
committed by Catalin Novgorodschi
parent 827354a622
commit dc8641c13f
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ if (isset($_GET['z'])) {
<tr>
<td class="ico"><a href="#" onClick="upd_res(<?php echo $i;?>,1); return false;"><img class="r<?php echo $i;?>" src="img/x.gif" alt="<?php echo $resNames[$i];?>" title="<?php echo $resNames[$i];?>" /></a></td>
<td class="nam"><?php echo $resNames[$i];?>:</td>
<td class="val"><input class="text" type="text" name="r<?php echo $i;?>" id="r<?php echo $i;?>" value="" maxlength="5" onKeyUp="upd_res(<?php echo $i;?>)" tabindex="<?php echo $i;?>"></td>
<td class="val"><input class="text" type="text" name="r<?php echo $i;?>" id="r<?php echo $i;?>" value="" maxlength="9" onKeyUp="upd_res(<?php echo $i;?>)" tabindex="<?php echo $i;?>"></td>
<td class="max"><a href="#" onMouseUp="add_res(<?php echo $i;?>);" onClick="return false;">(<?php echo $maxcarry;?>)</a></td>
</tr>
<?php endfor;?>
+1 -1
View File
@@ -38,7 +38,7 @@ $firstSelect = ($villages[0]?? 0) == $village->wid? 1 : 0;
<?php $icons = [1=>'1',2=>'2',3=>'3',4=>'4']; $names = [1=>LUMBER,2=>CLAY,3=>IRON,4=>CROP];
foreach ($icons as $i => $img):?>
<img src="../../<?php echo GP_LOCATE;?>img/r/<?php echo $img;?>.gif" alt="<?php echo $names[$i];?>" title="<?php echo $names[$i];?>">
<input class="text" type="text" name="r<?php echo $i;?>" id="r<?php echo $i;?>" value="" maxlength="5" tabindex="1" style="width:50px;">
<input class="text" type="text" name="r<?php echo $i;?>" id="r<?php echo $i;?>" value="" maxlength="9" tabindex="1" style="width:50px;">
<?php endforeach;?>
</td>
</tr>
+1 -1
View File
@@ -32,7 +32,7 @@ $deliveries = (int)($edited_route['deliveries']??1);
];
foreach ($res as $r):?>
<img src="../../<?php echo GP_LOCATE;?>img/r/<?php echo $r[2];?>.gif" alt="<?php echo $r[3];?>" title="<?php echo $r[3];?>">
<input class="text" type="text" name="<?php echo $r[0];?>" id="<?php echo $r[0];?>" value="<?php echo $r[1];?>" maxlength="5" tabindex="1" style="width:50px;">
<input class="text" type="text" name="<?php echo $r[0];?>" id="<?php echo $r[0];?>" value="<?php echo $r[1];?>" maxlength="9" tabindex="1" style="width:50px;">
<?php endforeach;?>
</td>
</tr>