mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-04 22:40:05 +00:00
Reimplement DB functions 2/2
implemented getCharInfo implemented delete character implemented evaluateCustomName implemented name change function implemented getPlayer function implemented functions for buddies implemented emails
This commit is contained in:
parent
eeb3b1ee61
commit
31ac9d2e3b
1288
src/Database.cpp
1288
src/Database.cpp
File diff suppressed because it is too large
Load Diff
@ -85,7 +85,6 @@ namespace Database {
|
|||||||
bool finishTutorial(int playerID);
|
bool finishTutorial(int playerID);
|
||||||
// returns slot number
|
// returns slot number
|
||||||
int deleteCharacter(int characterID, int userID);
|
int deleteCharacter(int characterID, int userID);
|
||||||
std::vector <Player> getCharacters(int userID);
|
|
||||||
std::vector <sP_LS2CL_REP_CHAR_INFO> getCharInfo(int userID);
|
std::vector <sP_LS2CL_REP_CHAR_INFO> getCharInfo(int userID);
|
||||||
// accepting/declining custom name
|
// accepting/declining custom name
|
||||||
enum class CustomName {
|
enum class CustomName {
|
||||||
@ -93,10 +92,10 @@ namespace Database {
|
|||||||
DISAPPROVE = 2
|
DISAPPROVE = 2
|
||||||
};
|
};
|
||||||
void evaluateCustomName(int characterID, CustomName decision);
|
void evaluateCustomName(int characterID, CustomName decision);
|
||||||
void changeName(sP_CL2LS_REQ_CHANGE_CHAR_NAME* save);
|
bool changeName(sP_CL2LS_REQ_CHANGE_CHAR_NAME* save, int accountId);
|
||||||
|
|
||||||
// getting players
|
// getting players
|
||||||
Player getPlayer(int id);
|
void getPlayer(Player* plr, int id);
|
||||||
|
|
||||||
void updatePlayer(Player *player);
|
void updatePlayer(Player *player);
|
||||||
void updateInventory(Player *player);
|
void updateInventory(Player *player);
|
||||||
@ -104,11 +103,8 @@ namespace Database {
|
|||||||
void updateQuests(Player* player);
|
void updateQuests(Player* player);
|
||||||
void updateBuddies(Player* player);
|
void updateBuddies(Player* player);
|
||||||
|
|
||||||
void getInventory(Player* player);
|
|
||||||
void removeExpiredVehicles(Player* player);
|
void removeExpiredVehicles(Player* player);
|
||||||
void getNanos(Player* player);
|
|
||||||
void getQuests(Player* player);
|
|
||||||
void getBuddies(Player* player);
|
|
||||||
int getNumBuddies(Player* player);
|
int getNumBuddies(Player* player);
|
||||||
|
|
||||||
// buddies
|
// buddies
|
||||||
|
@ -17,7 +17,6 @@ struct Player {
|
|||||||
int64_t SerialKey;
|
int64_t SerialKey;
|
||||||
int32_t iID;
|
int32_t iID;
|
||||||
uint64_t FEKey;
|
uint64_t FEKey;
|
||||||
time_t creationTime;
|
|
||||||
|
|
||||||
int level;
|
int level;
|
||||||
int HP;
|
int HP;
|
||||||
@ -45,7 +44,6 @@ struct Player {
|
|||||||
uint64_t instanceID;
|
uint64_t instanceID;
|
||||||
sItemBase Equip[AEQUIP_COUNT];
|
sItemBase Equip[AEQUIP_COUNT];
|
||||||
sItemBase Inven[AINVEN_COUNT];
|
sItemBase Inven[AINVEN_COUNT];
|
||||||
sItemBase Bank[ABANK_COUNT];
|
|
||||||
sItemTrade Trade[12];
|
sItemTrade Trade[12];
|
||||||
int32_t moneyInTrade;
|
int32_t moneyInTrade;
|
||||||
bool isTrading;
|
bool isTrading;
|
||||||
|
Loading…
Reference in New Issue
Block a user