diff options
| author | leak <leakzx@googlemail.com> | 2011-04-28 22:34:40 +0200 |
|---|---|---|
| committer | leak <leakzx@googlemail.com> | 2011-04-28 22:34:40 +0200 |
| commit | 03365e9a573667f5485f44642b47b05473094474 (patch) | |
| tree | 7b20b4a98c8bf5e680411708d266ece0ef7890ca /sql/updates | |
| parent | 5aeb4fe794174c1269b4efcb43556a8b69d2b26a (diff) | |
Core/ObjectMgr: Refactor sEquipmentStorage
Diffstat (limited to 'sql/updates')
| -rw-r--r-- | sql/updates/world/2011_04_28_01_world_creature_equip_template.sql | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sql/updates/world/2011_04_28_01_world_creature_equip_template.sql b/sql/updates/world/2011_04_28_01_world_creature_equip_template.sql new file mode 100644 index 00000000000..1cf6a95395c --- /dev/null +++ b/sql/updates/world/2011_04_28_01_world_creature_equip_template.sql @@ -0,0 +1,26 @@ +ALTER TABLE `creature_equip_template` +CHANGE `entry` `entry` SMALLINT(5) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `equipentry1` `itemEntry1` MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `equipentry2` `itemEntry2` MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL, +CHANGE `equipentry3` `itemEntry3` MEDIUMINT(8) UNSIGNED DEFAULT '0' NOT NULL, +ADD COLUMN `newEntry` INT UNSIGNED AUTO_INCREMENT, +ADD INDEX(newEntry), +DROP PRIMARY KEY; + +UPDATE `creature_template` ct, `creature_equip_template` cet +SET ct.`equipment_id` = cet.`newEntry` +WHERE ct.`equipment_id` = cet.`entry`; + +UPDATE `game_event_model_equip` geme, `creature_equip_template` cet +SET geme.`equipment_id` = cet.`newEntry` +WHERE geme.`equipment_id` = cet.`entry`; + +UPDATE `creature` c, `creature_equip_template` cet +SET c.`equipment_id` = cet.`newEntry` +WHERE c.`equipment_id` = cet.`entry`; + +UPDATE `creature_equip_template` SET `entry` = `newEntry`; + +ALTER TABLE `creature_equip_template` +ADD PRIMARY KEY(`entry`), +DROP COLUMN `newEntry`;
\ No newline at end of file |
