Do not save arrows based on GameTimeController calculation.
This commit is contained in:
@@ -30,7 +30,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.InventoryBlockType;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@@ -964,14 +963,7 @@ public class PlayerInventory extends Inventory
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
updateItemCount(null, arrows, -1, _owner, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -30,7 +30,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.InventoryBlockType;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@@ -968,14 +967,7 @@ public class PlayerInventory extends Inventory
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
updateItemCount(null, arrows, -1, _owner, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -30,7 +30,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.InventoryBlockType;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@@ -968,14 +967,7 @@ public class PlayerInventory extends Inventory
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
updateItemCount(null, arrows, -1, _owner, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -30,7 +30,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.InventoryBlockType;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@@ -968,14 +967,7 @@ public class PlayerInventory extends Inventory
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
updateItemCount(null, arrows, -1, _owner, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -30,7 +30,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.InventoryBlockType;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@@ -968,14 +967,7 @@ public class PlayerInventory extends Inventory
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
updateItemCount(null, arrows, -1, _owner, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -30,7 +30,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.InventoryBlockType;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@@ -968,14 +967,7 @@ public class PlayerInventory extends Inventory
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
updateItemCount(null, arrows, -1, _owner, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -30,7 +30,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.InventoryBlockType;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@@ -968,14 +967,7 @@ public class PlayerInventory extends Inventory
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
updateItemCount(null, arrows, -1, _owner, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -30,7 +30,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.InventoryBlockType;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@@ -968,14 +967,7 @@ public class PlayerInventory extends Inventory
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
updateItemCount(null, arrows, -1, _owner, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -6146,12 +6146,6 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
arrows.changeCountWithoutTrace(-1, this, null);
|
||||
arrows.setLastChange(ItemInstance.MODIFIED);
|
||||
|
||||
// could do also without saving, but let's save approx 1 of 10
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
arrows.updateDatabase();
|
||||
}
|
||||
_inventory.refreshWeight();
|
||||
}
|
||||
}
|
||||
|
@@ -6043,12 +6043,6 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
arrows.changeCountWithoutTrace(-1, this, null);
|
||||
arrows.setLastChange(ItemInstance.MODIFIED);
|
||||
|
||||
// could do also without saving, but let's save approx 1 of 10
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
arrows.updateDatabase();
|
||||
}
|
||||
_inventory.refreshWeight();
|
||||
}
|
||||
}
|
||||
|
@@ -30,7 +30,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.InventoryBlockType;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@@ -968,14 +967,7 @@ public class PlayerInventory extends Inventory
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
updateItemCount(null, arrows, -1, _owner, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -30,7 +30,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.InventoryBlockType;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@@ -968,14 +967,7 @@ public class PlayerInventory extends Inventory
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
updateItemCount(null, arrows, -1, _owner, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -30,7 +30,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.InventoryBlockType;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@@ -968,14 +967,7 @@ public class PlayerInventory extends Inventory
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
updateItemCount(null, arrows, -1, _owner, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -30,7 +30,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.InventoryBlockType;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@@ -968,14 +967,7 @@ public class PlayerInventory extends Inventory
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
updateItemCount(null, arrows, -1, _owner, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -30,7 +30,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.InventoryBlockType;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@@ -968,14 +967,7 @@ public class PlayerInventory extends Inventory
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
updateItemCount(null, arrows, -1, _owner, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -30,7 +30,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.InventoryBlockType;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@@ -968,14 +967,7 @@ public class PlayerInventory extends Inventory
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
updateItemCount(null, arrows, -1, _owner, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -30,7 +30,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.InventoryBlockType;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@@ -968,14 +967,7 @@ public class PlayerInventory extends Inventory
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GameTimeController.getInstance().getGameTicks() % 10) == 0)
|
||||
{
|
||||
updateItemCount(null, arrows, -1, _owner, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
updateItemCountNoDbUpdate(null, arrows, -1, _owner, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user