forked from MagicBane/Server
Method moved to handler. Less in Item the better.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user