/** * Stores newly created player * * @param player player to store * @return true if character was successful saved. */ public static boolean storeNewPlayer(Player player, String accountName, int accountId) { return DAOManager.getDAO(PlayerDAO.class) .saveNewPlayer(player.getCommonData(), accountId, accountName) && DAOManager.getDAO(PlayerAppearanceDAO.class).store(player) && DAOManager.getDAO(PlayerSkillListDAO.class).storeSkills(player) && DAOManager.getDAO(InventoryDAO.class).store(player.getDirtyItemsToUpdate()) && DAOManager.getDAO(PlayerTitleListDAO.class).storeTitles(player); }
/** * Stores player data into db * * @param player */ private static void storePlayer(Player player) { DAOManager.getDAO(PlayerDAO.class).storePlayer(player); DAOManager.getDAO(PlayerSkillListDAO.class).storeSkills(player); DAOManager.getDAO(PlayerSettingsDAO.class).saveSettings(player); DAOManager.getDAO(PlayerQuestListDAO.class).store(player); DAOManager.getDAO(PlayerTitleListDAO.class).storeTitles(player); DAOManager.getDAO(AbyssRankDAO.class).storeAbyssRank(player); DAOManager.getDAO(PlayerPunishmentsDAO.class).storePlayerPunishments(player); DAOManager.getDAO(InventoryDAO.class).store(player.getDirtyItemsToUpdate()); DAOManager.getDAO(ItemStoneListDAO.class).save(player); DAOManager.getDAO(MailDAO.class).storeMailbox(player); }