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
@@ -35,7 +35,7 @@
//NOTE: Programmer set variables are NOT zero-indexed
//NOTE: SQLite3 returned variables (i.e. loading) ARE zero-indexed
static const char* CREATE_CHARACTER = "INSERT INTO Characters ("
static const char* CREATE_CHARACTER = "INSERT INTO LiveCharacters ("
"owner, "
"handle, "
"avatar, "
@@ -57,9 +57,9 @@ static const char* LOAD_CHARACTER = "SELECT "
"boundsY, "
"boundsW, "
"boundsH "
"FROM Characters WHERE handle = ?;";
"FROM LiveCharacters WHERE handle = ?;";
static const char* SAVE_CHARACTER = "UPDATE OR FAIL Characters SET "
static const char* SAVE_CHARACTER = "UPDATE OR FAIL LiveCharacters SET "
"roomIndex = ?2, "
"originX = ?3, "
"originY = ?4, "
@@ -69,9 +69,9 @@ static const char* SAVE_CHARACTER = "UPDATE OR FAIL Characters SET "
"boundsH = ?8 "
"WHERE uid = ?1;";
static const char* DELETE_CHARACTER = "DELETE FROM Characters WHERE uid = ?;";
static const char* DELETE_CHARACTER = "DELETE FROM LiveCharacters WHERE uid = ?;";
static const char* COUNT_CHARACTER_RECORDS = "SELECT COUNT(*) FROM Characters;";
static const char* COUNT_CHARACTER_RECORDS = "SELECT COUNT(*) FROM LiveCharacters;";
//-------------------------
//Define the methods