commit por garantia '-'
This commit is contained in:
Binary file not shown.
@@ -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")
|
||||
|
||||
@@ -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>
|
||||
/
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user