diff options
author | leak <leakzx@googlemail.com> | 2011-01-19 22:46:21 +0100 |
---|---|---|
committer | leak <leakzx@googlemail.com> | 2011-01-19 22:46:21 +0100 |
commit | a7df9ddff1a4dc24d02e0c28276ff7a5f18dd764 (patch) | |
tree | 7b2d48434fd41d3d65c4c2b1d92f714f350a9dca | |
parent | 471b6f138d3025a01c5410f19862f8ee05c4007d (diff) |
SQL: Characters db storage type cleanup No. 4
19 files changed, 161 insertions, 92 deletions
diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql index b350b7b27fa..f2658f8e805 100644 --- a/sql/base/characters_database.sql +++ b/sql/base/characters_database.sql @@ -916,15 +916,12 @@ DROP TABLE IF EXISTS `character_social`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_social` ( - `guid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Character Global Unique Identifier', - `friend` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Friend Global Unique Identifier', - `flags` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Friend Flags', + `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Character Global Unique Identifier', + `friend` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Friend Global Unique Identifier', + `flags` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Friend Flags', `note` varchar(48) NOT NULL DEFAULT '' COMMENT 'Friend Note', PRIMARY KEY (`guid`,`friend`,`flags`), - KEY `guid` (`guid`), - KEY `friend` (`friend`), - KEY `guid_flags` (`guid`,`flags`), - KEY `friend_flags` (`friend`,`flags`) + KEY `friend` (`friend`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -945,8 +942,8 @@ DROP TABLE IF EXISTS `character_spell`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_spell` ( - `guid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', - `spell` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell Identifier', + `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', + `spell` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell Identifier', `active` tinyint(3) unsigned NOT NULL DEFAULT '1', `disabled` tinyint(3) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`guid`,`spell`) @@ -970,10 +967,10 @@ DROP TABLE IF EXISTS `character_spell_cooldown`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_spell_cooldown` ( - `guid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier, Low part', - `spell` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell Identifier', - `item` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Item Identifier', - `time` bigint(20) unsigned NOT NULL DEFAULT '0', + `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier, Low part', + `spell` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell Identifier', + `item` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Item Identifier', + `time` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`guid`,`spell`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -995,7 +992,7 @@ DROP TABLE IF EXISTS `character_stats`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_stats` ( - `guid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier, Low part', + `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier, Low part', `maxhealth` int(10) unsigned NOT NULL DEFAULT '0', `maxpower1` int(10) unsigned NOT NULL DEFAULT '0', `maxpower2` int(10) unsigned NOT NULL DEFAULT '0', @@ -1046,8 +1043,8 @@ DROP TABLE IF EXISTS `character_talent`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_talent` ( - `guid` int(11) unsigned NOT NULL, - `spell` int(11) unsigned NOT NULL, + `guid` int(10) unsigned NOT NULL, + `spell` mediumint(8) unsigned NOT NULL, `spec` tinyint(3) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`guid`,`spell`,`spec`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -1070,18 +1067,16 @@ DROP TABLE IF EXISTS `character_tutorial`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_tutorial` ( - `account` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Account Identifier', - `realmid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Realm Identifier', - `tut0` int(11) unsigned NOT NULL DEFAULT '0', - `tut1` int(11) unsigned NOT NULL DEFAULT '0', - `tut2` int(11) unsigned NOT NULL DEFAULT '0', - `tut3` int(11) unsigned NOT NULL DEFAULT '0', - `tut4` int(11) unsigned NOT NULL DEFAULT '0', - `tut5` int(11) unsigned NOT NULL DEFAULT '0', - `tut6` int(11) unsigned NOT NULL DEFAULT '0', - `tut7` int(11) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`account`,`realmid`), - KEY `acc_key` (`account`) + `account` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Account Identifier', + `tut0` int(10) unsigned NOT NULL DEFAULT '0', + `tut1` int(10) unsigned NOT NULL DEFAULT '0', + `tut2` int(10) unsigned NOT NULL DEFAULT '0', + `tut3` int(10) unsigned NOT NULL DEFAULT '0', + `tut4` int(10) unsigned NOT NULL DEFAULT '0', + `tut5` int(10) unsigned NOT NULL DEFAULT '0', + `tut6` int(10) unsigned NOT NULL DEFAULT '0', + `tut7` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`account`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1102,8 +1097,8 @@ DROP TABLE IF EXISTS `characters`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `characters` ( - `guid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', - `account` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Account Identifier', + `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', + `account` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Account Identifier', `name` varchar(12) NOT NULL DEFAULT '', `race` tinyint(3) unsigned NOT NULL DEFAULT '0', `class` tinyint(3) unsigned NOT NULL DEFAULT '0', @@ -1117,30 +1112,30 @@ CREATE TABLE `characters` ( `position_x` float NOT NULL DEFAULT '0', `position_y` float NOT NULL DEFAULT '0', `position_z` float NOT NULL DEFAULT '0', - `map` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Map Identifier', - `instance_id` int(11) unsigned NOT NULL DEFAULT '0', - `instance_mode_mask` tinyint(2) unsigned NOT NULL DEFAULT '0', + `map` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Map Identifier', + `instance_id` int(10) unsigned NOT NULL DEFAULT '0', + `instance_mode_mask` tinyint(3) unsigned NOT NULL DEFAULT '0', `orientation` float NOT NULL DEFAULT '0', - `taximask` longtext, + `taximask` text NOT NULL, `online` tinyint(3) unsigned NOT NULL DEFAULT '0', `cinematic` tinyint(3) unsigned NOT NULL DEFAULT '0', - `totaltime` int(11) unsigned NOT NULL DEFAULT '0', - `leveltime` int(11) unsigned NOT NULL DEFAULT '0', - `logout_time` bigint(20) unsigned NOT NULL DEFAULT '0', + `totaltime` int(10) unsigned NOT NULL DEFAULT '0', + `leveltime` int(10) unsigned NOT NULL DEFAULT '0', + `logout_time` int(10) unsigned NOT NULL DEFAULT '0', `is_logout_resting` tinyint(3) unsigned NOT NULL DEFAULT '0', `rest_bonus` float NOT NULL DEFAULT '0', - `resettalents_cost` int(11) unsigned NOT NULL DEFAULT '0', - `resettalents_time` bigint(20) unsigned NOT NULL DEFAULT '0', + `resettalents_cost` int(10) unsigned NOT NULL DEFAULT '0', + `resettalents_time` int(10) unsigned NOT NULL DEFAULT '0', `trans_x` float NOT NULL DEFAULT '0', `trans_y` float NOT NULL DEFAULT '0', `trans_z` float NOT NULL DEFAULT '0', `trans_o` float NOT NULL DEFAULT '0', - `transguid` bigint(20) unsigned NOT NULL DEFAULT '0', - `extra_flags` int(11) unsigned NOT NULL DEFAULT '0', - `stable_slots` tinyint(1) unsigned NOT NULL DEFAULT '0', - `at_login` int(11) unsigned NOT NULL DEFAULT '0', - `zone` int(11) unsigned NOT NULL DEFAULT '0', - `death_expire_time` bigint(20) unsigned NOT NULL DEFAULT '0', + `transguid` mediumint(8) unsigned NOT NULL DEFAULT '0', + `extra_flags` smallint(5) unsigned NOT NULL DEFAULT '0', + `stable_slots` tinyint(3) unsigned NOT NULL DEFAULT '0', + `at_login` smallint(5) unsigned NOT NULL DEFAULT '0', + `zone` smallint(5) unsigned NOT NULL DEFAULT '0', + `death_expire_time` int(10) unsigned NOT NULL DEFAULT '0', `taxi_path` text, `arenaPoints` int(10) unsigned NOT NULL DEFAULT '0', `totalHonorPoints` int(10) unsigned NOT NULL DEFAULT '0', @@ -1151,7 +1146,7 @@ CREATE TABLE `characters` ( `yesterdayKills` smallint(5) unsigned NOT NULL DEFAULT '0', `chosenTitle` int(10) unsigned NOT NULL DEFAULT '0', `knownCurrencies` bigint(20) unsigned NOT NULL DEFAULT '0', - `watchedFaction` bigint(10) unsigned NOT NULL DEFAULT '0', + `watchedFaction` int(10) unsigned NOT NULL DEFAULT '0', `drunk` smallint(5) unsigned NOT NULL DEFAULT '0', `health` int(10) unsigned NOT NULL DEFAULT '0', `power1` int(10) unsigned NOT NULL DEFAULT '0', @@ -1161,7 +1156,7 @@ CREATE TABLE `characters` ( `power5` int(10) unsigned NOT NULL DEFAULT '0', `power6` int(10) unsigned NOT NULL DEFAULT '0', `power7` int(10) unsigned NOT NULL DEFAULT '0', - `latency` int(11) unsigned NOT NULL DEFAULT '0', + `latency` mediumint(8) unsigned NOT NULL DEFAULT '0', `speccount` tinyint(3) unsigned NOT NULL DEFAULT '1', `activespec` tinyint(3) unsigned NOT NULL DEFAULT '0', `exploredZones` longtext, @@ -1169,9 +1164,9 @@ CREATE TABLE `characters` ( `ammoId` int(10) unsigned NOT NULL DEFAULT '0', `knownTitles` longtext, `actionBars` tinyint(3) unsigned NOT NULL DEFAULT '0', - `deleteInfos_Account` int(11) unsigned DEFAULT NULL, + `deleteInfos_Account` int(10) unsigned DEFAULT NULL, `deleteInfos_Name` varchar(12) DEFAULT NULL, - `deleteDate` bigint(20) DEFAULT NULL, + `deleteDate` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`guid`), KEY `idx_account` (`account`), KEY `idx_online` (`online`), @@ -1196,25 +1191,24 @@ DROP TABLE IF EXISTS `corpse`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `corpse` ( - `guid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', - `player` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Character Global Unique Identifier', + `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', + `player` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Character Global Unique Identifier', `position_x` float NOT NULL DEFAULT '0', `position_y` float NOT NULL DEFAULT '0', `position_z` float NOT NULL DEFAULT '0', `orientation` float NOT NULL DEFAULT '0', - `zone` int(11) unsigned NOT NULL DEFAULT '38' COMMENT 'Zone Identifier', - `map` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Map Identifier', - `phaseMask` smallint(5) unsigned NOT NULL DEFAULT '1', + `map` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Map Identifier', + `phaseMask` tinyint(3) unsigned NOT NULL DEFAULT '1', `displayId` int(10) unsigned NOT NULL DEFAULT '0', `itemCache` text NOT NULL, `bytes1` int(10) unsigned NOT NULL DEFAULT '0', `bytes2` int(10) unsigned NOT NULL DEFAULT '0', `guild` int(10) unsigned NOT NULL DEFAULT '0', - `flags` int(10) unsigned NOT NULL DEFAULT '0', - `dynFlags` int(10) unsigned NOT NULL DEFAULT '0', - `time` bigint(20) unsigned NOT NULL DEFAULT '0', + `flags` tinyint(3) unsigned NOT NULL DEFAULT '0', + `dynFlags` tinyint(3) unsigned NOT NULL DEFAULT '0', + `time` int(10) unsigned NOT NULL DEFAULT '0', `corpse_type` tinyint(3) unsigned NOT NULL DEFAULT '0', - `instance` int(11) unsigned NOT NULL DEFAULT '0', + `instance` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`guid`), KEY `idx_type` (`corpse_type`), KEY `instance` (`instance`), @@ -1241,8 +1235,8 @@ DROP TABLE IF EXISTS `creature_respawn`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `creature_respawn` ( `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', - `respawntime` bigint(20) unsigned NOT NULL DEFAULT '0', - `instance` mediumint(8) unsigned NOT NULL DEFAULT '0', + `respawntime` int(10) unsigned NOT NULL DEFAULT '0', + `instance` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`guid`,`instance`), KEY `instance` (`instance`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Grid Loading System'; @@ -1265,8 +1259,8 @@ DROP TABLE IF EXISTS `game_event_condition_save`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `game_event_condition_save` ( - `event_id` mediumint(8) unsigned NOT NULL, - `condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0', + `event_id` smallint(5) unsigned NOT NULL, + `condition_id` int(10) unsigned NOT NULL DEFAULT '0', `done` float DEFAULT '0', PRIMARY KEY (`event_id`,`condition_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -2198,4 +2192,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2011-01-19 20:29:23 +-- Dump completed on 2011-01-19 22:45:57 diff --git a/sql/updates/2011_01_19_0_characters_character_social.sql b/sql/updates/2011_01_19_0_characters_character_social.sql new file mode 100644 index 00000000000..54a605b0de7 --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_character_social.sql @@ -0,0 +1,8 @@ +ALTER TABLE `character_social` +ROW_FORMAT=DEFAULT, +CHANGE `guid` `guid` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Character Global Unique Identifier', +CHANGE `friend` `friend` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Friend Global Unique Identifier', +CHANGE `flags` `flags` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Friend Flags', +DROP INDEX `guid`, +DROP INDEX `guid_flags`, +DROP INDEX `friend_flags`;
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_character_spell.sql b/sql/updates/2011_01_19_0_characters_character_spell.sql new file mode 100644 index 00000000000..cbc8b45c677 --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_character_spell.sql @@ -0,0 +1,4 @@ +ALTER TABLE `character_spell` +ROW_FORMAT=DEFAULT, +CHANGE `guid` `guid` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Global Unique Identifier', +CHANGE `spell` `spell` MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Spell Identifier';
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_character_spell_cooldown.sql b/sql/updates/2011_01_19_0_characters_character_spell_cooldown.sql new file mode 100644 index 00000000000..f4558168bcb --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_character_spell_cooldown.sql @@ -0,0 +1,5 @@ +ALTER TABLE `character_spell_cooldown` +CHANGE `guid` `guid` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Global Unique Identifier, Low part', +CHANGE `spell` `spell` MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Spell Identifier', +CHANGE `item` `item` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Item Identifier', +CHANGE `time` `time` INT(10) UNSIGNED DEFAULT '0' NOT NULL;
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_character_stats.sql b/sql/updates/2011_01_19_0_characters_character_stats.sql new file mode 100644 index 00000000000..5cf885950c3 --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_character_stats.sql @@ -0,0 +1,2 @@ +ALTER TABLE `character_stats` +CHANGE `guid` `guid` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Global Unique Identifier, Low part';
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_character_talent.sql b/sql/updates/2011_01_19_0_characters_character_talent.sql new file mode 100644 index 00000000000..47c7bd1ade0 --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_character_talent.sql @@ -0,0 +1,3 @@ +ALTER TABLE `character_talent` +CHANGE `guid` `guid` INT(10) UNSIGNED NOT NULL, +CHANGE `spell` `spell` MEDIUMINT(8) UNSIGNED NOT NULL;
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_character_tutorial.sql b/sql/updates/2011_01_19_0_characters_character_tutorial.sql new file mode 100644 index 00000000000..17e54576050 --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_character_tutorial.sql @@ -0,0 +1,15 @@ +ALTER TABLE `character_tutorial` +ROW_FORMAT=DEFAULT, +CHANGE `account` `account` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Account Identifier', +DROP PRIMARY KEY, +ADD PRIMARY KEY (`account`), +DROP `realmid`, +CHANGE `tut0` `tut0` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `tut1` `tut1` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `tut2` `tut2` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `tut3` `tut3` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `tut4` `tut4` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `tut5` `tut5` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `tut6` `tut6` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `tut7` `tut7` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +DROP KEY `acc_key`;
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_characters.sql b/sql/updates/2011_01_19_0_characters_characters.sql new file mode 100644 index 00000000000..08cf4c0d630 --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_characters.sql @@ -0,0 +1,23 @@ +ALTER TABLE `characters` +ROW_FORMAT=DEFAULT, +CHANGE `guid` `guid` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Global Unique Identifier', +CHANGE `account` `account` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Account Identifier', +CHANGE `map` `map` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Map Identifier', +CHANGE `instance_id` `instance_id` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `instance_mode_mask` `instance_mode_mask` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `taximask` `taximask` TEXT NOT NULL, +CHANGE `totaltime` `totaltime` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `leveltime` `leveltime` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `logout_time` `logout_time` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `resettalents_cost` `resettalents_cost` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `resettalents_time` `resettalents_time` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `transguid` `transguid` MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `extra_flags` `extra_flags` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `stable_slots` `stable_slots` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `at_login` `at_login` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `zone` `zone` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `death_expire_time` `death_expire_time` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `watchedFaction` `watchedFaction` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `latency` `latency` MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `deleteInfos_Account` `deleteInfos_Account` INT(10) UNSIGNED NULL , +CHANGE `deleteDate` `deleteDate` INT(10) UNSIGNED NULL ;
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_corpse.sql b/sql/updates/2011_01_19_0_characters_corpse.sql new file mode 100644 index 00000000000..9902583b5cb --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_corpse.sql @@ -0,0 +1,11 @@ +ALTER TABLE `corpse` +ROW_FORMAT=DEFAULT, +CHANGE `guid` `guid` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Global Unique Identifier', +CHANGE `player` `player` INT(10) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Character Global Unique Identifier', +DROP COLUMN `zone`, +CHANGE `map` `map` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL COMMENT 'Map Identifier', +CHANGE `phaseMask` `phaseMask` TINYINT(3) UNSIGNED DEFAULT '1' NOT NULL, +CHANGE `flags` `flags` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `dynFlags` `dynFlags` TINYINT(3) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `time` `time` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `instance` `instance` INT(10) UNSIGNED DEFAULT '0' NOT NULL;
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_creature_respawn.sql b/sql/updates/2011_01_19_0_characters_creature_respawn.sql new file mode 100644 index 00000000000..eb476844361 --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_creature_respawn.sql @@ -0,0 +1,3 @@ +ALTER TABLE `creature_respawn` +CHANGE `respawntime` `respawntime` INT(10) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `instance` `instance` INT(10) UNSIGNED DEFAULT '0' NOT NULL;
\ No newline at end of file diff --git a/sql/updates/2011_01_19_0_characters_game_event_condition_save.sql b/sql/updates/2011_01_19_0_characters_game_event_condition_save.sql new file mode 100644 index 00000000000..06dec4e9ead --- /dev/null +++ b/sql/updates/2011_01_19_0_characters_game_event_condition_save.sql @@ -0,0 +1,3 @@ +ALTER TABLE `game_event_condition_save` +CHANGE `event_id` `event_id` SMALLINT(5) UNSIGNED NOT NULL, +CHANGE `condition_id` `condition_id` INT(10) UNSIGNED DEFAULT '0' NOT NULL;
\ No newline at end of file diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp index 970a387ef0a..030893c8219 100755 --- a/src/server/game/Entities/Corpse/Corpse.cpp +++ b/src/server/game/Entities/Corpse/Corpse.cpp @@ -107,14 +107,13 @@ void Corpse::SaveToDB() DeleteFromDB(trans); std::ostringstream ss; - ss << "INSERT INTO corpse (guid,player,position_x,position_y,position_z,orientation,zone,map,displayId,itemCache,bytes1,bytes2,guild,flags,dynFlags,time,corpse_type,instance,phaseMask) VALUES (" + ss << "INSERT INTO corpse (guid,player,position_x,position_y,position_z,orientation,map,displayId,itemCache,bytes1,bytes2,guild,flags,dynFlags,time,corpse_type,instance,phaseMask) VALUES (" << GetGUIDLow() << ", " << GUID_LOPART(GetOwnerGUID()) << ", " << GetPositionX() << ", " << GetPositionY() << ", " << GetPositionZ() << ", " << GetOrientation() << ", " - << GetZoneId() << ", " << GetMapId() << ", " << GetUInt32Value(CORPSE_FIELD_DISPLAY_ID) << ", '"; for (uint16 i = 0; i < EQUIPMENT_SLOT_END; ++i) @@ -125,7 +124,7 @@ void Corpse::SaveToDB() << GetUInt32Value(CORPSE_FIELD_GUILD) << ", " << GetUInt32Value(CORPSE_FIELD_FLAGS) << ", " << GetUInt32Value(CORPSE_FIELD_DYNAMIC_FLAGS) << ", " - << uint64(m_time) << ", " + << uint32(m_time) << ", " << uint32(GetType()) << ", " << int(GetInstanceId()) << ", " << uint16(GetPhaseMask()) << ")"; // prevent out of range error @@ -165,7 +164,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields) float positionY = fields[1].GetFloat(); float positionZ = fields[2].GetFloat(); float ort = fields[3].GetFloat(); - uint32 mapid = fields[4].GetUInt32(); + uint32 mapid = fields[4].GetUInt16(); Object::_Create(guid, 0, HIGHGUID_CORPSE); @@ -174,11 +173,11 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields) SetUInt32Value(CORPSE_FIELD_BYTES_1, fields[7].GetUInt32()); SetUInt32Value(CORPSE_FIELD_BYTES_2, fields[8].GetUInt32()); SetUInt32Value(CORPSE_FIELD_GUILD, fields[9].GetUInt32()); - SetUInt32Value(CORPSE_FIELD_FLAGS, fields[10].GetUInt32()); + SetUInt32Value(CORPSE_FIELD_FLAGS, fields[10].GetUInt8()); SetUInt32Value(CORPSE_FIELD_DYNAMIC_FLAGS, fields[11].GetUInt32()); SetUInt64Value(CORPSE_FIELD_OWNER, MAKE_NEW_GUID(fields[17].GetUInt32(), 0, HIGHGUID_PLAYER)); - m_time = time_t(fields[12].GetUInt64()); + m_time = time_t(fields[12].GetUInt32()); m_type = CorpseType(fields[13].GetUInt32()); if (m_type >= MAX_CORPSE_TYPE) @@ -191,7 +190,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields) m_isWorldObject = true; uint32 instanceid = fields[14].GetUInt32(); - uint32 phaseMask = fields[15].GetUInt32(); + uint32 phaseMask = fields[15].GetUInt8(); // place SetLocationInstanceId(instanceid); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 135175ca26a..2f1ea4321b8 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -3988,7 +3988,7 @@ void Player::_LoadSpellCooldowns(PreparedQueryResult result) Field* fields = result->Fetch(); uint32 spell_id = fields[0].GetUInt32(); uint32 item_id = fields[1].GetUInt32(); - time_t db_time = (time_t)fields[2].GetUInt64(); + time_t db_time = time_t(fields[2].GetUInt32()); if (!sSpellStore.LookupEntry(spell_id)) { @@ -4684,7 +4684,7 @@ void Player::DeleteOldCharacters(uint32 keepDays) { sLog->outString("Player::DeleteOldChars: Deleting all characters which have been deleted %u days before...", keepDays); - QueryResult resultChars = CharacterDatabase.PQuery("SELECT guid, deleteInfos_Account FROM characters WHERE deleteDate IS NOT NULL AND deleteDate < '" UI64FMTD "'", uint64(time(NULL) - time_t(keepDays * DAY))); + QueryResult resultChars = CharacterDatabase.PQuery("SELECT guid, deleteInfos_Account FROM characters WHERE deleteDate IS NOT NULL AND deleteDate < '%u'", uint32(time(NULL) - time_t(keepDays * DAY))); if (resultChars) { sLog->outString("Player::DeleteOldChars: Found " UI64FMTD " character(s) to delete",resultChars->GetRowCount()); @@ -7044,7 +7044,7 @@ uint32 Player::GetZoneIdFromDB(uint64 guid) if (!result) return 0; Field* fields = result->Fetch(); - uint32 zone = fields[0].GetUInt32(); + uint32 zone = fields[0].GetUInt16(); if (!zone) { @@ -7053,7 +7053,7 @@ uint32 Player::GetZoneIdFromDB(uint64 guid) if (!result) return 0; fields = result->Fetch(); - uint32 map = fields[0].GetUInt32(); + uint32 map = fields[0].GetUInt16(); float posx = fields[1].GetFloat(); float posy = fields[2].GetFloat(); float posz = fields[3].GetFloat(); @@ -16097,7 +16097,7 @@ bool Player::LoadPositionFromDB(uint32& mapid, float& x,float& y,float& z,float& y = fields[1].GetFloat(); z = fields[2].GetFloat(); o = fields[3].GetFloat(); - mapid = fields[4].GetUInt32(); + mapid = fields[4].GetUInt16(); in_flight = !fields[5].GetString().empty(); return true; @@ -16249,7 +16249,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) // init saved position, and fix it later if problematic uint32 transGUID = uint32(fields[30].GetUInt64()); // field type is uint64 but lowguid is saved Relocate(fields[12].GetFloat(), fields[13].GetFloat(), fields[14].GetFloat(), fields[16].GetFloat()); - uint32 mapId = fields[15].GetUInt32(); + uint32 mapId = fields[15].GetUInt16(); uint32 instanceId = fields[58].GetUInt8(); uint32 dungeonDiff = fields[38].GetUInt32() & 0x0F; @@ -16516,7 +16516,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) SaveRecallPosition(); time_t now = time(NULL); - time_t logoutTime = time_t(fields[22].GetUInt64()); + time_t logoutTime = time_t(fields[22].GetUInt32()); // since last logout (in seconds) uint32 time_diff = uint32(now - logoutTime); //uint64 is excessive for a time_diff in seconds.. uint32 allows for 136~ year difference. @@ -16536,7 +16536,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) m_Played_time[PLAYED_TIME_LEVEL]= fields[20].GetUInt32(); m_resetTalentsCost = fields[24].GetUInt32(); - m_resetTalentsTime = time_t(fields[25].GetUInt64()); + m_resetTalentsTime = time_t(fields[25].GetUInt32()); // reserve some flags uint32 old_safe_flags = GetUInt32Value(PLAYER_FLAGS) & (PLAYER_FLAGS_HIDE_CLOAK | PLAYER_FLAGS_HIDE_HELM); @@ -16546,7 +16546,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) m_taxi.LoadTaxiMask(fields[17].GetCString()); // must be before InitTaxiNodesForLevel - uint32 extraflags = fields[31].GetUInt32(); + uint32 extraflags = fields[31].GetUInt16(); m_stableSlots = fields[32].GetUInt8(); if (m_stableSlots > MAX_PET_STABLES) @@ -16555,14 +16555,14 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) m_stableSlots = MAX_PET_STABLES; } - m_atLoginFlags = fields[33].GetUInt32(); + m_atLoginFlags = fields[33].GetUInt16(); // Honor system // Update Honor kills data m_lastHonorUpdateTime = logoutTime; UpdateHonorFields(); - m_deathExpireTime = (time_t)fields[36].GetUInt64(); + m_deathExpireTime = time_t(fields[36].GetUInt32()); if (m_deathExpireTime > now+MAX_DEATH_COUNT*DEATH_EXPIRE_STEP) m_deathExpireTime = now+MAX_DEATH_COUNT*DEATH_EXPIRE_STEP-1; @@ -18014,12 +18014,12 @@ void Player::SaveToDB() ss << m_Played_time[PLAYED_TIME_LEVEL] << ", "; ss << finiteAlways(m_rest_bonus) << ", "; - ss << (uint64)time(NULL) << ", "; + ss << uint32(time(NULL)) << ", "; ss << (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) ? 1 : 0) << ", "; //save, far from tavern/city //save, but in tavern/city ss << m_resetTalentsCost << ", "; - ss << (uint64)m_resetTalentsTime << ", "; + ss << uint32(m_resetTalentsTime) << ", "; ss << finiteAlways(m_movementInfo.t_pos.GetPositionX()) << ", "; ss << finiteAlways(m_movementInfo.t_pos.GetPositionY()) << ", "; @@ -18039,7 +18039,7 @@ void Player::SaveToDB() ss << GetZoneId() << ", "; - ss << (uint64)m_deathExpireTime << ", '"; + ss << uint32(m_deathExpireTime) << ", '"; ss << m_taxi.SaveTaxiDestinationsToString() << "', "; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 08662973b38..8899be3c144 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1960,13 +1960,12 @@ void ObjectMgr::LoadCreatureRespawnTimes() return; } - do { Field *fields = result->Fetch(); uint32 loguid = fields[0].GetUInt32(); - uint64 respawn_time = fields[1].GetUInt64(); + uint32 respawn_time = fields[1].GetUInt32(); uint32 instance = fields[2].GetUInt32(); mCreatureRespawnTimes[MAKE_PAIR64(loguid,instance)] = time_t(respawn_time); diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index a18c67384fe..ac27ac289b9 100755 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -2102,7 +2102,7 @@ bool Guild::AddMember(const uint64& guid, uint8 rankId) fields[0].GetString(), fields[1].GetUInt8(), fields[2].GetUInt8(), - fields[3].GetUInt32(), + fields[3].GetUInt16(), fields[4].GetUInt32()); ok = pMember->CheckStats(); diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index cb5b62433c8..5ad50e05084 100755 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -340,7 +340,7 @@ void InstanceSaveManager::LoadResetTimes() { Field *fields = result->Fetch(); uint32 instance = fields[1].GetUInt32(); - time_t resettime = time_t(fields[0].GetUInt64() + 2 * HOUR); + time_t resettime = time_t(fields[0].GetUInt32() + 2 * HOUR); InstResetTimeMapDiffType::iterator itr = instResetTime.find(instance); if (itr != instResetTime.end() && itr->second.second != resettime) { diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp index 80682ff6626..6a43bbc7dfd 100755 --- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp @@ -1256,7 +1256,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data) } Field *fields = result->Fetch(); - uint32 at_loginFlags = fields[0].GetUInt32(); + uint32 at_loginFlags = fields[0].GetUInt16(); if (!(at_loginFlags & AT_LOGIN_CUSTOMIZE)) { @@ -1455,7 +1455,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data) Field *fields = result->Fetch(); uint32 playerClass = fields[0].GetUInt32(); uint32 level = fields[1].GetUInt32(); - uint32 at_loginFlags = fields[2].GetUInt32(); + uint32 at_loginFlags = fields[2].GetUInt16(); uint32 used_loginFlag = ((recv_data.GetOpcode() == CMSG_CHAR_RACE_CHANGE) ? AT_LOGIN_CHANGE_RACE : AT_LOGIN_CHANGE_FACTION); if (!sObjectMgr->GetPlayerInfo(race, playerClass)) diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 5414a97dcbb..59abb8fa3a4 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -222,7 +222,7 @@ public: { Field *fieldsLogin = resultLogin->Fetch(); handler->PSendSysMessage(LANG_ACCOUNT_LIST_LINE, - fieldsLogin[0].GetCString(),name.c_str(),fieldsLogin[1].GetCString(),fieldsDB[2].GetInt32(),fieldsDB[3].GetInt32(),fieldsLogin[3].GetUInt32(),fieldsLogin[2].GetUInt32()); + fieldsLogin[0].GetCString(),name.c_str(),fieldsLogin[1].GetCString(),fieldsDB[2].GetUInt16(),fieldsDB[3].GetUInt16(),fieldsLogin[3].GetUInt32(),fieldsLogin[2].GetUInt32()); } else handler->PSendSysMessage(LANG_ACCOUNT_LIST_ERROR,name.c_str()); diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp index ec0282ddb5a..e8def4532e8 100755 --- a/src/server/worldserver/CommandLine/CliRunnable.cpp +++ b/src/server/worldserver/CommandLine/CliRunnable.cpp @@ -159,7 +159,7 @@ bool ChatHandler::GetDeletedCharacterInfoList(DeletedInfoList& foundList, std::s // account name will be empty for not existed account sAccountMgr->GetName(info.accountId, info.accountName); - info.deleteDate = time_t(fields[3].GetUInt64()); + info.deleteDate = time_t(fields[3].GetUInt32()); foundList.push_back(info); } while (resultChar->NextRow()); |