Package emu.grasscutter.database
Class DatabaseHelper
java.lang.Object
emu.grasscutter.database.DatabaseHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckIfAccountExists(int reservedUid) static booleancheckIfAccountExists(String name) static booleancheckIfPlayerExists(int uid) static AccountcreateAccount(String username) static AccountcreateAccountWithPassword(String username, String password) Deprecated.static AccountcreateAccountWithUid(String username, int reservedUid) static voiddeleteAccount(Account target) static voiddeleteFriendship(Friendship friendship) static booleandeleteItem(GameItem item) static booleandeleteMail(Mail mail) static booleandeleteQuest(GameMainQuest quest) static PlayergeneratePlayerUid(Player character, int reservedId) static AccountgetAccountById(String uid) static AccountgetAccountByName(String username) static AccountgetAccountByPlayerId(int playerId) static AccountgetAccountBySessionKey(String sessionKey) static AccountgetAccountByToken(String token) getAllMail(Player player) static List<GameMainQuest>getAllQuests(Player player) getAvatars(Player player) static List<Friendship>getFriends(Player player) static List<GachaRecord>getGachaRecords(int ownerId, int page, int gachaType) static List<GachaRecord>getGachaRecords(int ownerId, int page, int gachaType, int pageSize) static longgetGachaRecordsMaxPage(int ownerId, int page, int gachaType) static longgetGachaRecordsMaxPage(int ownerId, int page, int gachaType, int pageSize) getInventoryItems(Player player) static intgetNextPlayerId(int reservedId) static PlayergetPlayerByAccount(Account account) static PlayergetPlayerByUid(int id) static List<Friendship>getReverseFriends(Player player) static FriendshipgetReverseFriendship(Friendship friendship) static voidsaveAccount(Account account) static voidsaveAvatar(Avatar avatar) static voidsaveFriendship(Friendship friendship) static voidsaveGachaRecord(GachaRecord gachaRecord) static voidstatic voidstatic voidsavePlayer(Player character) static voidsaveQuest(GameMainQuest quest)
-
Constructor Details
-
DatabaseHelper
public DatabaseHelper()
-
-
Method Details
-
createAccount
-
createAccountWithUid
-
createAccountWithPassword
Deprecated. -
saveAccount
-
getAccountByName
-
getAccountByToken
-
getAccountBySessionKey
-
getAccountById
-
getAccountByPlayerId
-
checkIfAccountExists
-
checkIfAccountExists
public static boolean checkIfAccountExists(int reservedUid) -
deleteAccount
-
getAllPlayers
-
getPlayerByUid
-
getPlayerByAccount
-
checkIfPlayerExists
public static boolean checkIfPlayerExists(int uid) -
generatePlayerUid
-
getNextPlayerId
public static int getNextPlayerId(int reservedId) -
savePlayer
-
saveAvatar
-
getAvatars
-
saveItem
-
deleteItem
-
getInventoryItems
-
getFriends
-
getReverseFriends
-
saveFriendship
-
deleteFriendship
-
getReverseFriendship
-
getGachaRecords
-
getGachaRecords
-
getGachaRecordsMaxPage
public static long getGachaRecordsMaxPage(int ownerId, int page, int gachaType) -
getGachaRecordsMaxPage
public static long getGachaRecordsMaxPage(int ownerId, int page, int gachaType, int pageSize) -
saveGachaRecord
-
getAllMail
-
saveMail
-
deleteMail
-
getAllQuests
-
saveQuest
-
deleteQuest
-