Began marking changes for monsters

These changes include storing monsters on shutdown, storing dead
characters and monsters, etc. Also fleshed out the MonsterManager's
internals a bit.

(cherry picked from commit af982710f6de050c09ef503cf2f8e1c9fdd34979)
This commit is contained in:
Kayne Ruse
2015-03-24 02:01:14 +11:00
parent 5c404c572e
commit 8903b1e28d
6 changed files with 63 additions and 32 deletions
+5 -5
View File
@@ -27,7 +27,7 @@
//Define the queries
//-------------------------
static const char* CREATE_USER_ACCOUNT = "INSERT INTO Accounts (username) VALUES (?);";
static const char* CREATE_USER_ACCOUNT = "INSERT INTO UserAccounts (username) VALUES (?);";
static const char* LOAD_USER_ACCOUNT = "SELECT "
"uid, "
@@ -35,18 +35,18 @@ static const char* LOAD_USER_ACCOUNT = "SELECT "
"whitelisted, "
"mod, "
"admin "
" FROM Accounts WHERE username = ?;";
" FROM UserAccounts WHERE username = ?;";
static const char* SAVE_USER_ACCOUNT = "UPDATE OR FAIL Accounts SET "
static const char* SAVE_USER_ACCOUNT = "UPDATE OR FAIL UserAccounts SET "
"blacklisted = ?2, "
"whitelisted = ?3, "
"mod = ?4, "
"admin = ?5 "
"WHERE uid = ?1;";
static const char* DELETE_USER_ACCOUNT = "DELETE FROM Accounts WHERE uid = ?;";
static const char* DELETE_USER_ACCOUNT = "DELETE FROM UserAccounts WHERE uid = ?;";
static const char* COUNT_USER_ACCOUNT_RECORDS = "SELECT COUNT(*) FROM Accounts;";
static const char* COUNT_USER_ACCOUNT_RECORDS = "SELECT COUNT(*) FROM UserAccounts;";
//-------------------------
//Define the public methods