Began refactoring the server (read more)

* deleted the enemy and combat stubs
* encapsulated the character and account stubs

TODO:

* The remaining managers should be singletons
This commit is contained in:
Kayne Ruse
2014-08-13 09:45:54 +10:00
parent b6c70cbc0d
commit 6d98bab000
11 changed files with 80 additions and 429 deletions
+23 -3
View File
@@ -24,15 +24,35 @@
#include <string>
struct AccountData {
class AccountData {
public:
AccountData() = default;
~AccountData() = default;
//accessors and mutators
int SetClientIndex(int i) { return clientIndex = i; }
int GetClientIndex() { return clientIndex; }
std::string SetUsername(std::string s) { return username = s; }
std::string GetUsername() { return username; }
//database stuff
bool GetBlackListed() { return blackListed; }
bool GetWhiteListed() { return whiteListed; }
bool GetModerator() { return mod; }
bool GetAdministrator() { return admin; }
private:
friend class AccountManager;
int clientIndex;
std::string username;
//TODO: password
bool blackListed = false;
bool whiteListed = true;
bool mod = false;
bool admin = false;
int clientIndex;
};
#endif