Browse Source

Value is only an override

combat-2
MagicBot 8 months ago
parent
commit
54cd1c59f7
  1. 5
      src/engine/db/handlers/dbItemHandler.java

5
src/engine/db/handlers/dbItemHandler.java

@ -548,6 +548,11 @@ public class dbItemHandler extends dbHandlerBase { @@ -548,6 +548,11 @@ public class dbItemHandler extends dbHandlerBase {
public boolean UPDATE_VALUE(Item item, int value) {
// Write 0 if we will not modify the value from template
if (item.value == item.template.item_value)
value = 0;
try (Connection connection = DbManager.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `obj_item` SET `item_value`=? WHERE `UID` = ?")) {

Loading…
Cancel
Save