diff options
| author | Traesh <Traesh@users.noreply.github.com> | 2018-11-07 20:23:30 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2018-11-07 20:23:30 +0100 |
| commit | 9d210476e57949094fdd286001ef4900564edca5 (patch) | |
| tree | 1e8ed5d261698e633ee3371779d30f8c1666526e /sql | |
| parent | 31f0186d20a1944e5d0ff47d71ca8f560074de4b (diff) | |
Core/Creatures: Update creature model handling with new display scale (#22567)
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/updates/world/master/2018_11_05_00_world.sql | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sql/updates/world/master/2018_11_05_00_world.sql b/sql/updates/world/master/2018_11_05_00_world.sql new file mode 100644 index 00000000000..934627d98fb --- /dev/null +++ b/sql/updates/world/master/2018_11_05_00_world.sql @@ -0,0 +1,23 @@ +DROP TABLE IF EXISTS `creature_template_model`; +CREATE TABLE `creature_template_model`( + `CreatureID` int(10) unsigned NOT NULL, + `Idx` int(10) unsigned NOT NULL DEFAULT '0', + `CreatureDisplayID` int(10) unsigned NOT NULL, + `DisplayScale` float NOT NULL DEFAULT '1', + `Probability` float NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(5) unsigned NOT NULL, + PRIMARY KEY (`CreatureID`,`CreatureDisplayID`) +) ENGINE=MYISAM CHARSET=utf8mb4; + +INSERT IGNORE INTO `creature_template_model` (`CreatureID`,`Idx`,`CreatureDisplayID`,`DisplayScale`,`Probability`,`VerifiedBuild`) SELECT `entry`,0,`modelid1`,`scale`,1,`VerifiedBuild` FROM `creature_template` WHERE `modelid1`!=0; +INSERT IGNORE INTO `creature_template_model` (`CreatureID`,`Idx`,`CreatureDisplayID`,`DisplayScale`,`Probability`,`VerifiedBuild`) SELECT `entry`,1,`modelid2`,`scale`,1,`VerifiedBuild` FROM `creature_template` WHERE `modelid2`!=0; +INSERT IGNORE INTO `creature_template_model` (`CreatureID`,`Idx`,`CreatureDisplayID`,`DisplayScale`,`Probability`,`VerifiedBuild`) SELECT `entry`,2,`modelid3`,`scale`,1,`VerifiedBuild` FROM `creature_template` WHERE `modelid3`!=0; +INSERT IGNORE INTO `creature_template_model` (`CreatureID`,`Idx`,`CreatureDisplayID`,`DisplayScale`,`Probability`,`VerifiedBuild`) SELECT `entry`,3,`modelid4`,`scale`,1,`VerifiedBuild` FROM `creature_template` WHERE `modelid4`!=0; + +UPDATE `creature_template` SET `scale`=1; + +ALTER TABLE `creature_template` + DROP `modelid1`, + DROP `modelid2`, + DROP `modelid3`, + DROP `modelid4`; |
