Began to implement user accounts using the database

I'm mostly just testing the waters at this stage, and i've left some debug
code in. There's no way to unload, delete, etc. the accounts, but that
comes later.
This commit is contained in:
Kayne Ruse
2014-05-05 23:57:07 +10:00
parent 92fc9b4e25
commit 910e51f637
8 changed files with 174 additions and 6 deletions
+10
View File
@@ -24,7 +24,9 @@
//server specific stuff
#include "client_data.hpp"
#include "account_data.hpp"
#include "character_data.hpp"
#include "combat_instance.hpp"
//maps
#include "map_allocator.hpp"
@@ -75,6 +77,12 @@ private:
void PumpPacket(SerialPacket);
//TODO: manage the database
int CreateUserAccount(std::string username, int clientIndex);
int LoadUserAccount(std::string username, int clientIndex);
void SaveUserAccount(std::string username);
void UnloadUserAccount(std::string username);
void DeleteUserAccount(std::string username);
//TODO: combat systems
//APIs
@@ -84,7 +92,9 @@ private:
//server tables
std::map<int, ClientData> clientMap;
std::map<int, AccountData> accountMap;
std::map<int, CharacterData> characterMap;
std::map<int, CombatInstance> CombatMap;
//maps
//TODO: I need to handle multiple map objects