diff options
| author | linencloth <none@none> | 2010-12-26 04:16:18 +0100 |
|---|---|---|
| committer | linencloth <none@none> | 2010-12-26 04:16:18 +0100 |
| commit | b150172521636fa5646489688e53d03f0773b9be (patch) | |
| tree | b078947617c1deead6699123567e8beabdb2477b /src/server/shared/Database | |
| parent | 8fdbe7c4e69f5b0a8eb907aa76cc2afd2b297cd3 (diff) | |
Core/QuestStatus:
- Separate rewarded quests from active quests, and store them in a new table to reduce database size
- Drop the no longer needed `rewarded` column from character_queststatus for smaller table size
- Prevent filling the database with dropped quests
- Delete useless records
- Implement queststatus save "queues" instead of states
- Minor optimizations
WARNING: Backup your database!
--HG--
branch : trunk
Diffstat (limited to 'src/server/shared/Database')
| -rwxr-xr-x | src/server/shared/Database/Implementation/CharacterDatabase.cpp | 5 | ||||
| -rwxr-xr-x | src/server/shared/Database/Implementation/CharacterDatabase.h | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.cpp b/src/server/shared/Database/Implementation/CharacterDatabase.cpp index 598223415c0..9189e33ffb8 100755 --- a/src/server/shared/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/shared/Database/Implementation/CharacterDatabase.cpp @@ -60,7 +60,7 @@ bool CharacterDatabaseConnection::Open() PrepareStatement(CHAR_LOAD_PLAYER_AURAS, "SELECT caster_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, " "base_amount0, base_amount1, base_amount2, maxduration, remaintime, remaincharges FROM character_aura WHERE guid = ?", true); PrepareStatement(CHAR_LOAD_PLAYER_SPELLS, "SELECT spell, active, disabled FROM character_spell WHERE guid = ?", true); - PrepareStatement(CHAR_LOAD_PLAYER_QUESTSTATUS, "SELECT quest, status, rewarded, explored, timer, mobcount1, mobcount2, mobcount3, mobcount4, " + PrepareStatement(CHAR_LOAD_PLAYER_QUESTSTATUS, "SELECT quest, status, explored, timer, mobcount1, mobcount2, mobcount3, mobcount4, " "itemcount1, itemcount2, itemcount3, itemcount4 FROM character_queststatus WHERE guid = ?", true); PrepareStatement(CHAR_LOAD_PLAYER_DAILYQUESTSTATUS, "SELECT quest, time FROM character_queststatus_daily WHERE guid = ?", true); PrepareStatement(CHAR_LOAD_PLAYER_WEKLYQUESTSTATUS, "SELECT quest FROM character_queststatus_weekly WHERE guid = ?", true); @@ -88,6 +88,7 @@ bool CharacterDatabaseConnection::Open() PrepareStatement(CHAR_LOAD_PLAYER_RANDOMBG, "SELECT guid FROM character_battleground_random WHERE guid = ?", true); PrepareStatement(CHAR_LOAD_PLAYER_ARENASTATS, "SELECT slot, personal_rating, matchmaker_rating FROM character_arena_stats WHERE guid = ? ORDER BY slot ASC", true); PrepareStatement(CHAR_LOAD_PLAYER_BANNED, "SELECT guid FROM character_banned WHERE guid = ? AND active = 1", true); + PrepareStatement(CHAR_LOAD_PLAYER_QUESTSTATUSREW, "SELECT quest FROM character_queststatus_rewarded WHERE guid = ?", true); // End LoginQueryHolder content PrepareStatement(CHAR_LOAD_PLAYER_ACTIONS_SPEC, "SELECT button, action, type FROM character_action WHERE guid = ? AND spec = ? ORDER BY button"); @@ -259,6 +260,6 @@ bool CharacterDatabaseConnection::Open() PrepareStatement(CHAR_DEL_AURA, "DELETE FROM character_aura WHERE guid = ?", true); PrepareStatement(CHAR_ADD_AURA, "INSERT INTO character_aura (guid,caster_guid,item_guid,spell,effect_mask,recalculate_mask,stackcount,amount0,amount1,amount2,base_amount0,base_amount1,base_amount2,maxduration,remaintime,remaincharges) " "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", true); - + return true; } diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h index 3d203bf67e3..560a805ba15 100755 --- a/src/server/shared/Database/Implementation/CharacterDatabase.h +++ b/src/server/shared/Database/Implementation/CharacterDatabase.h @@ -91,6 +91,7 @@ enum CharacterDatabaseStatements CHAR_LOAD_PLAYER_RANDOMBG, CHAR_LOAD_PLAYER_ARENASTATS, CHAR_LOAD_PLAYER_BANNED, + CHAR_LOAD_PLAYER_QUESTSTATUSREW, CHAR_LOAD_ACCOUNT_DATA, CHAR_LOAD_PLAYER_MAILITEMS, CHAR_LOAD_AUCTION_ITEMS, |
