forked from MagicBane/Server
More item refactor work.
This commit is contained in:
@@ -112,20 +112,20 @@ public class Kit extends AbstractGameObject {
|
||||
*/
|
||||
|
||||
private static boolean kitItemCreator(PlayerCharacter pc, int itemBase, int slot) {
|
||||
ItemBase i = ItemBase.getItemBase(itemBase);
|
||||
|
||||
Item temp = new Item(i, pc.getObjectUUID(),
|
||||
OwnerType.PlayerCharacter, (byte) 0, (byte) 0, (short) 0, (short) 0,
|
||||
false, false, ItemContainerType.EQUIPPED, (byte) slot,
|
||||
new ArrayList<>(), "");
|
||||
Item item = new Item(itemBase);
|
||||
item.ownerID = pc.getObjectUUID();
|
||||
item.ownerType = OwnerType.PlayerCharacter;
|
||||
item.containerType = ItemContainerType.EQUIPPED;
|
||||
item.equipSlot = (byte) slot;
|
||||
|
||||
try {
|
||||
temp = DbManager.ItemQueries.PERSIST(temp);
|
||||
item = DbManager.ItemQueries.PERSIST(item);
|
||||
} catch (Exception e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
if (temp == null) {
|
||||
if (item == null) {
|
||||
Logger.info("Ungoof this goof, something is wrong with our kit.");
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user