Bug: When saving new item in Unique Item Editor, item code is saved as 'Array' from PHP, so I need to generate an item code that hasn't been used already.

tabs/UniqueItems.php, add code input field.
app.js, add 'code' input field change function

Fixed
This commit is contained in:
Hash Borgir 2023-05-30 14:49:13 -06:00
parent 64bd1caa03
commit 87a9ca1658
2 changed files with 11 additions and 1 deletions

View File

@ -186,7 +186,9 @@ $(document).ready(function () {
$("input[name='index']").keyup(function () { $("input[name='index']").keyup(function () {
$(".itemindex").html($(this).val()); $(".itemindex").html($(this).val());
}); });
$("input[name='code']").keyup(function () {
$(".itemcode").html("Item Code: (" + $(this).val() + ")");
});
$('input[name="lvl"]').keyup(function () { $('input[name="lvl"]').keyup(function () {
$(".itemlvl").html("Level: " + $(this).val()); $(".itemlvl").html("Level: " + $(this).val());
}); });

View File

@ -118,6 +118,14 @@
</span> </span>
<span class="form-text">Index: the ID pointer that is referenced by the game in TreasureClassEx.txt and CubeMain.txt, this column also contains the string-key used in the TBL files.</span> <span class="form-text">Index: the ID pointer that is referenced by the game in TreasureClassEx.txt and CubeMain.txt, this column also contains the string-key used in the TBL files.</span>
</div> </div>
<div class="col-2" style="background: #fec;">
<p>Code</p>
<div class="input-group">
<input name="code" type="text" aria-describedby="codeHelpBlock" required="required" class="form-control input-ucode">
</div><span class="help"><i class="fa fa-question-circle" aria-hidden="true"></i>
</span>
<span class="form-text">Enter a 3 or 4 letter unique item code</span>
</div>
<div class="col-2" style="background: #eed;"> <div class="col-2" style="background: #eed;">