Skip to content

Commit

Permalink
Add core sync and implement display id probabilities from custom file
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Apr 27, 2024
1 parent 3abefe6 commit 67237d5
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 31 deletions.
7 changes: 7 additions & 0 deletions Updates/0398_charmed_spell_list.sql
@@ -0,0 +1,7 @@
ALTER TABLE db_version CHANGE COLUMN required_s2476_01_mangos_spell_template_ap required_s2477_01_mangos_charmed_spell_list bit;

ALTER TABLE `creature_template` ADD COLUMN `CharmedSpellList` INT NOT NULL DEFAULT '0' COMMENT 'creature_spell_list_entry during charm' AFTER `SpellList`;




15 changes: 15 additions & 0 deletions Updates/0399_cls.sql
@@ -0,0 +1,15 @@
ALTER TABLE db_version CHANGE COLUMN required_s2477_01_mangos_charmed_spell_list required_s2478_01_mangos_creature_cls_stats bit;

ALTER TABLE creature_template_classlevelstats ADD `Strength` int(11) NOT NULL DEFAULT '0';
ALTER TABLE creature_template_classlevelstats ADD `Agility` int(11) NOT NULL DEFAULT '0';
ALTER TABLE creature_template_classlevelstats ADD `Stamina` int(11) NOT NULL DEFAULT '0';
ALTER TABLE creature_template_classlevelstats ADD `Intellect` int(11) NOT NULL DEFAULT '0';
ALTER TABLE creature_template_classlevelstats ADD `Spirit` int(11) NOT NULL DEFAULT '0';

ALTER TABLE creature_template ADD `StrengthMultiplier` FLOAT NOT NULL DEFAULT 1 AFTER `ExperienceMultiplier`;
ALTER TABLE creature_template ADD `AgilityMultiplier` FLOAT NOT NULL DEFAULT 1 AFTER `StrengthMultiplier`;
ALTER TABLE creature_template ADD `StaminaMultiplier` FLOAT NOT NULL DEFAULT 1 AFTER `AgilityMultiplier`;
ALTER TABLE creature_template ADD `IntellectMultiplier` FLOAT NOT NULL DEFAULT 1 AFTER `StaminaMultiplier`;
ALTER TABLE creature_template ADD `SpiritMultiplier` FLOAT NOT NULL DEFAULT 1 AFTER `IntellectMultiplier`;


48 changes: 48 additions & 0 deletions Updates/0400_model_probabilities.sql
@@ -0,0 +1,48 @@
ALTER TABLE db_version CHANGE COLUMN required_s2478_01_mangos_creature_cls_stats required_s2479_01_mangos_displayid_probability bit;

ALTER TABLE `creature_template` CHANGE `ModelId1` `DisplayId1` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `creature_template` CHANGE `ModelId2` `DisplayId2` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `creature_template` CHANGE `ModelId3` `DisplayId3` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `creature_template` CHANGE `ModelId4` `DisplayId4` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `creature_template` ADD COLUMN `DisplayIdProbability1` SMALLINT UNSIGNED NOT NULL DEFAULT 0 AFTER `DisplayId4`;
ALTER TABLE `creature_template` ADD COLUMN `DisplayIdProbability2` SMALLINT UNSIGNED NOT NULL DEFAULT 0 AFTER `DisplayIdProbability1`;
ALTER TABLE `creature_template` ADD COLUMN `DisplayIdProbability3` SMALLINT UNSIGNED NOT NULL DEFAULT 0 AFTER `DisplayIdProbability2`;
ALTER TABLE `creature_template` ADD COLUMN `DisplayIdProbability4` SMALLINT UNSIGNED NOT NULL DEFAULT 0 AFTER `DisplayIdProbability3`;

-- setting probabilities to exactly replicate previous behaviour
UPDATE creature_template SET DisplayIdProbability1=100 WHERE DisplayId1!=0;
UPDATE creature_template SET DisplayIdProbability1=50,DisplayIdProbability2=50 WHERE DisplayId1!=0 AND DisplayId2!=0 AND EXISTS(SELECT modelid FROM creature_model_info WHERE creature_template.DisplayId2=creature_model_info.modelid AND modelid_alternative > 0);
UPDATE creature_template SET DisplayIdProbability1=0,DisplayIdProbability2=0 WHERE DisplayId1!=0 AND DisplayId2!=0 AND NOT EXISTS(SELECT modelid FROM creature_model_info WHERE creature_template.DisplayId2=creature_model_info.modelid AND modelid_alternative > 0);
UPDATE creature_template SET DisplayIdProbability1=33,DisplayIdProbability2=33,DisplayIdProbability3=33 WHERE DisplayId1!=0 AND DisplayId2!=0 AND DisplayId3!=0 AND EXISTS(SELECT modelid FROM creature_model_info WHERE creature_template.DisplayId2=creature_model_info.modelid AND modelid_alternative > 0);
UPDATE creature_template SET DisplayIdProbability1=0,DisplayIdProbability2=0,DisplayIdProbability3=100 WHERE DisplayId1!=0 AND DisplayId2!=0 AND DisplayId3!=0 AND NOT EXISTS(SELECT modelid FROM creature_model_info WHERE creature_template.DisplayId2=creature_model_info.modelid AND modelid_alternative > 0);
UPDATE creature_template SET DisplayIdProbability1=25,DisplayIdProbability2=25,DisplayIdProbability3=25,DisplayIdProbability4=25 WHERE DisplayId1!=0 AND DisplayId2!=0 AND DisplayId3!=0 AND DisplayId4!=0;


UPDATE creature_template SET DisplayIdProbability1=100,`DisplayIdProbability2` = 0, `DisplayIdProbability3` = 0, `DisplayIdProbability4` = 0 WHERE `entry` IN (
5764 -- Guardian of B
);

UPDATE creature_template SET `DisplayIdProbability1` = 0, `DisplayIdProbability3` = 0, `DisplayIdProbability4` = 0,DisplayIdProbability2=100 WHERE `entry` IN (
21419, -- Infernal Attacker - modelid1 (17312)
22418, -- Archimonde Channel Target (18783)
24536 -- Dark Iron Herald - modelid1 (825)
);


UPDATE creature_template SET `DisplayIdProbability2` = 0, `DisplayIdProbability3` = 0, `DisplayIdProbability4` = 0, DisplayIdProbability1=100 WHERE `entry` IN (
17432, -- Stillpine Defender (2001,6802,8589)
17439, -- Stillpine Hunter (2001,6802,8589)
17734, -- Underbog Lord
17459, -- Chess Waiting Room (DND)
18095, -- Doomfire
18104, -- Doomfire Targeting
19632, -- Lykul Stinger (6633,7350,11091)
19937, -- Commander Hogarth (16503,16504,16505)
20155, -- Hillsbrad Internment Lodge Quest Trigger
20156, -- Thrall Quest Trigger
21060, -- Enraged Air Spirit (15294)
25195, -- Marksman Bova (18742,18741,18740)
25265, -- Demonic Vapor
25267, -- Demonic Vapor (Trail)
25703 -- Brutallus Death Cloud
);
32 changes: 1 addition & 31 deletions utilities/cmangos_custom.sql
Expand Up @@ -134,11 +134,6 @@ UPDATE item_template SET class=0, subclass=3 WHERE entry=5514;
-- Creature custom changes
-- -------------------------------

-- modelids with probability = 0
UPDATE creature_template SET `modelid2` = 0, `modelid3` = 0, `modelid4` = 0 WHERE `entry` IN (
5764 -- Guardian of B
);

-- ============================================================
-- TBC section
-- ============================================================
Expand Down Expand Up @@ -199,32 +194,7 @@ UPDATE broadcast_text SET `text`="Should Kil'jaeden rise up through the Sunwell
-- Creature custom changes
-- -------------------------------

-- modelids with probability = 0
UPDATE creature_template SET `modelid2` = 0, `modelid3` = 0, `modelid4` = 0 WHERE `entry` IN (
17432, -- Stillpine Defender (2001,6802,8589)
17439, -- Stillpine Hunter (2001,6802,8589)
17734, -- Underbog Lord
17459, -- Chess Waiting Room (DND)
18095, -- Doomfire
18104, -- Doomfire Targeting
19632, -- Lykul Stinger (6633,7350,11091)
19937, -- Commander Hogarth (16503,16504,16505)
20155, -- Hillsbrad Internment Lodge Quest Trigger
20156, -- Thrall Quest Trigger
21060, -- Enraged Air Spirit (15294)
25195, -- Marksman Bova (18742,18741,18740)
25265, -- Demonic Vapor
25267, -- Demonic Vapor (Trail)
25703 -- Brutallus Death Cloud
);

UPDATE creature_template SET `modelid1` = 0, `modelid3` = 0, `modelid4` = 0 WHERE `entry` IN (
21419, -- Infernal Attacker - modelid1 (17312)
22418, -- Archimonde Channel Target (18783)
24536 -- Dark Iron Herald - modelid1 (825)
);

UPDATE creature_template SET `modelid2` = 17188 WHERE `entry` = 22332; -- Brood of Neltharaku (19980)
UPDATE creature_template SET `DisplayId2` = 17188 WHERE `entry` = 22332; -- Brood of Neltharaku (19980)

-- Shattered Halls Dummys add not_attackable and imun by npcs flags
-- Before: update creature_template set UnitFlags = '2304' where entry = 17578;
Expand Down

0 comments on commit 67237d5

Please sign in to comment.