aboutsummaryrefslogtreecommitdiff
path: root/sql/updates
diff options
context:
space:
mode:
authormegamage <none@none>2009-09-01 16:47:49 -0500
committermegamage <none@none>2009-09-01 16:47:49 -0500
commitdc68c2b269fdd401e2f0f6e1e372292b74c66bb8 (patch)
tree385932d0531cec602257aa91492d14dfe7533602 /sql/updates
parentf0e6acda3b080f7c686190731a2a8c6f5215336b (diff)
[8433] Implement proper store and use character specific account data.
* Base at TOM_RUS reseach save/load character specific account data in new table `character_account_data` * Move its in sql update from `account_data` to new table. * For client packets that can be send in loggined state or just after logout but assocualted with recently logout character add new login status STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT * Store low guid for loggedin player or recently logout into WorldSession. Author: VladimirMangos, TOM_RUS --HG-- branch : trunk
Diffstat (limited to 'sql/updates')
-rw-r--r--sql/updates/5532_8433_characters_character_account_data.sql16
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/updates/5532_8433_characters_character_account_data.sql b/sql/updates/5532_8433_characters_character_account_data.sql
new file mode 100644
index 00000000000..a4569b76639
--- /dev/null
+++ b/sql/updates/5532_8433_characters_character_account_data.sql
@@ -0,0 +1,16 @@
+-- ALTER TABLE character_db_version CHANGE COLUMN required_8409_01_characters_guild required_8433_01_characters_character_account_data bit;
+
+DROP TABLE IF EXISTS `character_account_data`;
+CREATE TABLE `character_account_data` (
+ `guid` int(11) unsigned NOT NULL default '0',
+ `type` int(11) unsigned NOT NULL default '0',
+ `time` bigint(11) unsigned NOT NULL default '0',
+ `data` longtext NOT NULL,
+ PRIMARY KEY (`guid`,`type`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO character_account_data
+SELECT c.guid as guid, a.type as type, a.time as time, a.data as data
+FROM characters c LEFT JOIN account_data a ON c.account = a.account WHERE a.type IN (1, 3, 5, 6, 7);
+
+DELETE FROM account_data WHERE type IN (1, 3, 5, 6, 7); \ No newline at end of file