Value is only an override
This commit is contained in:
@@ -548,6 +548,11 @@ public class dbItemHandler extends dbHandlerBase {
|
|||||||
|
|
||||||
public boolean UPDATE_VALUE(Item item, int value) {
|
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();
|
try (Connection connection = DbManager.getConnection();
|
||||||
PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `obj_item` SET `item_value`=? WHERE `UID` = ?")) {
|
PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `obj_item` SET `item_value`=? WHERE `UID` = ?")) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user