Method moved to handler. Less in Item the better.

This commit is contained in:
2024-03-24 08:41:53 -04:00
parent e50c519eec
commit 4fc7c90c15
2 changed files with 17 additions and 16 deletions
-15
View File
@@ -532,21 +532,6 @@ public class Item extends AbstractWorldObject {
writer.putIntAt(serialized, indexPosition);
}
public static Item createItemForPlayer(PlayerCharacter pc, int templateID) {
Item item = new Item(templateID);
item.ownerID = pc.getObjectUUID();
item.ownerType = OwnerType.PlayerCharacter;
item.containerType = ItemContainerType.INVENTORY;
try {
item = DbManager.ItemQueries.PERSIST(item);
} catch (Exception e) {
Logger.error(e);
}
return item;
}
public static Item getFromCache(int id) {
return (Item) DbManager.getFromCache(GameObjectType.Item, id);
}