commit por garantia '-'

This commit is contained in:
2025-06-25 03:04:40 -03:00
parent 5aec4973ec
commit 4d60b39db5
4 changed files with 8 additions and 4 deletions

Binary file not shown.

View File

@@ -440,7 +440,7 @@ func inv_use(c echo.Context) error {
return jsonSuccess(c, "você usou um item sem durabilidade")
}
menos = quantidade - 1
if menos > 1 {
if menos >= 1 {
err = updateField(fmt.Sprintf("UPDATE inv_%s SET quantidade=? WHERE id=?;", session["playerName"]), menos, itemID)
if err != nil {
return jsonError(c, http.StatusInternalServerError, "algo deu errado ao usar seu item")

View File

@@ -363,7 +363,7 @@
placeholder="quantidade"
max="100"
/>
<a id="btn" class="inv_add">add</a>
<input type="submit" id="btn" class="inv_add" value="add" />
<label>
<p id="invPA">0</p>
/

View File

@@ -70,7 +70,9 @@ function invAdd() {
xhrFields: { withCredentials: true },
success(resp) {
msg(resp.Status, resp.Message);
$("input, select").val("");
$(
"input[name='peso'], input[name='quantidade'], input[name='item_name'], select",
).val("");
$("select[name='durabilite']").val("duravel?");
},
error(resp) {
@@ -190,7 +192,9 @@ $(document).ready(function () {
});
});
$(".inv_add").click(invAdd);
$(".inv_add").on("click", function () {
invAdd();
});
setInterval(() => {
loadFicha();