Minor tweaks, prepping for a merge
This commit is contained in:
@@ -76,13 +76,15 @@ private:
|
||||
//TODO: a function that only sends to characters in a certain proximity
|
||||
void PumpPacket(SerialPacket);
|
||||
|
||||
//TODO: manage the database
|
||||
//Account management
|
||||
int CreateUserAccount(std::string username, int clientIndex);
|
||||
int LoadUserAccount(std::string username, int clientIndex);
|
||||
int SaveUserAccount(int uid);
|
||||
void UnloadUserAccount(int uid);
|
||||
void DeleteUserAccount(int uid);
|
||||
|
||||
//TODO: character management
|
||||
|
||||
//TODO: combat systems
|
||||
|
||||
//APIs
|
||||
@@ -94,7 +96,7 @@ private:
|
||||
std::map<int, ClientData> clientMap;
|
||||
std::map<int, AccountData> accountMap;
|
||||
std::map<int, CharacterData> characterMap;
|
||||
std::map<int, CombatInstance> CombatMap;
|
||||
std::map<int, CombatInstance> combatMap;
|
||||
|
||||
//maps
|
||||
//TODO: I need to handle multiple map objects
|
||||
|
||||
@@ -46,15 +46,12 @@ void ServerApplication::HandleJoinRequest(SerialPacket packet) {
|
||||
ClientData newClient;
|
||||
newClient.address = packet.meta.srcAddress;
|
||||
|
||||
//debug
|
||||
//load the user account
|
||||
int uid = LoadUserAccount(packet.clientInfo.username, ClientData::uidCounter);
|
||||
if (uid < 0) {
|
||||
std::cerr << "Error: Account already loaded: " << uid << std::endl;
|
||||
return;
|
||||
}
|
||||
accountMap[uid].blackListed = true;
|
||||
accountMap[uid].whiteListed = false;
|
||||
SaveUserAccount(uid);
|
||||
|
||||
//TODO: move this into the character management code
|
||||
//create the new character
|
||||
|
||||
Reference in New Issue
Block a user