Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2025-01-15 20:49:11 +08:00
45 changed files with 1025 additions and 84 deletions

View File

@@ -0,0 +1,6 @@
-- DB update 2025_01_09_00 -> 2025_01_09_01
--
DELETE FROM `spell_script_names` WHERE `spell_id` IN (7098, 39647);
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(7098, 'spell_gen_proc_on_victim'),
(39647, 'spell_gen_proc_on_victim');

View File

@@ -0,0 +1,5 @@
-- DB update 2025_01_09_01 -> 2025_01_09_02
--
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2726) AND (`source_type` = 0) AND (`id` IN (1));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(2726, 0, 1, 0, 8, 0, 100, 0, 9712, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scorched Guardian - Aggro on spell hit');

View File

@@ -0,0 +1,5 @@
-- DB update 2025_01_09_02 -> 2025_01_10_00
-- Spawn alliance quest giver for Shattered Halls Imprisoned in the Citadel quest
DELETE FROM `creature` WHERE (`id1` = 17288) AND (`guid` IN (151300));
INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES
(151300, 17288, 0, 0, 540, 37114, 3714, 2, 1, 0, 120.88, 252.78, -14.57, 0.82, 7200, 0, 0, 6104, 0, 0, 2, 0, 0, '', 0);

View File

@@ -0,0 +1,8 @@
-- DB update 2025_01_10_00 -> 2025_01_10_01
--
DELETE FROM `spell_script_names` WHERE `spell_id`=42577 AND `ScriptName`='spell_zuljin_zap';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES(42577, 'spell_zuljin_zap');
-- 43983 Energy Storm, add CD to proc
DELETE FROM `spell_proc_event` WHERE `entry` = 43983;
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
(43983, 0, 0, 0, 0, 0, 0x4000|0x10000, 1|2, 1, 0.0, 100.0, 600);

View File

@@ -0,0 +1,3 @@
-- DB update 2025_01_10_01 -> 2025_01_10_02
--
UPDATE `command` SET `help` = 'Syntax: .instance getbossstate [$Name]\nDisplays the state for every available encounter.\nIf no character name is provided, the current map will be used as target.' WHERE `name` = 'instance getbossstate';

View File

@@ -0,0 +1,10 @@
-- DB update 2025_01_10_02 -> 2025_01_10_03
--
DELETE FROM `acore_string` WHERE `entry` IN (5086, 5087);
INSERT INTO `acore_string` (`entry`, `content_default`) VALUES
(5086, 'No doors found within range ({} yards).'),
(5087, 'Door {} (Entry: {}) opened!');
DELETE FROM `command` WHERE `name` = 'opendoor';
INSERT INTO `command` (`name`, `security`, `help`) VALUES
('opendoor', 1, 'Syntax: .opendoor [$range]\nOpens the nearest door within the range provided (default 5.0yd)');

View File

@@ -0,0 +1,3 @@
-- DB update 2025_01_10_03 -> 2025_01_11_00
--
UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|33554432 WHERE `entry` = 23574;

View File

@@ -0,0 +1,7 @@
-- DB update 2025_01_11_00 -> 2025_01_11_01
--
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 16857) AND (`source_type` = 0) AND (`id` IN (3, 7, 11));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(16857, 0, 3, 11, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 90, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Marauding Crust Burster - On Reset - Set Bytes0'),
(16857, 0, 7, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Marauding Crust Burster - On Aggro - Set Rooted On'),
(16857, 0, 11, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 103, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Marauding Crust Burster - On Reset - Set Rooted Off');

View File

@@ -0,0 +1,4 @@
-- DB update 2025_01_11_01 -> 2025_01_12_00
--
-- Removes `Monster - Axe, 2H Horde Massive Spiked` from creature `Rorgish Jowl`
UPDATE `creature_equip_template` SET `ItemID1` = 0 WHERE (`CreatureID` = 10639 AND `ItemID1` = 14870);

View File

@@ -0,0 +1,6 @@
-- DB update 2025_01_12_00 -> 2025_01_12_01
DELETE FROM `reference_loot_template` WHERE `Entry` = 34078 AND `Item` = 34029;
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
(24239, 34029, 0, 30, 0, 1, 0, 1, 1, 'Hex Lord Malacrass - Tiny Voodoo Mask');
UPDATE `creature_loot_template` SET `MinCount` = 2, `MaxCount` = 2 WHERE `Entry` = 24239 AND `Reference` = 34078;

View File

@@ -0,0 +1,7 @@
-- DB update 2025_01_12_01 -> 2025_01_13_00
--
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 18) AND (`SourceEntry` = 52263);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(18, 28605, 52263, 0, 0, 9, 0, 12680, 0, 0, 0, 0, 0, '', 'Havenshire Stallion spellclick require Grand Theft Palomino quest taken'),
(18, 28606, 52263, 0, 0, 9, 0, 12680, 0, 0, 0, 0, 0, '', 'Havenshire Mare spellclick require Grand Theft Palomino quest taken'),
(18, 28607, 52263, 0, 0, 9, 0, 12680, 0, 0, 0, 0, 0, '', 'Havenshire Colt spellclick require Grand Theft Palomino quest taken');

View File

@@ -0,0 +1,8 @@
-- DB update 2025_01_13_00 -> 2025_01_14_00
-- Remove intercept from smart AI & add missing Mark of the Sunfury
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 18853) AND (`source_type` = 0) AND (`id` IN (0));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(18853, 0, 0, 0, 0, 0, 100, 0, 1000, 2000, 30000, 30000, 0, 0, 11, 35877, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunfury Bloodwarder - In Combat - Cast Mark of the Sunfury');
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 18850) AND (`source_type` = 0) AND (`id` IN (0));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(18850, 0, 0, 0, 0, 0, 100, 0, 1000, 2000, 30000, 30000, 0, 0, 11, 35877, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunfury Guardsman - In Combat - Cast Mark of the Sunfury');

View File

@@ -0,0 +1,18 @@
-- DB update 2025_01_14_00 -> 2025_01_14_01
--
-- Removes all the plaque texts.
DELETE FROM `page_text` WHERE `id` IN (2151, 2152, 2153, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178);
-- Adds the correct plaque texts from the sniff `V 3.4.3.53788` (credits to sniff: @heyitsbench)
INSERT INTO `page_text` (`ID`, `Text`, `NextPageID`, `VerifiedBuild`) VALUES
(2175, "Invar One-Arm$BThe first Chief Assassin of the Scarlet Crusade$BCitizen of Dalaran$BLast seen on the shores of Northrend", 0, 53788),
(2151, "Arellas Fireleaf$BHigh Wizard of the Scarlet Crusade$BCitizen of Quel'Thalas$BLocked in eternal combat with the Necromancer Diesalven", 0, 53788),
(2174, "Holia Sunshield$BDefender of the Scarlet Crusade$BKilled while slaying the Dreadlord Beltheris", 0, 53788),
(2172, "Ferren Marcus$BHigh Abbot of the Scarlet Monastery$BCitizen of Stratholme$BKilled defending the Scarlet Monastery at the First Summertide Assault", 0, 53788),
(2178, "Yana Bloodspear$BThe Second Chief Assassin of the Scarlet Crusade$BCitizen of Dalaran$BLost in the Tirisfal Glades", 0, 53788),
(2176, "Orman of Stromgarde$BThe first Captain General of the Scarlet Crusade$BCitizen of Stromgarde$BLost at the mouth of Icecrown Glacier", 0, 53788),
(2171, "Fellari Swiftarrow$BRanger Captain of the Scarlet Crusade$BCitizen of Quel'Thalas$BLost in the forests of Silverpine", 0, 53788),
(2153, "Dorgar Stoenbrow$BWarrior of the Scarlet Crusade$BLord of the Red Caverns$BLast seen in the Mountains of Alterac", 0, 53788),
(2177, "Valea Twinblades$BWarrior of the Scarlet Crusade$BCitizen of Alterac$BLast seen deep in the Eastern Plaguelands", 0, 53788),
(2173, "Harthal Truesight$BLord Paladin of the Scarlet Crusade$BCitizen of Azeroth - Knight of the Silver Hand$BLast seen entering the cursed city of Stratholme", 0, 53788),
(2152, "Admiral Barean Westwind$BGrand Admiral of the Scarlet Fleet$BCitizen of Kul'Tiras$BLost off the Frozen Coast of Northrend", 0, 53788);

View File

@@ -0,0 +1,7 @@
-- DB update 2025_01_14_01 -> 2025_01_14_02
-- Delete Double Nerub'ar Victims
DELETE FROM `creature` WHERE (`id1` = 25284) AND (`guid` IN (143230, 143231, 143232, 143263, 143264, 143268, 143269, 143271, 143272, 143273));
-- Set MT to 0 for a Crystalline Tender inside The Nexus (dungeon).
UPDATE `creature` SET `MovementType` = 0 WHERE (`id1` = 28231) AND (`guid` IN (126441));

View File

@@ -0,0 +1,3 @@
-- DB update 2025_01_14_02 -> 2025_01_14_03
--
UPDATE `creature_template` SET `ScriptName` = 'npc_eagle_trash_aggro_trigger' WHERE (`entry` = 24223);

View File

@@ -0,0 +1,94 @@
-- DB update 2025_01_14_03 -> 2025_01_14_04
-- Add Waypoint.
DELETE FROM `waypoint_data` WHERE `id` IN (10041400);
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
(10041400, 1, 1142.7643, 977.347, 361.2085, NULL, 0, 0, 0, 100, 0),
(10041400, 2, 1155.1647, 984.28235, 361.20853, NULL, 0, 0, 0, 100, 0),
(10041400, 3, 1166.8981, 993.3729, 361.2085, NULL, 0, 0, 0, 100, 0),
(10041400, 4, 1174.3507, 1003.2168, 361.20853, NULL, 0, 0, 0, 100, 0),
(10041400, 5, 1179.8309, 1016.7469, 361.20847, NULL, 0, 0, 0, 100, 0),
(10041400, 6, 1181.4456, 1026.8712, 361.20853, NULL, 0, 0, 0, 100, 0),
(10041400, 7, 1179.8309, 1016.7469, 361.20847, NULL, 0, 0, 0, 100, 0),
(10041400, 8, 1174.3507, 1003.2168, 361.20853, NULL, 0, 0, 0, 100, 0),
(10041400, 9, 1166.8981, 993.3729, 361.2085, NULL, 0, 0, 0, 100, 0),
(10041400, 10, 1155.1647, 984.28235, 361.20853, NULL, 0, 0, 0, 100, 0),
(10041400, 11, 1142.7643, 977.347, 361.2085, NULL, 0, 0, 0, 100, 0),
(10041400, 12, 1123.0382, 971.89996, 361.30014, NULL, 0, 0, 0, 100, 0);
-- Change WD, MT, Position for an Azure Inquisitor.
UPDATE `creature` SET `wander_distance` = 0, `MovementType` = 2, `position_x` = 1123.0382, `position_y` = 971.89996, `position_z` = 361.30014, `orientation` = 3.4109 WHERE `guid` IN (100414) AND `id1` = 27633;
-- Create new Azure Spellbinders.
DELETE FROM `creature` WHERE (`id1` = 27635) AND (`guid` IN (100400, 100402, 100404));
INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES
(100400, 27635, 0, 0, 578, 0, 0, 3, 1, 1, 1123.0382, 971.89996, 361.30014, 3.4109, 3600, 0, 0, 48700, 19465, 2, 0, 0, 0, '', 0, 0, NULL),
(100402, 27635, 0, 0, 578, 0, 0, 3, 1, 1, 1183, 1037.33, 361.07, 3.93238, 3600, 2, 0, 48700, 19465, 1, 0, 0, 0, '', 0, 0, NULL),
(100404, 27635, 0, 0, 578, 0, 0, 3, 1, 1, 1094.9, 1127.86, 361.07, 4.98004, 3600, 2, 0, 48700, 19465, 1, 0, 0, 0, '', 0, 0, NULL);
-- Create new Azure Inquisitors.
DELETE FROM `creature` WHERE (`id1` = 27633) AND (`guid` IN (100405, 100406, 100409));
INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES
(100405, 27633, 0, 0, 578, 0, 0, 3, 1, 1, 1179.05, 1068.18, 361.07, 3.20184, 3600, 5, 0, 48700, 0, 1, 0, 0, 0, '', 0),
(100406, 27633, 0, 0, 578, 0, 0, 3, 1, 1, 1181.48, 1070.53, 361.07, 4.55913, 3600, 5, 0, 48700, 0, 1, 0, 0, 0, '', 0),
(100409, 27633, 0, 0, 578, 0, 0, 3, 1, 1, 1107.68, 1132.91, 361.07, 2.17407, 3600, 5, 0, 48700, 0, 1, 0, 0, 0, '', 0);
-- Set waypoint for an Azure Inquisitor and Spellbinder.
DELETE FROM `creature_addon` WHERE (`guid` IN (100414, 100400));
INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
(100414, 10041400, 0, 0, 0, 0, 0, NULL),
(100400, 10041400, 0, 0, 0, 0, 0, NULL);
-- Create Groups.
DELETE FROM `pool_template` WHERE (`entry` IN (22408, 22409, 22410, 22411, 22412, 22413));
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
(22408, 1, 'Azure Spellbinder/Inquisitor 1'),
(22409, 1, 'Azure Spellbinder/Inquisitor 2'),
(22410, 1, 'Azure Spellbinder/Inquisitor 3'),
(22411, 1, 'Azure Spellbinder/Inquisitor 4'),
(22412, 1, 'Azure Spellbinder/Inquisitor 5'),
(22413, 1, 'Azure Spellbinder/Inquisitor 6');
DELETE FROM `pool_creature` WHERE (`pool_entry` IN (22408, 22409, 22410, 22411, 22412, 22413)) AND (`guid` IN (100405, 100418, 100406, 100416, 100409, 100419, 100411, 100404, 100414, 100400, 100415, 100402));
INSERT INTO `pool_creature` (`guid`, `pool_entry`, `chance`, `description`) VALUES
(100405, 22408, 0, 'Azure Spellbinder/Inquisitor (1-2)'),
(100418, 22408, 0, 'Azure Spellbinder/Inquisitor (2-2)'),
(100406, 22409, 0, 'Azure Spellbinder/Inquisitor (1-2)'),
(100416, 22409, 0, 'Azure Spellbinder/Inquisitor (2-2)'),
(100409, 22410, 0, 'Azure Spellbinder/Inquisitor (1-2)'),
(100419, 22410, 0, 'Azure Spellbinder/Inquisitor (2-2)'),
(100411, 22411, 0, 'Azure Spellbinder/Inquisitor (1-2)'),
(100404, 22411, 0, 'Azure Spellbinder/Inquisitor (2-2)'),
(100414, 22412, 0, 'Azure Spellbinder/Inquisitor (1-2)'),
(100400, 22412, 0, 'Azure Spellbinder/Inquisitor (2-2)'),
(100415, 22413, 0, 'Azure Spellbinder/Inquisitor (1-2)'),
(100402, 22413, 0, 'Azure Spellbinder/Inquisitor (2-2)');
-- Change SmartAI for Azure Ley-Whelp
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27636;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27636);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(27636, 0, 0, 0, 0, 0, 100, 2, 0, 0, 2000, 2000, 0, 0, 11, 50705, 64, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Ley-Whelp - In Combat - Cast \'Arcane Bolt\' (Normal Dungeon)'),
(27636, 0, 1, 0, 0, 0, 100, 4, 0, 0, 2000, 2000, 0, 0, 11, 59210, 66, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Ley-Whelp - In Combat - Cast \'Arcane Bolt\' (Heroic Dungeon)');
-- Change SmartAI for Azure Spellbinder
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27635;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27635);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(27635, 0, 0, 0, 0, 0, 100, 2, 5000, 7000, 5000, 7000, 0, 0, 11, 50702, 64, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Spellbinder - In Combat - Cast \'Arcane Volley\' (Normal Dungeon)'),
(27635, 0, 1, 0, 0, 0, 100, 4, 5000, 7000, 5000, 7000, 0, 0, 11, 59212, 64, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Spellbinder - In Combat - Cast \'Arcane Volley\' (Heroic Dungeon)'),
(27635, 0, 2, 0, 0, 0, 100, 2, 6000, 9000, 6000, 9000, 0, 0, 11, 38047, 64, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Spellbinder - In Combat - Cast \'Mind Warp\' (Normal Dungeon)'),
(27635, 0, 3, 0, 0, 0, 100, 4, 6000, 9000, 6000, 9000, 0, 0, 11, 50566, 64, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Spellbinder - In Combat - Cast \'Mind Warp\' (Heroic Dungeon)'),
(27635, 0, 4, 0, 0, 0, 100, 6, 9000, 12000, 4000, 8000, 0, 0, 11, 50572, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Spellbinder - In Combat - Cast \'Power Sap\' (Dungeon)');
-- Change SmartAI for Azure Inquisitor
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27633;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27633);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(27633, 0, 0, 0, 106, 0, 100, 2, 5000, 7000, 5000, 7000, 5, 30, 11, 51454, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Inquisitor - On Hostile in Range - Cast \'Throw\' (Normal Dungeon)'),
(27633, 0, 1, 0, 106, 0, 100, 4, 5000, 7000, 5000, 7000, 5, 30, 11, 59209, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Inquisitor - On Hostile in Range - Cast \'Throw\' (Heroic Dungeon)'),
(27633, 0, 2, 0, 106, 0, 100, 6, 14000, 20000, 14000, 20000, 0, 10, 11, 50690, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Inquisitor - On Hostile in Range - Cast \'Immobilizing Field\' (Dungeon)'),
(27633, 0, 3, 0, 0, 0, 100, 6, 4000, 7000, 9000, 12000, 0, 0, 11, 50573, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Inquisitor - In Combat - Cast \'Arcane Cleave\' (Dungeon)');

View File

@@ -0,0 +1,7 @@
-- DB update 2025_01_14_04 -> 2025_01_14_05
--
UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256, `AIName` = 'SmartAI' WHERE `entry` = 24374;
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 24374) AND (`source_type` = 0) AND (`id` IN (0, 1));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(24374, 0, 0, 0, 0, 0, 100, 0, 3000, 6000, 12000, 24000, 0, 0, 11, 43673, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani\'shi Berserker - In Combat - Cast \'Mighty Blow\''),
(24374, 0, 1, 0, 2, 0, 100, 1, 0, 20, 1000, 1000, 0, 0, 11, 28747, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani\'shi Berserker - Between 0-20% Health - Cast \'Frenzy\' (No Repeat)');

View File

@@ -0,0 +1,4 @@
-- DB update 2025_01_14_05 -> 2025_01_15_00
--
DELETE FROM `spell_script_names` WHERE `spell_id`=43983 AND `ScriptName`='spell_gen_allow_proc_from_spells_with_cost';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES(43983, 'spell_gen_allow_proc_from_spells_with_cost');

View File

@@ -0,0 +1,6 @@
-- DB update 2025_01_15_00 -> 2025_01_15_01
--
DELETE FROM `spell_target_position` WHERE `ID` = 41234 AND `EffectIndex` = 0;
INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`)
VALUES (41234, 0, 0, -3560.6572, 582.82887, 10.987, 4.768543);

View File

@@ -0,0 +1,286 @@
-- DB update 2025_01_15_01 -> 2025_01_15_02
-- Nerub'ar Corpse Harvester
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25445;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25445);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25445, 0, 0, 0, 0, 0, 100, 0, 5000, 10000, 15000, 18000, 0, 0, 11, 6917, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Nerub\'ar Corpse Harvester - In Combat - Cast \'Venom Spit\'');
-- Nerub'ar Web Lord
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25294;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25294);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25294, 0, 0, 0, 0, 0, 100, 0, 4000, 5000, 14000, 16000, 0, 0, 11, 50284, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Nerub\'ar Web Lord - In Combat - Cast \'Blinding Swarm\'');
-- Unliving Swine
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25600;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25600);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25600, 0, 0, 0, 9, 0, 100, 0, 1000, 2000, 10000, 15000, 0, 3, 11, 50303, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unliving Swine - Within 0-3 Range - Cast \'Swine Flu\'');
-- En'Kilah Necrolord
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25609;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25609);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25609, 0, 0, 0, 0, 0, 100, 0, 2000, 3000, 8000, 10000, 0, 0, 11, 50324, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'En\'kilah Necrolord - In Combat - Cast \'Bone Armor\''),
(25609, 0, 1, 0, 0, 0, 100, 0, 4000, 5000, 5000, 8000, 0, 0, 11, 50323, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'En\'kilah Necrolord - In Combat - Cast \'Sharpened Bone\'');
-- Bloodspore Moth
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25464;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25464);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25464, 0, 0, 0, 0, 0, 100, 0, 5000, 7000, 20000, 25000, 0, 0, 11, 32914, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodspore Moth - In Combat - Cast \'Wing Buffet\'');
-- Skadir Mariner
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25523;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25523);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25523, 0, 0, 0, 0, 0, 100, 0, 5000, 6000, 15000, 20000, 0, 0, 11, 13730, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Skadir Mariner - In Combat - Cast \'Demoralizing Shout\''),
(25523, 0, 1, 0, 0, 0, 100, 0, 5000, 8000, 25000, 30000, 0, 0, 11, 10966, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Skadir Mariner - In Combat - Cast \'Uppercut\'');
-- Skadir Runecaster
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25520;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25520);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25520, 0, 0, 0, 0, 0, 100, 0, 3000, 5000, 30000, 30000, 0, 0, 11, 49871, 32, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Skadir Runecaster - In Combat - Cast \'Rune of Retribution\''),
(25520, 0, 1, 0, 0, 0, 100, 0, 5000, 7000, 6000, 8000, 0, 0, 11, 9532, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Skadir Runecaster - In Combat - Cast \'Lightning Bolt\'');
-- Gamel the Cruel
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26449;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26449);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(26449, 0, 0, 0, 0, 0, 100, 0, 5000, 8000, 8000, 15000, 0, 0, 11, 19643, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gamel the Cruel - In Combat - Cast \'Mortal Strike\'');
-- Ragnar Drakkarlund
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26451;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26451);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(26451, 0, 0, 0, 0, 0, 100, 0, 6000, 8000, 8000, 12000, 0, 0, 11, 41056, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ragnar Drakkarlund - In Combat - Cast \'Whirlwind\'');
-- Glacial Ancient
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25709;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25709);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25709, 0, 0, 0, 0, 0, 100, 0, 8000, 10000, 12000, 16000, 0, 0, 11, 50505, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Glacial Ancient - In Combat - Cast \'Frost Breath\'');
-- Coldarra Scalesworn
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25717;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25717);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25717, 0, 0, 0, 0, 0, 100, 0, 12000, 15000, 12000, 15000, 0, 0, 11, 12748, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coldarra Scalesworn - In Combat - Cast \'Frost Nova\''),
(25717, 0, 1, 0, 0, 0, 100, 0, 12000, 15000, 12000, 15000, 0, 0, 11, 11977, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coldarra Scalesworn - In Combat - Cast \'Rend\'');
-- Crypt Crawler
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25227;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25227);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25227, 0, 0, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 0, 0, 11, 31600, 64, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Crypt Crawler - In Combat - Cast \'Crypt Scarabs\'');
-- Scourged Footman
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25981;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25981);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25981, 0, 0, 0, 0, 0, 100, 0, 4000, 5000, 3000, 8000, 0, 0, 11, 32736, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scourged Footman - In Combat - Cast \'Mortal Strike\'');
-- Ziggurat Defender
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26202;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26202);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(26202, 0, 0, 1, 0, 0, 100, 0, 4000, 5000, 10000, 15000, 0, 0, 11, 50306, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ziggurat Defender - In Combat - Cast \'Thrash Kick\'');
-- Clam Master K
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25800;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25800);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25800, 0, 0, 0, 9, 0, 100, 0, 5000, 10000, 10000, 15000, 0, 5, 11, 49711, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Clam Master K - Within 0-5 Range - Cast \'Hooked Net\''),
(25800, 0, 1, 0, 9, 0, 100, 0, 1000, 2000, 2000, 2000, 5, 60, 11, 54431, 64, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Clam Master K - Within 5-60 Range - Cast \'Throw Spear\'');
-- Nerub'ar Warrior
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25619;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25619);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25619, 0, 0, 0, 9, 0, 100, 0, 1000, 1000, 1000, 1000, 8, 25, 11, 50347, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Nerub\'ar Warrior - Within 8-25 Range - Cast \'Rush\'');
-- Nerub'ar Tunneler
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25622;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25622);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25622, 0, 0, 0, 0, 0, 100, 0, 12000, 15000, 12000, 15000, 0, 0, 11, 50364, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nerub\'ar Tunneler - In Combat - Cast \'Rock Shield\'');
-- Claximus
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25209;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25209);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25209, 0, 0, 0, 0, 0, 100, 0, 2000, 3000, 15000, 20000, 0, 0, 11, 50275, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Claximus - In Combat - Cast \'Stabilized Magic\''),
(25209, 0, 1, 0, 0, 0, 100, 0, 2000, 3000, 2000, 10000, 0, 0, 11, 50273, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Claximus - In Combat - Cast \'Arcane Barrage\'');
-- Kaganishu
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25427;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25427);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25427, 0, 0, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 0, 0, 11, 19816, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaganishu - In Combat - Cast \'Fireball\''),
(25427, 0, 1, 0, 106, 0, 100, 0, 1000, 2000, 35000, 45000, 0, 10, 11, 15744, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaganishu - On Hostile in Range - Cast \'Blast Wave\'');
-- Magmoth Crusher
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25434;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25434);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25434, 0, 0, 0, 6, 0, 100, 513, 0, 0, 0, 0, 0, 0, 33, 25505, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Magmoth Crusher - On Just Died - Quest Credit \'null\' (No Repeat)'),
(25434, 0, 1, 0, 0, 0, 100, 0, 8000, 10000, 20000, 25000, 0, 0, 11, 50410, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Magmoth Crusher - In Combat - Cast \'Tusk Strike\''),
(25434, 0, 2, 0, 106, 0, 100, 0, 2000, 2000, 15000, 20000, 10, 100, 11, 50413, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Magmoth Crusher - On Hostile in Range - Cast \'Magnataur Charge\'');
-- Tundra Crawler
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25454;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25454);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25454, 0, 0, 0, 0, 0, 100, 0, 10000, 12000, 12000, 15000, 0, 0, 11, 50293, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tundra Crawler - In Combat - Cast \'Corrosive Poison\'');
-- Plagued Magnataur
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25615;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25615);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25615, 0, 0, 0, 0, 0, 100, 0, 3000, 5000, 30000, 30000, 0, 0, 11, 50366, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Plagued Magnataur - In Combat - Cast \'Plague Cloud\'');
-- Talramas Abomination
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25684;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25684);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25684, 0, 0, 0, 0, 0, 100, 0, 3000, 5000, 30000, 30000, 0, 0, 11, 50366, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Talramas Abomination - In Combat - Cast \'Plague Cloud\'');
-- Gorloc Gibberer
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25686;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25686);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25686, 0, 0, 0, 0, 0, 100, 0, 2000, 3000, 6000, 12000, 0, 0, 11, 50520, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorloc Gibberer - In Combat - Cast \'Deep Dredge\'');
-- Gorloc Steam Belcher
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25687;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25687);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25687, 0, 0, 0, 0, 0, 100, 0, 4000, 6000, 8000, 12000, 0, 0, 11, 50538, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorloc Steam Belcher - In Combat - Cast \'Belch Blast\'');
-- Gorloc Waddler
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25685;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25685);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25685, 0, 0, 0, 0, 0, 100, 0, 3000, 5000, 15000, 20000, 0, 0, 11, 50522, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorloc Waddler - In Combat - Cast \'Gorloc Stomp\'');
-- Gorloc Mud Splasher
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25699;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25699);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25699, 0, 0, 0, 0, 0, 100, 0, 3000, 5000, 15000, 20000, 0, 0, 11, 50522, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorloc Waddler - In Combat - Cast \'Gorloc Stomp\'');
-- Gorloc Dredger
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25701;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25701);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25701, 0, 0, 0, 0, 0, 100, 0, 2000, 3000, 6000, 12000, 0, 0, 11, 50520, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorloc Gibberer - In Combat - Cast \'Deep Dredge\'');
-- En'kilah Abomination
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25383;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25383);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25383, 0, 0, 0, 0, 0, 100, 0, 4000, 6000, 6000, 12000, 0, 0, 11, 40504, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'En\'kilah Abomination - In Combat - Cast \'Cleave\''),
(25383, 0, 1, 0, 9, 0, 100, 0, 4000, 6000, 4000, 6000, 8, 40, 11, 50335, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'En\'kilah Abomination - Within 8-40 Range - Cast \'Scourge Hook\'');
-- En'kilah Crypt Fiend
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25386;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25386);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25386, 0, 0, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 0, 0, 11, 31600, 64, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Crypt Crawler - In Combat - Cast \'Crypt Scarabs\'');
-- En'kilah Ghoul
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25393;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25393);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25393, 0, 0, 0, 0, 0, 100, 0, 4000, 6000, 24000, 26000, 0, 0, 11, 38056, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'En\'kilah Ghoul - In Combat - Cast \'Flesh Rip\'');
-- Sentry-bot 57-K (modified old smartai)
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25753;
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 25753) AND (`source_type` = 0) AND (`id` IN (0, 4));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25753, 0, 0, 0, 0, 0, 100, 0, 3000, 13000, 13000, 26000, 0, 0, 11, 6668, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sentry-bot 57-K - In Combat - Cast \'Red Firework\''),
(25753, 0, 4, 0, 6, 1, 100, 0, 0, 0, 0, 0, 0, 0, 11, 46443, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sentry-bot 57-K - On Just Died - Cast \'Weakness to Lightning: Kill Credit Direct to Player\' (Phase 1)');
-- High Priest Naferset
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26076;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26076);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(26076, 0, 0, 0, 25, 0, 100, 512, 0, 0, 0, 0, 0, 0, 18, 33555200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Priest Naferset - On Reset - Set Flags Immune To Players & Immune To NPC\'s & Not Selectable'),
(26076, 0, 1, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 18, 33555200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Priest Naferset - On Respawn - Set Flags Immune To Players & Immune To NPC\'s & Not Selectable'),
(26076, 0, 2, 3, 1, 0, 100, 512, 2000, 2000, 5000, 5000, 0, 0, 19, 33555200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Priest Naferset - Out of Combat - Remove Flags Immune To Players & Immune To NPC\'s & Not Selectable'),
(26076, 0, 3, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Priest Naferset - Out of Combat - Say Line 0'),
(26076, 0, 4, 0, 0, 0, 100, 0, 3000, 5000, 20000, 25000, 0, 0, 11, 15587, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'High Priest Naferset - In Combat - Cast \'Mind Blast\''),
(26076, 0, 5, 0, 2, 0, 100, 0, 0, 50, 2000, 5000, 0, 0, 11, 11640, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Priest Naferset - Between 0-50% Health - Cast \'Renew\'');
-- Darkfallen Deathblade
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26103;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26103);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(26103, 0, 0, 0, 0, 0, 100, 0, 4000, 5000, 20000, 30000, 0, 0, 11, 50668, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Darkfallen Deathblade - In Combat - Cast \'Death Coil\''),
(26103, 0, 1, 0, 0, 0, 100, 0, 2000, 3000, 8000, 12000, 0, 0, 11, 50349, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Darkfallen Deathblade - In Combat - Cast \'Icy Touch\'');
-- Heigarr the Horrible
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26266;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26266);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(26266, 0, 0, 0, 0, 0, 100, 0, 4000, 6000, 5000, 20000, 0, 0, 11, 40504, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Heigarr the Horrible - In Combat - Cast \'Cleave\''),
(26266, 0, 1, 0, 0, 0, 100, 0, 15000, 20000, 20000, 25000, 0, 0, 11, 32588, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Heigarr the Horrible - In Combat - Cast \'Concussion Blow\'');
-- Boiling Spirit
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25419;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25419);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25419, 0, 0, 0, 0, 0, 100, 0, 4000, 6000, 25000, 30000, 0, 0, 11, 50206, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Boiling Spirit - In Combat - Cast \'Scalding Steam\'');
-- Raging Boiler
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25417;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25417);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25417, 0, 0, 0, 0, 0, 100, 0, 4000, 6000, 25000, 30000, 0, 0, 11, 50207, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Boiling Spirit - In Combat - Cast \'Scalding Steam\'');
-- Enraged Tempest
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25415;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25415);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(25415, 0, 0, 0, 2, 0, 100, 0, 0, 50, 0, 0, 0, 0, 11, 50420, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Enraged Tempest - Between 0-50% Health - Cast \'Enrage\''),
(25415, 0, 1, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 50215, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Enraged Tempest - On Just Died - Cast \'Zephyr\'');

View File

@@ -0,0 +1,2 @@
-- DB update 2025_01_15_02 -> 2025_01_15_03
UPDATE `spell_target_position` SET `MapID` = 530 WHERE `ID` = 41234 AND `EffectIndex` = 0;

View File

@@ -288,6 +288,10 @@ add_library(modules STATIC
${SCRIPT_MODULE_PRIVATE_SCRIPTLOADER}
${PRIVATE_SOURCES_MODULES})
if (MOD_ELUNA_FOUND)
target_link_libraries(modules PUBLIC lualib)
endif()
target_link_libraries(modules
PRIVATE
acore-core-interface

View File

@@ -2334,6 +2334,12 @@ void Player::ProcessSpellQueue()
{
PendingSpellCastRequest& request = SpellQueue.front(); // Peek at the first spell
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(request.spellId);
if (!spellInfo)
{
LOG_ERROR("entities.player", "Player::ProcessSpellQueue: Invalid spell {}", request.spellId);
SpellQueue.clear();
break;
}
if (CanExecutePendingSpellCastRequest(spellInfo))
{
ExecuteOrCancelSpellCastRequest(&request);

View File

@@ -9673,8 +9673,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
return false;
}
// Cast positive spell on enemy target
case 7099: // Curse of Mending
case 39703: // Curse of Mending
case 20233: // Improved Lay on Hands (cast on target)
{
target = victim;

View File

@@ -184,6 +184,9 @@ public:
//Called when a player successfully enters the instance.
virtual void OnPlayerEnter(Player* /*player*/) {}
//Called when a player successfully leaves the instance.
virtual void OnPlayerLeave(Player* /*player*/) {}
virtual void OnPlayerAreaUpdate(Player* /*player*/, uint32 /*oldArea*/, uint32 /*newArea*/) {}
//Called when a player enters/leaves water bodies.

View File

@@ -3046,6 +3046,8 @@ void InstanceMap::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread
void InstanceMap::RemovePlayerFromMap(Player* player, bool remove)
{
if (instance_data)
instance_data->OnPlayerLeave(player);
// pussywizard: moved m_unloadTimer to InstanceMap::AfterPlayerUnlinkFromMap(), in this function if 2 players run out at the same time the instance won't close
//if (!m_unloadTimer && m_mapRefMgr.getSize() == 1)
// m_unloadTimer = m_unloadWhenEmpty ? MIN_UNLOAD_DELAY : std::max(sWorld->getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY);

View File

@@ -1145,7 +1145,10 @@ enum AcoreStrings
LANG_CMD_GO_RESPAWN = 5085,
// Room for more strings 5086-9999
LANG_CMD_NO_DOOR_FOUND = 5086,
LANG_CMD_DOOR_OPENED = 5087,
// Room for more strings 5088-9999
// Level requirement notifications
LANG_SAY_REQ = 6604,

View File

@@ -2892,27 +2892,27 @@ void World::UpdateRealmCharCount(uint32 accountId)
{
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_COUNT);
stmt->SetData(0, accountId);
_queryProcessor.AddCallback(CharacterDatabase.AsyncQuery(stmt).WithPreparedCallback(std::bind(&World::_UpdateRealmCharCount, this, std::placeholders::_1)));
_queryProcessor.AddCallback(CharacterDatabase.AsyncQuery(stmt).WithPreparedCallback(std::bind(&World::_UpdateRealmCharCount, this, std::placeholders::_1,accountId)));
}
void World::_UpdateRealmCharCount(PreparedQueryResult resultCharCount)
void World::_UpdateRealmCharCount(PreparedQueryResult resultCharCount,uint32 accountId)
{
uint8 charCount{0};
if (resultCharCount)
{
Field* fields = resultCharCount->Fetch();
uint32 accountId = fields[0].Get<uint32>();
uint8 charCount = uint8(fields[1].Get<uint64>());
LoginDatabaseTransaction trans = LoginDatabase.BeginTransaction();
LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_REP_REALM_CHARACTERS);
stmt->SetData(0, charCount);
stmt->SetData(1, accountId);
stmt->SetData(2, realm.Id.Realm);
trans->Append(stmt);
LoginDatabase.CommitTransaction(trans);
charCount = uint8(fields[1].Get<uint64>());
}
LoginDatabaseTransaction trans = LoginDatabase.BeginTransaction();
LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_REP_REALM_CHARACTERS);
stmt->SetData(0, charCount);
stmt->SetData(1, accountId);
stmt->SetData(2, realm.Id.Realm);
trans->Append(stmt);
LoginDatabase.CommitTransaction(trans);
}
void World::InitWeeklyQuestResetTime()

View File

@@ -350,7 +350,7 @@ public:
protected:
void _UpdateGameTime();
// callback for UpdateRealmCharacters
void _UpdateRealmCharCount(PreparedQueryResult resultCharCount);
void _UpdateRealmCharCount(PreparedQueryResult resultCharCount,uint32 accountId);
void InitDailyQuestResetTime();
void InitWeeklyQuestResetTime();

View File

@@ -206,7 +206,7 @@ public:
return true;
}
static bool HandleInstanceGetBossStateCommand(ChatHandler* handler, uint32 encounterId, Optional<PlayerIdentifier> player)
static bool HandleInstanceGetBossStateCommand(ChatHandler* handler, Optional<PlayerIdentifier> player)
{
// Character name must be provided when using this from console.
if (!player && !handler->GetSession())
@@ -237,15 +237,13 @@ public:
return false;
}
if (encounterId > map->GetInstanceScript()->GetEncounterCount())
for (uint8 i = 0; i < map->GetInstanceScript()->GetEncounterCount(); ++i)
{
handler->SendErrorMessage(LANG_BAD_VALUE);
return false;
uint32 state = map->GetInstanceScript()->GetBossState(i);
std::string stateName = InstanceScript::GetBossStateName(state);
handler->PSendSysMessage(LANG_COMMAND_INST_GET_BOSS_STATE, i, state, stateName);
}
uint32 state = map->GetInstanceScript()->GetBossState(encounterId);
std::string stateName = InstanceScript::GetBossStateName(state);
handler->PSendSysMessage(LANG_COMMAND_INST_GET_BOSS_STATE, encounterId, state, stateName);
return true;
}
};

View File

@@ -146,7 +146,8 @@ public:
{ "playall", HandlePlayAllCommand, SEC_GAMEMASTER, Console::No },
{ "skirmish", HandleSkirmishCommand, SEC_ADMINISTRATOR, Console::No },
{ "mailbox", HandleMailBoxCommand, SEC_MODERATOR, Console::No },
{ "string", HandleStringCommand, SEC_GAMEMASTER, Console::No }
{ "string", HandleStringCommand, SEC_GAMEMASTER, Console::No },
{ "opendoor", HandleOpenDoorCommand, SEC_GAMEMASTER, Console::No }
};
return commandTable;
@@ -3034,6 +3035,19 @@ public:
return true;
}
}
static bool HandleOpenDoorCommand(ChatHandler* handler, Optional<float> range)
{
if (GameObject* go = handler->GetPlayer()->FindNearestGameObjectOfType(GAMEOBJECT_TYPE_DOOR, range ? *range : 5.0f))
{
go->SetGoState(GO_STATE_ACTIVE);
handler->PSendSysMessage(LANG_CMD_DOOR_OPENED, go->GetName(), go->GetEntry());
return true;
}
handler->SendErrorMessage(LANG_CMD_NO_DOOR_FOUND, range ? *range : 5.0f);
return false;
}
};
void AddSC_misc_commandscript()

View File

@@ -385,19 +385,13 @@ struct npc_zuljin_vortex : public ScriptedAI
ChangeToNewPlayer();
}
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (spell->Id == SPELL_ZAP_INFORM)
DoCast(caster, SPELL_ZAP_DAMAGE, true);
}
void ChangeToNewPlayer()
{
DoResetThreatList();
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
{
me->AddThreat(target, 10000000.0f);
}
if (WorldObject* summoner = GetSummoner())
if (Creature* zuljin = summoner->ToCreature())
if (Unit* target = zuljin->AI()->SelectTarget(SelectTargetMethod::Random, 0, 80.0f, true))
me->AddThreat(target, 10000000.0f);
}
void UpdateAI(uint32 /*diff*/) override
@@ -442,9 +436,33 @@ class spell_claw_rage_aura : public AuraScript
}
};
// 42577 - Zap
class spell_zuljin_zap : public SpellScript
{
PrepareSpellScript(spell_zuljin_zap);
bool Validate(SpellInfo const* /*spell*/) override
{
return ValidateSpellInfo({ SPELL_ZAP_DAMAGE });
}
void HandleScript(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (Unit* victim = GetHitUnit())
victim->CastSpell(GetCaster(), SPELL_ZAP_DAMAGE, true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_zuljin_zap::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
void AddSC_boss_zuljin()
{
RegisterZulAmanCreatureAI(boss_zuljin);
RegisterZulAmanCreatureAI(npc_zuljin_vortex);
RegisterSpellScript(spell_claw_rage_aura);
RegisterSpellScript(spell_zuljin_zap);
}

View File

@@ -112,7 +112,6 @@ public:
LoadBossBoundaries(boundaries);
LoadDoorData(doorData);
LoadSummonData(summonData);
_chestLooted = 0;
for (uint8 i = 0; i < RAND_VENDOR; ++i)
RandVendor[i] = NOT_STARTED;
@@ -149,10 +148,10 @@ public:
void OnGameObjectCreate(GameObject* go) override
{
if (go->GetEntry() == GO_GATE_HEXLORD)
CheckInstanceStatus();
InstanceScript::OnGameObjectCreate(go);
if (go->GetEntry() == GO_GATE_HEXLORD)
CheckInstanceStatus(go);
}
void SummonHostage(uint8 num)
@@ -189,10 +188,10 @@ public:
}
}
void CheckInstanceStatus()
void CheckInstanceStatus(GameObject* gate = nullptr)
{
if (AllBossesDone({ DATA_NALORAKK, DATA_AKILZON, DATA_JANALAI, DATA_HALAZZI }))
HandleGameObject(ObjectGuid::Empty, true, GetGameObject(DATA_HEXLORD_GATE));
HandleGameObject(ObjectGuid::Empty, true, gate ? gate : GetGameObject(DATA_HEXLORD_GATE));
}
void SetData(uint32 type, uint32 data) override
@@ -211,7 +210,10 @@ public:
_akilzonGauntlet = DONE;
}
else if (type == DATA_CHEST_LOOTED)
++_chestLooted;
{
uint8 chestCount = GetPersistentData(DATA_CHEST_COUNT);
StorePersistentData(DATA_CHEST_COUNT, ++chestCount);
}
}
void StartAkilzonGauntlet()
@@ -249,6 +251,23 @@ public:
creature->Respawn(true);
}
void OnUnitDeath(Unit* unit) override
{
Creature* creature = unit->ToCreature();
if (!creature)
return;
switch (creature->GetEntry())
{
case NPC_AMINISHI_PROTECTOR:
case NPC_AMANISHI_WIND_WALKER:
if (_akilzonGauntlet == NOT_STARTED && AkilzonTrash.contains(creature->GetGUID()))
creature->DespawnOrUnsummon(30s, 1s);
default:
break;
}
}
void OnCreatureEvade(Creature* creature) override
{
switch (creature->GetEntry())
@@ -337,7 +356,7 @@ public:
else if (type == TYPE_AKILZON_GAUNTLET)
return _akilzonGauntlet;
else if (type == DATA_CHEST_LOOTED)
return _chestLooted;
return GetPersistentData(DATA_CHEST_COUNT);
return 0;
}
@@ -348,7 +367,6 @@ public:
}
private:
uint16 _chestLooted;
uint32 RandVendor[RAND_VENDOR];
GuidSet AkilzonTrash;
EncounterState _akilzonGauntlet = NOT_STARTED;

View File

@@ -561,7 +561,7 @@ struct npc_amanishi_lookout : public NullCreatureAI
void MoveInLineOfSight(Unit* who) override
{
if (!me->IsWithinDist(who, 25.0f, false)) // distance not confirmed
if (!me->IsWithinDist(who, me->GetAggroRange(who), false))
return;
Player* player = who->GetCharmerOrOwnerPlayerOrPlayerItself();
@@ -596,6 +596,29 @@ private:
InstanceScript* _instance;
};
struct npc_eagle_trash_aggro_trigger : public ScriptedAI
{
npc_eagle_trash_aggro_trigger(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) {}
void MoveInLineOfSight(Unit* who) override
{
if (who->GetLevel() > 70)
return;
if (!me->IsWithinDist(who, me->GetAggroRange(who), false))
return;
Player* player = who->GetCharmerOrOwnerPlayerOrPlayerItself();
if (!player || player->IsGameMaster())
return;
if (_instance->GetData(TYPE_AKILZON_GAUNTLET) == NOT_STARTED)
_instance->SetData(TYPE_AKILZON_GAUNTLET, IN_PROGRESS);
}
private:
InstanceScript* _instance;
};
enum AmanishiTempest
{
GROUP_AKILZON_GAUNTLET = 1,
@@ -845,6 +868,7 @@ void AddSC_zulaman()
RegisterZulAmanCreatureAI(npc_harrison_jones);
RegisterSpellScript(spell_ritual_of_power);
RegisterZulAmanCreatureAI(npc_amanishi_lookout);
RegisterZulAmanCreatureAI(npc_eagle_trash_aggro_trigger);
RegisterZulAmanCreatureAI(npc_amanishi_tempest);
RegisterZulAmanCreatureAI(npc_amanishi_scout);
RegisterSpellScript(spell_alert_drums);

View File

@@ -90,14 +90,17 @@ enum GameobjectIds
enum MiscIds
{
// Persistent data
DATA_TIMED_RUN = 0,
DATA_CHEST_COUNT = 1,
ACTION_START_TIMED_RUN = 0,
ACTION_START_AKILZON_GAUNTLET = 1,
ACTION_RESET_AKILZON_GAUNTLET = 2,
GROUP_TIMED_RUN = 1
};
uint32 constexpr PersistentDataCount = 1;
uint32 constexpr PersistentDataCount = 2;
template <class AI, class T>
inline AI* GetZulAmanAI(T* obj)

View File

@@ -114,7 +114,17 @@ public:
Map::PlayerList const& players = instance->GetPlayers();
if (!players.IsEmpty())
if (Player* pPlayer = players.begin()->GetSource())
TeamIdInInstance = pPlayer->GetTeamId();
{
if (Group* group = pPlayer->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
TeamIdInInstance = pPlayer->GetTeamId();
}
else
TeamIdInInstance = pPlayer->GetTeamId();
}
}
switch (creature->GetEntry())
@@ -271,9 +281,25 @@ public:
// EVENT STUFF BELOW:
void OnPlayerEnter(Player* plr) override
void OnPlayerEnter(Player* player) override
{
if (DoNeedCleanup(plr))
if (TeamIdInInstance == TEAM_NEUTRAL)
{
if (Group* group = player->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
TeamIdInInstance = player->GetTeamId();
}
else
TeamIdInInstance = player->GetTeamId();
}
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
player->SetFaction((TeamIdInInstance == TEAM_HORDE) ? 1610 : 1);
if (DoNeedCleanup(player))
{
InstanceCleanup();
}
@@ -281,6 +307,12 @@ public:
events.RescheduleEvent(EVENT_CHECK_PLAYERS, CLEANUP_CHECK_INTERVAL);
}
void OnPlayerLeave(Player* player) override
{
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
player->SetFactionForRace(player->getRace());
}
bool DoNeedCleanup(Player* ignoredPlayer = nullptr)
{
uint8 aliveCount = 0;

View File

@@ -1203,8 +1203,24 @@ public:
if (Player* plr = itr->GetSource())
if (!plr->IsGameMaster())
{
TeamIdInInstance = plr->GetTeamId();
break;
if (Group* group = plr->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
{
TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
break;
}
else
{
TeamIdInInstance = plr->GetTeamId();
break;
}
}
else
{
TeamIdInInstance = plr->GetTeamId();
break;
}
}
}
if (Creature* c = instance->GetCreature(TeamIdInInstance == TEAM_ALLIANCE ? NPC_VarianGUID : NPC_GarroshGUID))
@@ -1397,6 +1413,22 @@ public:
void OnPlayerEnter(Player* plr) override
{
if (TeamIdInInstance == TEAM_NEUTRAL)
{
if (Group* group = plr->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
TeamIdInInstance = plr->GetTeamId();
}
else
TeamIdInInstance = plr->GetTeamId();
}
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
plr->SetFaction((TeamIdInInstance == TEAM_HORDE) ? 1610 : 1);
if (instance->IsHeroic())
{
plr->SendUpdateWorldState(UPDATE_STATE_UI_SHOW, 1);
@@ -1416,6 +1448,12 @@ public:
events.RescheduleEvent(EVENT_CHECK_PLAYERS, 5s);
}
void OnPlayerLeave(Player* player) override
{
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
player->SetFactionForRace(player->getRace());
}
bool DoNeedCleanup(Player* ignoredPlayer = nullptr)
{
uint8 aliveCount = 0;

View File

@@ -19,6 +19,7 @@
#include "Player.h"
#include "ScriptedCreature.h"
#include "forge_of_souls.h"
#include "Group.h"
BossBoundaryData const boundaries =
{
@@ -69,8 +70,24 @@ public:
return false;
}
void OnPlayerEnter(Player* /*plr*/) override
void OnPlayerEnter(Player* player) override
{
if (teamIdInInstance == TEAM_NEUTRAL)
{
if (Group* group = player->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
teamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
teamIdInInstance = player->GetTeamId();
}
else
teamIdInInstance = player->GetTeamId();
}
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
player->SetFaction((teamIdInInstance == TEAM_HORDE) ? 1610 : 1);
// this will happen only after crash and loading the instance from db
if (m_auiEncounter[0] == DONE && m_auiEncounter[1] == DONE && (!NPC_LeaderSecondGUID || !instance->GetCreature(NPC_LeaderSecondGUID)))
{
@@ -79,6 +96,12 @@ public:
}
}
void OnPlayerLeave(Player* player) override
{
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
player->SetFactionForRace(player->getRace());
}
void OnCreatureCreate(Creature* creature) override
{
if (teamIdInInstance == TEAM_NEUTRAL)
@@ -86,7 +109,17 @@ public:
Map::PlayerList const& players = instance->GetPlayers();
if (!players.IsEmpty())
if (Player* player = players.begin()->GetSource())
teamIdInInstance = player->GetTeamId();
{
if (Group* group = player->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
teamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
teamIdInInstance = player->GetTeamId();
}
else
teamIdInInstance = player->GetTeamId();
}
}
switch (creature->GetEntry())

View File

@@ -20,6 +20,7 @@
#include "Transport.h"
#include "halls_of_reflection.h"
#include "InstanceScript.h"
#include "Group.h"
class UtherBatteredHiltEvent : public BasicEvent
{
@@ -213,6 +214,31 @@ public:
return (instance->HavePlayers() && WaveNumber) || IsDuringLKFight; // during LK fight npcs are active and will unset this variable
}
void OnPlayerEnter(Player* player) override
{
if (TeamIdInInstance == TEAM_NEUTRAL)
{
if (Group* group = player->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
TeamIdInInstance = player->GetTeamId();
}
else
TeamIdInInstance = player->GetTeamId();
}
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
player->SetFaction((TeamIdInInstance == TEAM_HORDE) ? 1610 : 1);
}
void OnPlayerLeave(Player* player) override
{
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
player->SetFactionForRace(player->getRace());
}
void OnCreatureCreate(Creature* creature) override
{
if (TeamIdInInstance == TEAM_NEUTRAL)
@@ -223,8 +249,24 @@ public:
if (Player* p = itr->GetSource())
if (!p->IsGameMaster())
{
TeamIdInInstance = p->GetTeamId();
break;
if (Group* group = p->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
{
TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
break;
}
else
{
TeamIdInInstance = p->GetTeamId();
break;
}
}
else
{
TeamIdInInstance = p->GetTeamId();
break;
}
}
}

View File

@@ -20,6 +20,7 @@
#include "Player.h"
#include "ScriptedCreature.h"
#include "pit_of_saron.h"
#include "Group.h"
class instance_pit_of_saron : public InstanceMapScript
{
@@ -75,13 +76,35 @@ public:
return false;
}
void OnPlayerEnter(Player* /*plr*/) override
void OnPlayerEnter(Player* player) override
{
if (teamIdInInstance == TEAM_NEUTRAL)
{
if (Group* group = player->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
teamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
teamIdInInstance = player->GetTeamId();
}
else
teamIdInInstance = player->GetTeamId();
}
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
player->SetFaction((teamIdInInstance == TEAM_HORDE) ? 1610 : 1);
instance->LoadGrid(LeaderIntroPos.GetPositionX(), LeaderIntroPos.GetPositionY());
if (Creature* c = instance->GetCreature(GetGuidData(DATA_LEADER_FIRST_GUID)))
c->AI()->SetData(DATA_START_INTRO, 0);
}
void OnPlayerLeave(Player* player) override
{
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
player->SetFactionForRace(player->getRace());
}
uint32 GetCreatureEntry(ObjectGuid::LowType /*guidLow*/, CreatureData const* data) override
{
if (teamIdInInstance == TEAM_NEUTRAL)
@@ -89,7 +112,17 @@ public:
Map::PlayerList const& players = instance->GetPlayers();
if (!players.IsEmpty())
if (Player* player = players.begin()->GetSource())
teamIdInInstance = player->GetTeamId();
{
if (Group* group = player->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
teamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
teamIdInInstance = player->GetTeamId();
}
else
teamIdInInstance = player->GetTeamId();
}
}
uint32 entry = data->id1;
@@ -115,7 +148,17 @@ public:
Map::PlayerList const& players = instance->GetPlayers();
if (!players.IsEmpty())
if (Player* player = players.begin()->GetSource())
teamIdInInstance = player->GetTeamId();
{
if (Group* group = player->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
teamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
teamIdInInstance = player->GetTeamId();
}
else
teamIdInInstance = player->GetTeamId();
}
}
switch (creature->GetEntry())

View File

@@ -262,7 +262,20 @@ public:
void OnPlayerEnter(Player* player) override
{
if (TeamIdInInstance == TEAM_NEUTRAL)
TeamIdInInstance = player->GetTeamId();
{
if (Group* group = player->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
TeamIdInInstance = player->GetTeamId();
}
else
TeamIdInInstance = player->GetTeamId();
}
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
player->SetFaction((TeamIdInInstance == TEAM_HORDE) ? 1610 : 1);
// for professor putricide hc
DoRemoveAurasDueToSpellOnPlayers(SPELL_GAS_VARIABLE);
@@ -293,6 +306,12 @@ public:
}
}
void OnPlayerLeave(Player* player) override
{
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
player->SetFactionForRace(player->getRace());
}
void OnCreatureCreate(Creature* creature) override
{
if (TeamIdInInstance == TEAM_NEUTRAL)
@@ -300,7 +319,17 @@ public:
Map::PlayerList const& players = instance->GetPlayers();
if (!players.IsEmpty())
if (Player* player = players.begin()->GetSource())
TeamIdInInstance = player->GetTeamId();
{
if (Group* group = player->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
TeamIdInInstance = player->GetTeamId();
}
else
TeamIdInInstance = player->GetTeamId();
}
}
// apply ICC buff to pets/summons
@@ -537,6 +566,7 @@ public:
}
InstanceScript::OnCreatureCreate(creature);
}
void OnCreatureRemove(Creature* creature) override
@@ -554,7 +584,17 @@ public:
Map::PlayerList const& players = instance->GetPlayers();
if (!players.IsEmpty())
if (Player* player = players.begin()->GetSource())
TeamIdInInstance = player->GetTeamId();
{
if (Group* group = player->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
TeamIdInInstance = player->GetTeamId();
}
else
TeamIdInInstance = player->GetTeamId();
}
}
uint32 entry = data->id1;
@@ -599,7 +639,17 @@ public:
Map::PlayerList const& players = instance->GetPlayers();
if (!players.IsEmpty())
if (Player* player = players.begin()->GetSource())
TeamIdInInstance = player->GetTeamId();
{
if (Group* group = player->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
TeamIdInInstance = player->GetTeamId();
}
else
TeamIdInInstance = player->GetTeamId();
}
}
switch (entry)
@@ -703,7 +753,17 @@ public:
Map::PlayerList const& players = instance->GetPlayers();
if (!players.IsEmpty())
if (Player* player = players.begin()->GetSource())
TeamIdInInstance = player->GetTeamId();
{
if (Group* group = player->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
TeamIdInInstance = player->GetTeamId();
}
else
TeamIdInInstance = player->GetTeamId();
}
}
switch (go->GetEntry())

View File

@@ -20,6 +20,7 @@
#include "ScriptedCreature.h"
#include "nexus.h"
#include "Player.h"
#include "Group.h"
DoorData const doorData[] =
{
@@ -48,15 +49,29 @@ public:
SetHeaders(DataHeader);
SetBossNumber(MAX_ENCOUNTERS);
LoadDoorData(doorData);
TeamIdInInstance = TEAM_NEUTRAL;
}
void OnCreatureCreate(Creature* creature) override
{
Map::PlayerList const& players = instance->GetPlayers();
TeamId TeamIdInInstance = TEAM_NEUTRAL;
if (!players.IsEmpty())
if (Player* pPlayer = players.begin()->GetSource())
TeamIdInInstance = pPlayer->GetTeamId();
if (TeamIdInInstance == TEAM_NEUTRAL)
{
Map::PlayerList const& players = instance->GetPlayers();
if (!players.IsEmpty())
if (Player* pPlayer = players.begin()->GetSource())
{
if (Group* group = pPlayer->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
TeamIdInInstance = pPlayer->GetTeamId();
}
else
TeamIdInInstance = pPlayer->GetTeamId();
}
}
switch (creature->GetEntry())
{
@@ -88,6 +103,31 @@ public:
}
}
void OnPlayerEnter(Player* player) override
{
if (TeamIdInInstance == TEAM_NEUTRAL)
{
if (Group* group = player->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
TeamIdInInstance = player->GetTeamId();
}
else
TeamIdInInstance = player->GetTeamId();
}
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
player->SetFaction((TeamIdInInstance == TEAM_HORDE) ? 1610 : 1);
}
void OnPlayerLeave(Player* player) override
{
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
player->SetFactionForRace(player->getRace());
}
void OnGameObjectCreate(GameObject* gameObject) override
{
switch (gameObject->GetEntry())
@@ -154,6 +194,8 @@ public:
(*i)->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
return true;
}
protected:
TeamId TeamIdInInstance;
};
};

View File

@@ -21,6 +21,7 @@
#include "InstanceMapScript.h"
#include "InstanceScript.h"
#include "shattered_halls.h"
#include "Group.h"
ObjectData const creatureData[] =
{
@@ -66,7 +67,26 @@ public:
void OnPlayerEnter(Player* player) override
{
if (TeamIdInInstance == TEAM_NEUTRAL)
TeamIdInInstance = player->GetTeamId();
{
if (Group* group = player->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
TeamIdInInstance = player->GetTeamId();
}
else
TeamIdInInstance = player->GetTeamId();
}
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
player->SetFaction((TeamIdInInstance == TEAM_HORDE) ? 1610 : 1);
}
void OnPlayerLeave(Player* player) override
{
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
player->SetFactionForRace(player->getRace());
}
void OnCreatureCreate(Creature* creature) override
@@ -76,7 +96,17 @@ public:
Map::PlayerList const& players = instance->GetPlayers();
if (!players.IsEmpty())
if (Player* player = players.begin()->GetSource())
TeamIdInInstance = player->GetTeamId();
{
if (Group* group = player->GetGroup())
{
if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()))
TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace());
else
TeamIdInInstance = player->GetTeamId();
}
else
TeamIdInInstance = player->GetTeamId();
}
}
switch (creature->GetEntry())
@@ -84,22 +114,26 @@ public:
case NPC_SHATTERED_EXECUTIONER:
if (RescueTimer > 25 * MINUTE * IN_MILLISECONDS)
creature->AddLootMode(2);
executionerGUID = creature->GetGUID();
ExecutionerGUID = creature->GetGUID();
break;
case NPC_RIFLEMAN_BROWNBEARD:
if (TeamIdInInstance == TEAM_HORDE)
creature->UpdateEntry(NPC_KORAG_PROUDMANE);
prisonerGUID[0] = creature->GetGUID();
PrisonerGUID[0] = creature->GetGUID();
break;
case NPC_CAPTAIN_ALINA:
if (TeamIdInInstance == TEAM_HORDE)
creature->UpdateEntry(NPC_CAPTAIN_BONESHATTER);
prisonerGUID[1] = creature->GetGUID();
PrisonerGUID[1] = creature->GetGUID();
break;
case NPC_PRIVATE_JACINT:
if (TeamIdInInstance == TEAM_HORDE)
creature->UpdateEntry(NPC_SCOUT_ORGARR);
prisonerGUID[2] = creature->GetGUID();
PrisonerGUID[2] = creature->GetGUID();
break;
case NPC_RANDY_WHIZZLESPROCKET:
if (TeamIdInInstance == TEAM_HORDE)
creature->UpdateEntry(NPC_DRISELLA);
break;
}
InstanceScript::OnCreatureCreate(creature);
@@ -126,9 +160,9 @@ public:
case DATA_PRISONER_1:
case DATA_PRISONER_2:
case DATA_PRISONER_3:
return prisonerGUID[data - DATA_PRISONER_1];
return PrisonerGUID[data - DATA_PRISONER_1];
case DATA_EXECUTIONER:
return executionerGUID;
return ExecutionerGUID;
}
return ObjectGuid::Empty;
@@ -144,22 +178,22 @@ public:
{
DoRemoveAurasDueToSpellOnPlayers(SPELL_KARGATHS_EXECUTIONER_1);
DoCastSpellOnPlayers(SPELL_KARGATHS_EXECUTIONER_2);
if (Creature* prisoner = instance->GetCreature(prisonerGUID[0]))
if (Creature* prisoner = instance->GetCreature(PrisonerGUID[0]))
Unit::Kill(prisoner, prisoner);
if (Creature* executioner = instance->GetCreature(executionerGUID))
if (Creature* executioner = instance->GetCreature(ExecutionerGUID))
executioner->RemoveLootMode(2);
}
else if ((RescueTimer / IN_MILLISECONDS) == 15 * MINUTE)
{
DoRemoveAurasDueToSpellOnPlayers(SPELL_KARGATHS_EXECUTIONER_2);
DoCastSpellOnPlayers(SPELL_KARGATHS_EXECUTIONER_3);
if (Creature* prisoner = instance->GetCreature(prisonerGUID[1]))
if (Creature* prisoner = instance->GetCreature(PrisonerGUID[1]))
Unit::Kill(prisoner, prisoner);
}
else if ((RescueTimer / IN_MILLISECONDS) == 0)
{
DoRemoveAurasDueToSpellOnPlayers(SPELL_KARGATHS_EXECUTIONER_3);
if (Creature* prisoner = instance->GetCreature(prisonerGUID[2]))
if (Creature* prisoner = instance->GetCreature(PrisonerGUID[2]))
Unit::Kill(prisoner, prisoner);
}
}
@@ -176,8 +210,8 @@ public:
}
protected:
ObjectGuid executionerGUID;
ObjectGuid prisonerGUID[3];
ObjectGuid ExecutionerGUID;
ObjectGuid PrisonerGUID[3];
uint32 RescueTimer;
TeamId TeamIdInInstance;
};

View File

@@ -66,6 +66,11 @@ enum CreatureIds
NPC_KORAG_PROUDMANE = 17295,
NPC_CAPTAIN_BONESHATTER = 17296,
NPC_SCOUT_ORGARR = 17297,
//Drisella
NPC_DRISELLA = 17294,
// Randy Whizzlesprocket
NPC_RANDY_WHIZZLESPROCKET = 17288,
};
enum GameobjectIds

View File

@@ -340,7 +340,8 @@ private:
/* 55640 - Lightweave Embroidery
67698 - Item - Coliseum 25 Normal Healer Trinket
67752 - Item - Coliseum 25 Heroic Healer Trinket
69762 - Unchained Magic */
69762 - Unchained Magic
43983 - Energy Storm */
class spell_gen_allow_proc_from_spells_with_cost : public AuraScript
{
PrepareAuraScript(spell_gen_allow_proc_from_spells_with_cost);
@@ -5379,6 +5380,26 @@ class spell_pet_spellhit_expertise_spellpen_scaling : public AuraScript
}
};
// 7098 - Curse of Mending
// 39647 - Curse of Mending
class spell_gen_proc_on_victim : public AuraScript
{
PrepareAuraScript(spell_gen_proc_on_victim);
void OnProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
if (Unit* target = eventInfo.GetActionTarget())
GetUnitOwner()->CastSpell(target, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, true);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_gen_proc_on_victim::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
void AddSC_generic_spell_scripts()
{
RegisterSpellScript(spell_silithyst);
@@ -5538,4 +5559,5 @@ void AddSC_generic_spell_scripts()
RegisterSpellScript(spell_gen_steal_weapon);
RegisterSpellScript(spell_gen_set_health);
RegisterSpellScript(spell_pet_spellhit_expertise_spellpen_scaling);
RegisterSpellScript(spell_gen_proc_on_victim);
}