Merge remote-tracking branch 'acore/master' into test-staging

This commit is contained in:
Celandriel
2026-04-21 23:57:34 +00:00
30 changed files with 708 additions and 525 deletions

View File

@@ -0,0 +1,82 @@
-- DB update 2026_04_17_01 -> 2026_04_17_02
-- Clean useless Trigger GUID SAI and Comment
UPDATE `creature` SET `Comment` = '' WHERE (`id1` = 23837) AND (`guid` IN (98562));
DELETE FROM `smart_scripts` WHERE (`entryorguid` = -98562) AND (`source_type` = 0);
-- Set Heb'Jin's Drum SAI
UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' WHERE `entry` = 190695;
DELETE FROM `smart_scripts` WHERE (`source_type` = 1 AND `entryorguid` = 190695);
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
(190695, 1, 0, 1, 70, 0, 100, 0, 2, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Drum - On Gameobject State Changed - Store Targetlist'),
(190695, 1, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 19069500, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Drum - On Gameobject State Changed - Run Script');
-- Set Heb'Jin's Drum Action List
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 19069500);
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
(19069500, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 28636, 6, 30000, 0, 0, 0, 8, 0, 0, 0, 0, 5988.71, -3878.04, 417.15, 2.35619, 'Heb\'Jin\'s Drum - Actionlist - Summon Creature \'Heb\'Jin\''),
(19069500, 9, 1, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 11, 28636, 300, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Drum - Actionlist - Send Target 1'),
(19069500, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 223, 40, 0, 0, 0, 0, 0, 204, 28636, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Drum - Actionlist - Do Action ID 40');
-- Set Heb'Jin SAI
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28636;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28636);
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
(28636, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2863600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - On Just Summoned - Run Script'),
(28636, 0, 1, 0, 72, 0, 100, 0, 41, 0, 0, 0, 0, 0, 80, 2863601, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - On Action 41 Done - Run Script'),
(28636, 0, 2, 0, 0, 0, 100, 0, 1000, 1000, 7000, 8000, 0, 0, 11, 12734, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - In Combat - Cast \'Ground Smash\''),
(28636, 0, 3, 0, 0, 0, 100, 0, 5000, 5000, 10000, 12000, 0, 0, 11, 15548, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - In Combat - Cast \'Thunderclap\''),
(28636, 0, 4, 0, 7, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - On Evade - Despawn Instant');
-- Set Heb'Jin Action List
DELETE FROM `smart_scripts` WHERE (`source_type` = 9) AND (`entryorguid` IN (2863600, 2863601));
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
(2863600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52353, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - Actionlist - Cast \'Script Effect - Creature Capture GUID to Dot Variable\''),
(2863600, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 12, 28639, 6, 30000, 0, 0, 0, 8, 0, 0, 0, 0, 5984.55, -3882.62, 417.438, 1.91986, 'Heb\'Jin - Actionlist - Summon Creature \'Heb\'Jin\'s Bat\''),
(2863600, 9, 2, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 28639, 10, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - Actionlist - Send Target 1'),
(2863600, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 52154, 0, 0, 0, 0, 0, 19, 28639, 10, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - Actionlist - Cast \'Taunt\''),
(2863600, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 4, 12009, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - Actionlist - Play Sound 12009'),
(2863600, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - Actionlist - Play Emote 5'),
(2863600, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - Actionlist - Say Line 0'),
(2863600, 9, 7, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 0, 0, 5, 15, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - Actionlist - Play Emote 15'),
(2863600, 9, 8, 0, 0, 0, 100, 0, 150, 150, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - Actionlist - Say Line 1'),
(2863600, 9, 9, 0, 0, 0, 100, 0, 2400, 2400, 0, 0, 0, 0, 11, 43671, 0, 0, 0, 0, 0, 19, 28639, 10, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - Actionlist - Cast \'Ride Vehicle\''),
(2863601, 9, 0, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - Actionlist - Set Home Position'),
(2863601, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - Actionlist - Remove Flags Immune To Players'),
(2863601, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - Actionlist - Start Attacking'),
(2863601, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin - Actionlist - Say Line 2');
-- Set Heb'Jin's Bat SAI
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28639;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28639);
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
(28639, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 91, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Bat - On Respawn - Remove FlagStandstate Dead'),
(28639, 0, 1, 0, 8, 0, 100, 0, 52154, 0, 0, 0, 0, 0, 11, 52353, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Bat - On Spellhit \'Taunt\' - Cast \'Script Effect - Creature Capture GUID to Dot Variable\''),
(28639, 0, 2, 0, 27, 0, 100, 1, 0, 0, 0, 0, 0, 0, 53, 2, 28639, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Bat - On Passenger Boarded - Start Waypoint Path 28639 (No Repeat)'),
(28639, 0, 3, 4, 40, 0, 100, 0, 4, 28639, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Bat - On Point 4 of Path 28639 Reached - Set Home Position'),
(28639, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 28, 43671, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Bat - On Point 4 of Path 28639 Reached - Remove Aura \'Ride Vehicle\''),
(28639, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 41, 0, 0, 0, 0, 0, 19, 28636, 10, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Bat - On Point 4 of Path 28639 Reached - Do Action ID 41'),
(28639, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2863900, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Bat - On Point 4 of Path 28639 Reached - Run Script'),
(28639, 0, 7, 8, 8, 0, 100, 0, 52151, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Bat - On Spellhit \'Bat Net\' - Set Flags Immune To Players'),
(28639, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 90, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Bat - On Spellhit \'Bat Net\' - Set Flag Standstate Dead'),
(28639, 0, 9, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Bat - On Spellhit \'Bat Net\' - Despawn In 5000 ms'),
(28639, 0, 10, 0, 7, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Bat - On Evade - Despawn Instant');
-- Set Heb'Jin's Bat Action List
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2863900);
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
(2863900, 9, 0, 0, 0, 0, 100, 0, 3000, 4000, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Bat - Actionlist - Remove Flags Immune To Players'),
(2863900, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Bat - Actionlist - Set Reactstate Aggressive'),
(2863900, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Heb\'Jin\'s Bat - Actionlist - Start Attacking');
-- Update Old Conditions
UPDATE `conditions` SET `SourceEntry` = 190695, `SourceId` = 1 WHERE (`SourceTypeOrReferenceId` = 22) AND (`SourceGroup` = 1) AND (`SourceEntry` = -98562) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 29) AND (`ConditionTarget` = 1) AND (`ConditionValue1` IN (28636, 28639)) AND (`ConditionValue2` = 200) AND (`ConditionValue3` = 0);
-- Quest Bringing Down Heb'Jin needs Sealing the Rifts to be taken.
UPDATE `quest_template_addon` SET `PrevQuestID` = 12640 WHERE (`ID` = 12662);
-- Quest The Leaders at Jin'Alai needs To the Witch Doctor to be taken.
UPDATE `quest_template_addon` SET `PrevQuestID` = 12623 WHERE (`ID` = 12622);

View File

@@ -0,0 +1,9 @@
-- DB update 2026_04_17_02 -> 2026_04_20_00
DELETE FROM `spell_script_names` WHERE `spell_id` IN (45057, 52420, 71634, 71640, 75475, 75481) OR `ScriptName` IN ('spell_item_commendation_of_kaelthas', 'spell_item_corpse_tongue_coin', 'spell_item_corpse_tongue_coin_heroic', 'spell_item_petrified_twilight_scale', 'spell_item_petrified_twilight_scale_heroic', 'spell_item_soul_harvesters_charm');
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(45057, 'spell_item_proc_below_pct_damaged'),
(52420, 'spell_item_proc_below_pct_damaged'),
(71634, 'spell_item_proc_below_pct_damaged'),
(71640, 'spell_item_proc_below_pct_damaged'),
(75475, 'spell_item_proc_below_pct_damaged'),
(75481, 'spell_item_proc_below_pct_damaged');

View File

@@ -0,0 +1,5 @@
-- DB update 2026_04_20_00 -> 2026_04_20_01
-- Set Disable Gravity from Power Spark to Power Spark (1)
DELETE FROM `creature_template_movement` WHERE (`CreatureId` = 32187);
INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`, `InteractionPauseTimer`) VALUES
(32187, 0, 0, 1, 0, 0, 0, 0);

View File

@@ -0,0 +1,7 @@
-- DB update 2026_04_20_01 -> 2026_04_20_02
UPDATE `quest_poi` SET `MapID` = 571, `WorldMapAreaId` = 491 WHERE `QuestID` = 11527;
DELETE FROM `quest_poi_points` WHERE `QuestID` = 11527;
INSERT INTO `quest_poi_points` (`QuestID`, `Idx1`, `Idx2`, `X`, `Y`, `VerifiedBuild`) VALUES
(11527, 0, 0, 118, -3697, 0),
(11527, 1, 0, 118, -3697, 0);

View File

@@ -0,0 +1,4 @@
-- DB update 2026_04_20_02 -> 2026_04_20_03
--
-- Update Guvan to train beyond starter priest spells
UPDATE `creature_default_trainer` SET `TrainerId` = 11 WHERE (`CreatureId` = 17482);

View File

@@ -0,0 +1,21 @@
-- DB update 2026_04_20_03 -> 2026_04_20_04
-- Remove useless rows & remove link from row 0.
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28406;
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28406) AND (`source_type` = 0) AND (`id` IN (0, 1, 2, 3));
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
(28406, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Knight Initiate - On Respawn - Set Event Phase 1');
-- Remove useless rows from Action Lists.
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2840601) AND (`source_type` = 9) AND (`id` IN (7, 8));
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
(2840601, 9, 7, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Knight Initiate - Actionlist - Despawn Instant');
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2840602) AND (`source_type` = 9) AND (`id` IN (5, 6));
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
(2840602, 9, 5, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Knight Initiate - Actionlist - Despawn Instant');
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2840611) AND (`source_type` = 9) AND (`id` IN (7, 8));
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
(2840611, 9, 7, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Knight Initiate - Actionlist - Despawn Instant');

View File

@@ -0,0 +1,219 @@
-- DB update 2026_04_20_04 -> 2026_04_20_05
-- Set equipment_id to 0
UPDATE `creature` SET `equipment_id` = 0 WHERE (`id1` IN (29519, 29520, 29565, 29566, 29567));
-- Set Emotes for Unworthy Initiate texts.
UPDATE `creature_text` SET `Emote` = 1 WHERE `GroupID` = 0 AND (`CreatureID` IN (29519, 29520, 29565, 29566, 29567));
UPDATE `creature_text` SET `Emote` = 397 WHERE `GroupID` = 1 AND (`CreatureID` IN (29519, 29520, 29565, 29566, 29567));
-- Set SAI for Acherus Soul Prisons.
UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI', `ScriptName` = '' WHERE (`entry` IN (191577, 191580, 191581, 191582, 191583, 191584, 191585, 191586, 191587, 191588, 191589, 191590));
DELETE FROM `smart_scripts` WHERE (`source_type` = 1) AND (`entryorguid` IN (191577, 191580, 191581, 191582, 191583, 191584, 191585, 191586, 191587, 191588, 191589, 191590));
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
(191577, 1, 0, 1, 64, 0, 100, 0, 1, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Store Targetlist'),
(191577, 1, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Send Target 1'),
(191577, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 20, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Do Action ID 20'),
(191580, 1, 0, 1, 64, 0, 100, 0, 1, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Store Targetlist'),
(191580, 1, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Send Target 1'),
(191580, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 20, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Do Action ID 20'),
(191581, 1, 0, 1, 64, 0, 100, 0, 1, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Store Targetlist'),
(191581, 1, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Send Target 1'),
(191581, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 20, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Do Action ID 20'),
(191582, 1, 0, 1, 64, 0, 100, 0, 1, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Store Targetlist'),
(191582, 1, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Send Target 1'),
(191582, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 20, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Do Action ID 20'),
(191583, 1, 0, 1, 64, 0, 100, 0, 1, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Store Targetlist'),
(191583, 1, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Send Target 1'),
(191583, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 20, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Do Action ID 20'),
(191584, 1, 0, 1, 64, 0, 100, 0, 1, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Store Targetlist'),
(191584, 1, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Send Target 1'),
(191584, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 20, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Do Action ID 20'),
(191585, 1, 0, 1, 64, 0, 100, 0, 1, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Store Targetlist'),
(191585, 1, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Send Target 1'),
(191585, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 20, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Do Action ID 20'),
(191586, 1, 0, 1, 64, 0, 100, 0, 1, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Store Targetlist'),
(191586, 1, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Send Target 1'),
(191586, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 20, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Do Action ID 20'),
(191587, 1, 0, 1, 64, 0, 100, 0, 1, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Store Targetlist'),
(191587, 1, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Send Target 1'),
(191587, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 20, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Do Action ID 20'),
(191588, 1, 0, 1, 64, 0, 100, 0, 1, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Store Targetlist'),
(191588, 1, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Send Target 1'),
(191588, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 20, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Do Action ID 20'),
(191589, 1, 0, 1, 64, 0, 100, 0, 1, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Store Targetlist'),
(191589, 1, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Send Target 1'),
(191589, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 20, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Do Action ID 20'),
(191590, 1, 0, 1, 64, 0, 100, 0, 1, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Store Targetlist'),
(191590, 1, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Send Target 1'),
(191590, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 20, 0, 0, 0, 0, 0, 19, 29521, 2, 0, 0, 0, 0, 0, 0, 'Acherus Soul Prison - On Gossip Hello - Do Action ID 20');
-- Set SAI for Unworthy Initiates.
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE (`entry` IN (29519, 29520, 29565, 29566, 29567));
DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (29519, 29520, 29565, 29566, 29567));
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
(29519, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Flags Immune To Players'),
(29519, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Reactstate Passive'),
(29519, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 19, 29521, 5, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Cast \'Chained Peasant (Chest)\''),
(29519, 0, 3, 4, 72, 0, 100, 0, 21, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Remove Aura \'Chained Peasant (Chest)\''),
(29519, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2951900, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Run Script'),
(29519, 0, 5, 0, 0, 0, 100, 0, 1000, 1000, 5000, 5000, 0, 0, 11, 52372, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Icy Touch\''),
(29519, 0, 6, 0, 0, 0, 100, 0, 2000, 2000, 5000, 5000, 0, 0, 11, 52374, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Blood Strike\''),
(29519, 0, 7, 0, 0, 0, 100, 0, 3000, 3000, 5000, 5000, 0, 0, 11, 52373, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Plague Strike\''),
(29519, 0, 8, 0, 0, 0, 100, 0, 5000, 5000, 5000, 5000, 0, 0, 11, 52375, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Death Coil\''),
(29519, 0, 9, 0, 7, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Evade - Despawn In 3000 ms'),
(29519, 0, 10, 0, 1, 1, 100, 0, 15000, 15000, 15000, 15000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Out of Combat - Despawn Instant (Phase 1)'),
(29520, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Flags Immune To Players'),
(29520, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Reactstate Passive'),
(29520, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 19, 29521, 5, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Cast \'Chained Peasant (Chest)\''),
(29520, 0, 3, 4, 72, 0, 100, 0, 21, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Remove Aura \'Chained Peasant (Chest)\''),
(29520, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2951900, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Run Script'),
(29520, 0, 5, 0, 0, 0, 100, 0, 1000, 1000, 5000, 5000, 0, 0, 11, 52372, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Icy Touch\''),
(29520, 0, 6, 0, 0, 0, 100, 0, 2000, 2000, 5000, 5000, 0, 0, 11, 52374, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Blood Strike\''),
(29520, 0, 7, 0, 0, 0, 100, 0, 3000, 3000, 5000, 5000, 0, 0, 11, 52373, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Plague Strike\''),
(29520, 0, 8, 0, 0, 0, 100, 0, 5000, 5000, 5000, 5000, 0, 0, 11, 52375, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Death Coil\''),
(29520, 0, 9, 0, 7, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Evade - Despawn In 3000 ms'),
(29520, 0, 10, 0, 1, 1, 100, 0, 15000, 15000, 15000, 15000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Out of Combat - Despawn Instant (Phase 1)'),
(29565, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Flags Immune To Players'),
(29565, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Reactstate Passive'),
(29565, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 19, 29521, 5, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Cast \'Chained Peasant (Chest)\''),
(29565, 0, 3, 4, 72, 0, 100, 0, 21, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Remove Aura \'Chained Peasant (Chest)\''),
(29565, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2951900, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Run Script'),
(29565, 0, 5, 0, 0, 0, 100, 0, 1000, 1000, 5000, 5000, 0, 0, 11, 52372, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Icy Touch\''),
(29565, 0, 6, 0, 0, 0, 100, 0, 2000, 2000, 5000, 5000, 0, 0, 11, 52374, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Blood Strike\''),
(29565, 0, 7, 0, 0, 0, 100, 0, 3000, 3000, 5000, 5000, 0, 0, 11, 52373, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Plague Strike\''),
(29565, 0, 8, 0, 0, 0, 100, 0, 5000, 5000, 5000, 5000, 0, 0, 11, 52375, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Death Coil\''),
(29565, 0, 9, 0, 7, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Evade - Despawn In 3000 ms'),
(29565, 0, 10, 0, 1, 1, 100, 0, 15000, 15000, 15000, 15000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Out of Combat - Despawn Instant (Phase 1)'),
(29566, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Flags Immune To Players'),
(29566, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Reactstate Passive'),
(29566, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 19, 29521, 5, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Cast \'Chained Peasant (Chest)\''),
(29566, 0, 3, 4, 72, 0, 100, 0, 21, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Remove Aura \'Chained Peasant (Chest)\''),
(29566, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2951900, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Run Script'),
(29566, 0, 5, 0, 0, 0, 100, 0, 1000, 1000, 5000, 5000, 0, 0, 11, 52372, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Icy Touch\''),
(29566, 0, 6, 0, 0, 0, 100, 0, 2000, 2000, 5000, 5000, 0, 0, 11, 52374, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Blood Strike\''),
(29566, 0, 7, 0, 0, 0, 100, 0, 3000, 3000, 5000, 5000, 0, 0, 11, 52373, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Plague Strike\''),
(29566, 0, 8, 0, 0, 0, 100, 0, 5000, 5000, 5000, 5000, 0, 0, 11, 52375, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Death Coil\''),
(29566, 0, 9, 0, 7, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Evade - Despawn In 3000 ms'),
(29566, 0, 10, 0, 1, 1, 100, 0, 15000, 15000, 15000, 15000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Out of Combat - Despawn Instant (Phase 1)'),
(29567, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Flags Immune To Players'),
(29567, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Reactstate Passive'),
(29567, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 19, 29521, 5, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Cast \'Chained Peasant (Chest)\''),
(29567, 0, 3, 4, 72, 0, 100, 0, 21, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Remove Aura \'Chained Peasant (Chest)\''),
(29567, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2951900, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Run Script'),
(29567, 0, 5, 0, 0, 0, 100, 0, 1000, 1000, 5000, 5000, 0, 0, 11, 52372, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Icy Touch\''),
(29567, 0, 6, 0, 0, 0, 100, 0, 2000, 2000, 5000, 5000, 0, 0, 11, 52374, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Blood Strike\''),
(29567, 0, 7, 0, 0, 0, 100, 0, 3000, 3000, 5000, 5000, 0, 0, 11, 52373, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Plague Strike\''),
(29567, 0, 8, 0, 0, 0, 100, 0, 5000, 5000, 5000, 5000, 0, 0, 11, 52375, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Death Coil\''),
(29567, 0, 9, 0, 7, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Evade - Despawn In 3000 ms'),
(29567, 0, 10, 0, 1, 1, 100, 0, 15000, 15000, 15000, 15000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Out of Combat - Despawn Instant (Phase 1)');
-- Set Action List.
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2951900);
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
(2951900, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Actionlist - Remove FlagStandstate Kneel'),
(2951900, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Actionlist - Say Line 0'),
(2951900, 9, 2, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 66, 1, 0, 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Actionlist - Set Orientation [unsupported target type]'),
(2951900, 9, 3, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 46, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Actionlist - Move Forward 2 Yards'),
(2951900, 9, 4, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 5, 381, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Actionlist - Play Emote 381'),
(2951900, 9, 5, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 51519, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Actionlist - Cast \'Death Knight Initiate Visual\''),
(2951900, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 124, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Actionlist - Load Equipment Id 1'),
(2951900, 9, 7, 0, 0, 0, 100, 0, 1500, 1500, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Actionlist - Set Orientation Stored'),
(2951900, 9, 8, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Actionlist - Say Line 1'),
(2951900, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Actionlist - Set Event Phase 1'),
(2951900, 9, 10, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 0, 2, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Actionlist - Set Faction 14'),
(2951900, 9, 11, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Actionlist - Remove Flags Immune To Players'),
(2951900, 9, 12, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Actionlist - Set Reactstate Aggressive'),
(2951900, 9, 13, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Actionlist - Start Attacking');
-- Set SAI for Unworthy Initiate Anchor.
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 29521;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (-128571, -128567, -128570, -128576, -128565, -128574, -128573, -128568, -128566, -128572, -128575, -128569));
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
(-128571, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128571, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128571, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Ready'),
(-128571, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128571, 0, 4, 5, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128571, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128571, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128567, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128567, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65916, 191580, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128567, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65916, 191580, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Ready'),
(-128567, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65916, 191580, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128567, 0, 4, 5, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128567, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128567, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128570, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128570, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65920, 191581, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128570, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65920, 191581, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Ready'),
(-128570, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65920, 191581, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128570, 0, 4, 5, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128570, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128570, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128576, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128576, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65921, 191582, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128576, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65921, 191582, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Ready'),
(-128576, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65921, 191582, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128576, 0, 4, 5, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128576, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128576, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128565, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128565, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65923, 191583, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128565, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65923, 191583, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Ready'),
(-128565, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65923, 191583, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128565, 0, 4, 5, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128565, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128565, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128574, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128574, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65925, 191584, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128574, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65925, 191584, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Ready'),
(-128574, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65925, 191584, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128574, 0, 4, 5, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128574, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128574, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128573, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128573, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65926, 191585, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128573, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65926, 191585, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Ready'),
(-128573, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65926, 191585, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128573, 0, 4, 5, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128573, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128573, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128568, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128568, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65927, 191586, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128568, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65927, 191586, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Ready'),
(-128568, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65927, 191586, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128568, 0, 4, 5, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128568, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128568, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128566, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128566, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65928, 191587, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128566, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65928, 191587, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Ready'),
(-128566, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65928, 191587, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128566, 0, 4, 5, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128566, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128566, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128572, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128572, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65929, 191588, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128572, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65929, 191588, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Ready'),
(-128572, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65929, 191588, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128572, 0, 4, 5, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128572, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128572, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128575, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128575, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65930, 191589, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128575, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65930, 191589, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Ready'),
(-128575, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65930, 191589, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128575, 0, 4, 5, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128575, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128575, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128569, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128569, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65931, 191590, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128569, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65931, 191590, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Ready'),
(-128569, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65931, 191590, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128569, 0, 4, 5, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128569, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128569, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21');

View File

@@ -0,0 +1,196 @@
-- DB update 2026_04_20_05 -> 2026_04_21_00
-- Remove Kneel stand byte and aura from Unworthy Initiate
UPDATE `creature_template_addon` SET `bytes1` = 0, `auras` = '' WHERE (`entry` IN (29519, 29520, 29565, 29566, 29567));
-- Update Unworthy Initiate SAI.
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE (`entry` IN (29519, 29520, 29565, 29566, 29567));
DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (29519, 29520, 29565, 29566, 29567));
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
(29519, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Flags Immune To Players'),
(29519, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Reactstate Passive'),
(29519, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Flag Standstate Kneel'),
(29519, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 19, 29521, 5, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Cast \'Chained Peasant (Chest)\''),
(29519, 0, 4, 5, 72, 0, 100, 0, 21, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Remove Aura \'Chained Peasant (Chest)\''),
(29519, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2951900, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Run Script'),
(29519, 0, 6, 0, 0, 0, 100, 0, 1000, 1000, 5000, 5000, 0, 0, 11, 52372, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Icy Touch\''),
(29519, 0, 7, 0, 0, 0, 100, 0, 2000, 2000, 5000, 5000, 0, 0, 11, 52374, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Blood Strike\''),
(29519, 0, 8, 0, 0, 0, 100, 0, 3000, 3000, 5000, 5000, 0, 0, 11, 52373, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Plague Strike\''),
(29519, 0, 9, 0, 0, 0, 100, 0, 5000, 5000, 5000, 5000, 0, 0, 11, 52375, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Death Coil\''),
(29519, 0, 10, 0, 21, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Reached Home - Despawn In 3000 ms'),
(29519, 0, 11, 0, 1, 1, 100, 0, 15000, 15000, 15000, 15000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Out of Combat - Despawn Instant (Phase 1)'),
(29520, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Flags Immune To Players'),
(29520, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Reactstate Passive'),
(29520, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Flag Standstate Kneel'),
(29520, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 19, 29521, 5, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Cast \'Chained Peasant (Chest)\''),
(29520, 0, 4, 5, 72, 0, 100, 0, 21, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Remove Aura \'Chained Peasant (Chest)\''),
(29520, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2951900, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Run Script'),
(29520, 0, 6, 0, 0, 0, 100, 0, 1000, 1000, 5000, 5000, 0, 0, 11, 52372, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Icy Touch\''),
(29520, 0, 7, 0, 0, 0, 100, 0, 2000, 2000, 5000, 5000, 0, 0, 11, 52374, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Blood Strike\''),
(29520, 0, 8, 0, 0, 0, 100, 0, 3000, 3000, 5000, 5000, 0, 0, 11, 52373, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Plague Strike\''),
(29520, 0, 9, 0, 0, 0, 100, 0, 5000, 5000, 5000, 5000, 0, 0, 11, 52375, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Death Coil\''),
(29520, 0, 10, 0, 21, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Reached Home - Despawn In 3000 ms'),
(29520, 0, 11, 0, 1, 1, 100, 0, 15000, 15000, 15000, 15000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Out of Combat - Despawn Instant (Phase 1)'),
(29565, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Flags Immune To Players'),
(29565, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Reactstate Passive'),
(29565, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Flag Standstate Kneel'),
(29565, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 19, 29521, 5, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Cast \'Chained Peasant (Chest)\''),
(29565, 0, 4, 5, 72, 0, 100, 0, 21, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Remove Aura \'Chained Peasant (Chest)\''),
(29565, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2951900, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Run Script'),
(29565, 0, 6, 0, 0, 0, 100, 0, 1000, 1000, 5000, 5000, 0, 0, 11, 52372, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Icy Touch\''),
(29565, 0, 7, 0, 0, 0, 100, 0, 2000, 2000, 5000, 5000, 0, 0, 11, 52374, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Blood Strike\''),
(29565, 0, 8, 0, 0, 0, 100, 0, 3000, 3000, 5000, 5000, 0, 0, 11, 52373, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Plague Strike\''),
(29565, 0, 9, 0, 0, 0, 100, 0, 5000, 5000, 5000, 5000, 0, 0, 11, 52375, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Death Coil\''),
(29565, 0, 10, 0, 21, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Reached Home - Despawn In 3000 ms'),
(29565, 0, 11, 0, 1, 1, 100, 0, 15000, 15000, 15000, 15000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Out of Combat - Despawn Instant (Phase 1)'),
(29566, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Flags Immune To Players'),
(29566, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Reactstate Passive'),
(29566, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Flag Standstate Kneel'),
(29566, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 19, 29521, 5, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Cast \'Chained Peasant (Chest)\''),
(29566, 0, 4, 5, 72, 0, 100, 0, 21, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Remove Aura \'Chained Peasant (Chest)\''),
(29566, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2951900, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Run Script'),
(29566, 0, 6, 0, 0, 0, 100, 0, 1000, 1000, 5000, 5000, 0, 0, 11, 52372, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Icy Touch\''),
(29566, 0, 7, 0, 0, 0, 100, 0, 2000, 2000, 5000, 5000, 0, 0, 11, 52374, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Blood Strike\''),
(29566, 0, 8, 0, 0, 0, 100, 0, 3000, 3000, 5000, 5000, 0, 0, 11, 52373, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Plague Strike\''),
(29566, 0, 9, 0, 0, 0, 100, 0, 5000, 5000, 5000, 5000, 0, 0, 11, 52375, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Death Coil\''),
(29566, 0, 10, 0, 21, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Reached Home - Despawn In 3000 ms'),
(29566, 0, 11, 0, 1, 1, 100, 0, 15000, 15000, 15000, 15000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Out of Combat - Despawn Instant (Phase 1)'),
(29567, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Flags Immune To Players'),
(29567, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Reactstate Passive'),
(29567, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Set Flag Standstate Kneel'),
(29567, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 19, 29521, 5, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Respawn - Cast \'Chained Peasant (Chest)\''),
(29567, 0, 4, 5, 72, 0, 100, 0, 21, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Remove Aura \'Chained Peasant (Chest)\''),
(29567, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2951900, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Action 21 Done - Run Script'),
(29567, 0, 6, 0, 0, 0, 100, 0, 1000, 1000, 5000, 5000, 0, 0, 11, 52372, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Icy Touch\''),
(29567, 0, 7, 0, 0, 0, 100, 0, 2000, 2000, 5000, 5000, 0, 0, 11, 52374, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Blood Strike\''),
(29567, 0, 8, 0, 0, 0, 100, 0, 3000, 3000, 5000, 5000, 0, 0, 11, 52373, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Plague Strike\''),
(29567, 0, 9, 0, 0, 0, 100, 0, 5000, 5000, 5000, 5000, 0, 0, 11, 52375, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - In Combat - Cast \'Death Coil\''),
(29567, 0, 10, 0, 21, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - On Reached Home - Despawn In 3000 ms'),
(29567, 0, 11, 0, 1, 1, 100, 0, 15000, 15000, 15000, 15000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate - Out of Combat - Despawn Instant (Phase 1)');
-- Update SAI for Unworthy Initiate Anchor
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 29521;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (-128571, -128567, -128570, -128576, -128565, -128574, -128573, -128568, -128566, -128572, -128575, -128569));
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
(-128571, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128571, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128571, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Deactivated'),
(-128571, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128571, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Cast \'Chained Peasant (Chest)\''),
(-128571, 0, 5, 6, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128571, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128571, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128567, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128567, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128567, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Deactivated'),
(-128567, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128567, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Cast \'Chained Peasant (Chest)\''),
(-128567, 0, 5, 6, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128567, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128567, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128570, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128570, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128570, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Deactivated'),
(-128570, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128570, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Cast \'Chained Peasant (Chest)\''),
(-128570, 0, 5, 6, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128570, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128570, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128576, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128576, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128576, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Deactivated'),
(-128576, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128576, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Cast \'Chained Peasant (Chest)\''),
(-128576, 0, 5, 6, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128576, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128576, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128565, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128565, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128565, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Deactivated'),
(-128565, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128565, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Cast \'Chained Peasant (Chest)\''),
(-128565, 0, 5, 6, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128565, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128565, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128574, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128574, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128574, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Deactivated'),
(-128574, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128574, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Cast \'Chained Peasant (Chest)\''),
(-128574, 0, 5, 6, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128574, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128574, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128573, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128573, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128573, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Deactivated'),
(-128573, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128573, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Cast \'Chained Peasant (Chest)\''),
(-128573, 0, 5, 6, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128573, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128573, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128568, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128568, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128568, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Deactivated'),
(-128568, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128568, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Cast \'Chained Peasant (Chest)\''),
(-128568, 0, 5, 6, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128568, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128568, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128566, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128566, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128566, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Deactivated'),
(-128566, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128566, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Cast \'Chained Peasant (Chest)\''),
(-128566, 0, 5, 6, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128566, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128566, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128572, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128572, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128572, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Deactivated'),
(-128572, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128572, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Cast \'Chained Peasant (Chest)\''),
(-128572, 0, 5, 6, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128572, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128572, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128575, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128575, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128575, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Deactivated'),
(-128575, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128575, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Cast \'Chained Peasant (Chest)\''),
(-128575, 0, 5, 6, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128575, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128575, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21'),
(-128569, 0, 0, 1, 8, 0, 100, 0, 54612, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Store Targetlist'),
(-128569, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set GO State To 1'),
(-128569, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 99, 3, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Set Lootstate Deactivated'),
(-128569, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 0, 14, 65915, 191577, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Remove Gameobject Flags In Use'),
(-128569, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 54612, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Spellhit \'Chained Peasant (Chest)\' - Cast \'Chained Peasant (Chest)\''),
(-128569, 0, 5, 6, 72, 0, 100, 0, 20, 0, 0, 0, 0, 0, 28, 54612, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Remove Aura \'Chained Peasant (Chest)\''),
(-128569, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Send Target 1'),
(-128569, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 21, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 'Unworthy Initiate Anchor - On Action 20 Done - Do Action ID 21');
-- Set Spell Attribute Ignore Evade.
DELETE FROM `spell_custom_attr` WHERE (`spell_id` IN (51520, 51534, 51535, 51536, 51537, 51538, 51539, 51540, 51541, 51542, 51543, 51544, 51545, 51546, 51547, 51548, 51549, 51550, 51551, 51552));
INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES
(51520, 2048),
(51534, 2048),
(51535, 2048),
(51536, 2048),
(51537, 2048),
(51538, 2048),
(51539, 2048),
(51540, 2048),
(51541, 2048),
(51542, 2048),
(51543, 2048),
(51544, 2048),
(51545, 2048),
(51546, 2048),
(51547, 2048),
(51548, 2048),
(51549, 2048),
(51550, 2048),
(51551, 2048),
(51552, 2048);

View File

@@ -0,0 +1,6 @@
-- DB update 2026_04_21_00 -> 2026_04_21_01
--
-- Mai'ah the mage trainer only trains up to level 6
UPDATE `creature_default_trainer` SET `TrainerId` = 17 WHERE (`CreatureId` = 5884);
-- Shanda night elf priest trainer only trainers up to level 6
UPDATE `creature_default_trainer` SET `TrainerId` = 12 WHERE (`CreatureId` = 3595);

View File

@@ -309,12 +309,9 @@ void CreatureAI::EngagementOver()
void CreatureAI::JustExitedCombat()
{
EngagementOver();
// If creature is alive, in world, and not already evading, trigger evade to return home
// Check IsInWorld to avoid evade during server shutdown/cleanup
if (me->IsAlive() && me->IsInWorld() && !me->IsInEvadeMode())
EnterEvadeMode(EVADE_REASON_NO_HOSTILES);
// No-op: synchronous EnterEvadeMode cascades via MemberEvaded and frees
// refs held by upstream iterators (StopAttackFaction crash). EngagementOver
// here also resets scripted fights on brief combat gaps (Valithria).
}
/*void CreatureAI::AttackedBy(Unit* attacker)

View File

@@ -189,6 +189,15 @@ void npc_escortAI::ReturnToLastPoint()
me->GetMotionMaster()->MovePoint(POINT_LAST_POINT, x, y, z, FORCED_MOVEMENT_RUN);
}
void npc_escortAI::JustExitedCombat()
{
// Evade synchronously so UpdateAI does not push a waypoint spline before
// SelectVictim's evade fallback fires; stacked motion intents twitch.
EngagementOver();
if (me->IsAlive() && me->IsInWorld() && !me->IsInEvadeMode())
EnterEvadeMode(EVADE_REASON_NO_HOSTILES);
}
void npc_escortAI::EnterEvadeMode(EvadeReason /*why*/)
{
me->GetThreatMgr().ClearAllThreat();
@@ -549,8 +558,6 @@ void npc_escortAI::GenerateWaypointArray(Movement::PointsArray* points)
if (WaypointList.empty())
return;
uint32 startingWaypointId = CurrentWP->id;
// Flying unit, just fill array
if (me->m_movementInfo.HasMovementFlag((MovementFlags)(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_DISABLE_GRAVITY)))
{
@@ -562,12 +569,13 @@ void npc_escortAI::GenerateWaypointArray(Movement::PointsArray* points)
}
else
{
uint32 remainingWaypoints = std::distance(CurrentWP, WaypointList.end());
for (float size = 1.0f; size; size *= 0.5f)
{
std::vector<G3D::Vector3> pVector;
// xinef: first point in vector is unit real position
pVector.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
uint32 length = (WaypointList.size() - startingWaypointId) * size;
uint32 length = remainingWaypoints * size;
uint32 cnt = 0;
for (std::list<Escort_Waypoint>::const_iterator itr = CurrentWP; itr != WaypointList.end() && cnt <= length; ++itr, ++cnt)

View File

@@ -70,6 +70,8 @@ public:
void EnterEvadeMode(EvadeReason /*why*/ = EVADE_REASON_OTHER) override;
void JustExitedCombat() override;
void UpdateAI(uint32 diff) override; //the "internal" update, calls UpdateEscortAI()
virtual void UpdateEscortAI(uint32 diff); //used when it's needed to add code in update (abilities, scripted events, etc)

View File

@@ -1711,7 +1711,6 @@ bool Battleground::AddSpiritGuide(uint32 type, float x, float y, float z, float
if (Creature* creature = AddCreature(entry, type, x, y, z, o))
{
creature->setDeathState(DeathState::Dead);
creature->SetGuidValue(UNIT_FIELD_CHANNEL_OBJECT, creature->GetGUID());
// aura
/// @todo: Fix display here

View File

@@ -745,6 +745,31 @@ void BattlegroundIC::HandleContestedNodes(ICNodePoint* nodePoint)
(*itr)->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
}
}
else if (nodePoint->nodeType == NODE_TYPE_DOCKS)
{
auto removeUnusedVehicles = [&](uint8 baseType, uint8 count)
{
for (uint8 i = 0; i < count; ++i)
{
uint8 type = baseType + i;
if (Creature* vehicle = GetBgMap()->GetCreature(BgCreatures[type]))
{
if (Vehicle* veh = vehicle->GetVehicleKit())
if (!veh->IsVehicleInUse())
{
respawnMap.erase(vehicle->GetGUID());
DelCreature(type);
}
}
}
};
uint8 glaiveBase = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_GLAIVE_THROWER_1_H : BG_IC_NPC_GLAIVE_THROWER_1_A);
removeUnusedVehicles(glaiveBase, MAX_GLAIVE_THROWERS_SPAWNS_PER_FACTION);
uint8 catapultBase = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_CATAPULT_1_H : BG_IC_NPC_CATAPULT_1_A);
removeUnusedVehicles(catapultBase, MAX_CATAPULTS_SPAWNS_PER_FACTION);
}
else if (nodePoint->nodeType == NODE_TYPE_REFINERY || nodePoint->nodeType == NODE_TYPE_QUARRY)
{
// nodePoint->faction is the assaulting team (set before this call);

View File

@@ -707,10 +707,15 @@ void Creature::Update(uint32 diff)
{
if (IsAIEnabled && TriggerJustRespawned && getDeathState() != DeathState::Dead)
{
if (_respawnCompatibilityMode && m_vehicleKit)
m_vehicleKit->Reset();
TriggerJustRespawned = false;
AI()->JustRespawned();
// Skip for temp summons: InitializeAI already reset them, and JustRespawned would clobber state set synchronously during SUMMON.
if (!IsSummon())
{
if (_respawnCompatibilityMode && m_vehicleKit)
m_vehicleKit->Reset();
AI()->JustRespawned();
}
}
switch (m_deathState)
@@ -1113,9 +1118,6 @@ bool Creature::AIM_Initialize(CreatureAI* ai)
IsAIEnabled = true;
i_AI->InitializeAI();
// Xinef: Initialize vehicle if it is not summoned!
if (GetVehicleKit() && m_spawnId)
GetVehicleKit()->Reset();
return true;
}
@@ -2052,6 +2054,10 @@ void Creature::Respawn(bool force)
if (getDeathState() == DeathState::Dead)
{
// TempSummons (no m_spawnId) shouldn't be resurrected here; TempSummon::Update UnSummons them on the next tick once deathState is Dead.
if (!m_spawnId && !force)
return;
if (m_spawnId)
{
GetMap()->RemoveCreatureRespawnTime(m_spawnId);

View File

@@ -318,6 +318,9 @@ void MotionTransport::RemovePassenger(WorldObject* passenger, bool withAll)
Creature* MotionTransport::CreateNPCPassenger(ObjectGuid::LowType guid, CreatureData const* data)
{
Map* map = GetMap();
if (map->GetCreatureRespawnTime(guid))
return nullptr;
Creature* creature = new Creature();
if (!creature->LoadCreatureFromDB(guid, map, false))
@@ -366,6 +369,9 @@ Creature* MotionTransport::CreateNPCPassenger(ObjectGuid::LowType guid, Creature
GameObject* MotionTransport::CreateGOPassenger(ObjectGuid::LowType guid, GameObjectData const* data)
{
Map* map = GetMap();
if (map->GetGORespawnTime(guid))
return nullptr;
GameObject* go = new GameObject();
ASSERT(!sObjectMgr->IsGameObjectStaticTransport(data->id));

View File

@@ -16130,13 +16130,19 @@ void Unit::StopAttackFaction(uint32 faction_id)
++itr;
}
// End combat and threat references with creatures in this faction
std::vector<CombatReference*> refsToEnd;
// Collect GUIDs, not pointers: EndCombat can cascade through AI callbacks
// (formation MemberEvaded -> CombatStop) and free other refs in the list.
std::vector<ObjectGuid> guidsToEnd;
for (auto const& pair : m_combatManager.GetPvECombatRefs())
if (pair.second->GetOther(this)->GetFactionTemplateEntry()->faction == faction_id)
refsToEnd.push_back(pair.second);
for (CombatReference* ref : refsToEnd)
ref->EndCombat();
guidsToEnd.push_back(pair.first);
for (ObjectGuid const& guid : guidsToEnd)
{
auto const& refs = m_combatManager.GetPvECombatRefs();
auto it = refs.find(guid);
if (it != refs.end())
it->second->EndCombat();
}
for (ControlSet::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
(*itr)->StopAttackFaction(faction_id);

View File

@@ -29,7 +29,8 @@
#include <algorithm>
Vehicle::Vehicle(Unit* unit, VehicleEntry const* vehInfo, uint32 creatureEntry) :
_me(unit), _vehicleInfo(vehInfo), _usableSeatNum(0), _creatureEntry(creatureEntry), _status(STATUS_NONE)
_me(unit), _vehicleInfo(vehInfo), _usableSeatNum(0), _creatureEntry(creatureEntry), _status(STATUS_NONE),
_accessoriesInstalled(false)
{
for (uint32 i = 0; i < MAX_VEHICLE_SEATS; ++i)
{
@@ -87,8 +88,16 @@ void Vehicle::Install()
void Vehicle::InstallAllAccessories(bool evading)
{
if (GetBase()->IsPlayer() || !evading)
RemoveAllPassengers(); // We might have aura's saved in the DB with now invalid casters - remove
// Clear stale control-vehicle auras only on the first non-evade reset;
// a re-Reset would otherwise eject a just-seated passenger and, for
// accessories, fire a spurious SMART_EVENT_PASSENGER_REMOVED.
if (GetBase()->IsPlayer() || (!evading && !_accessoriesInstalled))
RemoveAllPassengers();
// Mark the initial reset as done even if this vehicle has no accessory
// list, so subsequent Resets don't eject passengers on vehicles without
// accessories (e.g. WG demolisher/catapult).
_accessoriesInstalled = true;
VehicleAccessoryList const* accessories = sObjectMgr->GetVehicleAccessoryList(this);
if (!accessories)
@@ -111,6 +120,7 @@ void Vehicle::Uninstall()
_status = STATUS_UNINSTALLING;
LOG_DEBUG("vehicles", "Vehicle::Uninstall {}", _me->GetGUID().ToString());
RemoveAllPassengers();
_accessoriesInstalled = false;
if (_me && _me->IsCreature())
{

View File

@@ -96,6 +96,7 @@ private:
uint32 _usableSeatNum; // Number of seats that match VehicleSeatEntry::UsableByPlayer, used for proper display flags
uint32 _creatureEntry; // Can be different than me->GetBase()->GetEntry() in case of players
Status _status;
bool _accessoriesInstalled;
};
class VehicleDespawnEvent : public BasicEvent

View File

@@ -2422,9 +2422,14 @@ void ObjectMgr::LoadCreatures()
data.spawntimesecs = 14 * DAY;
// Skip spawnMask check for transport maps
if (!_transportMaps.count(data.mapid) && data.spawnMask & ~spawnMasks[data.mapid])
LOG_ERROR("sql.sql", "Table `creature` have creature (SpawnId: {}) that have wrong spawn mask {} including not supported difficulty modes for map (Id: {}).",
spawnId, data.spawnMask, data.mapid);
if (!_transportMaps.count(data.mapid))
{
if (data.spawnMask & ~spawnMasks[data.mapid])
LOG_ERROR("sql.sql", "Table `creature` have creature (SpawnId: {}) that have wrong spawn mask {} including not supported difficulty modes for map (Id: {}).",
spawnId, data.spawnMask, data.mapid);
}
else
data.spawnGroupId = 1; // force compatibility group for transport spawns
bool ok = true;
for (uint32 diff = 0; diff < MAX_DIFFICULTY - 1 && ok; ++diff)
@@ -2955,8 +2960,13 @@ void ObjectMgr::LoadGameobjects()
data.spawnMask = fields[14].Get<uint8>();
if (!_transportMaps.count(data.mapid) && data.spawnMask & ~spawnMasks[data.mapid])
LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: {} Entry: {}) that has wrong spawn mask {} including not supported difficulty modes for map (Id: {}), skip", guid, data.id, data.spawnMask, data.mapid);
if (!_transportMaps.count(data.mapid))
{
if (data.spawnMask & ~spawnMasks[data.mapid])
LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: {} Entry: {}) that has wrong spawn mask {} including not supported difficulty modes for map (Id: {}), skip", guid, data.id, data.spawnMask, data.mapid);
}
else
data.spawnGroupId = 1; // force compatibility group for transport spawns
data.phaseMask = fields[15].Get<uint32>();
int16 gameEvent = fields[16].Get<int16>();
@@ -8771,11 +8781,12 @@ void ObjectMgr::LoadSpawnGroups()
uint32 oldMSTime = getMSTime();
// Reset prior state for hot-reload support
// Preserve the forced legacy group for spawns on transport maps (set in LoadCreatures/LoadGameobjects).
_spawnGroupMapStore.clear();
for (auto& [id, data] : _creatureDataStore)
data.spawnGroupId = 0;
data.spawnGroupId = _transportMaps.count(data.mapid) ? 1 : 0;
for (auto& [id, data] : _gameObjectDataStore)
data.spawnGroupId = 0;
data.spawnGroupId = _transportMaps.count(data.mapid) ? 1 : 0;
// 0 1 2
QueryResult result = WorldDatabase.Query("SELECT groupId, spawnType, spawnId FROM spawn_group");

View File

@@ -24,6 +24,7 @@
#include "GridNotifiers.h"
#include "ObjectMgr.h"
#include "Transport.h"
#include "Vehicle.h"
template <class T>
void GridObjectLoader::AddObjectHelper(Map* map, T* obj)
@@ -53,6 +54,10 @@ void GridObjectLoader::LoadCreatures(CellGuidSet const& guid_set, Map* map)
AddObjectHelper<Creature>(map, obj);
// Grid load bypasses Map::AddToMap, so seat accessories here.
if (Vehicle* vehicle = obj->GetVehicleKit())
vehicle->Reset();
if (!obj->IsMoveInLineOfSightDisabled() && obj->GetDefaultMovementType() == IDLE_MOTION_TYPE && !obj->isNeedNotify(NOTIFY_VISIBILITY_CHANGED | NOTIFY_AI_RELOCATION))
{
if (obj->IsAlive() && !obj->HasUnitState(UNIT_STATE_SIGHTLESS) && obj->HasReactState(REACT_AGGRESSIVE) && !obj->IsImmuneToNPC())

View File

@@ -346,8 +346,7 @@ bool Map::AddToMap(T* obj, bool checkTransport)
//also, trigger needs to cast spell, if not update, cannot see visual
obj->UpdateObjectVisibility(true);
// Xinef: little hack for vehicles, accessories have to be added after visibility update so they wont fall off the vehicle, moved from Creature::AIM_Initialize
// Initialize vehicle, this is done only for summoned npcs, DB creatures are handled by grid loaders
// Post-visibility so accessories seat after the vehicle's create packet reaches clients.
if (obj->IsCreature())
if (Vehicle* vehicle = obj->ToCreature()->GetVehicleKit())
vehicle->Reset();

View File

@@ -235,11 +235,11 @@ public:
data.posZ = chr->GetTransOffsetZ();
data.orientation = chr->GetTransOffsetO();
Creature* creature = trans->CreateNPCPassenger(guid, &data);
creature->SaveToDB(trans->GetGOInfo()->moTransport.mapID, 1 << map->GetSpawnMode(), chr->GetPhaseMaskForSpawn());
sObjectMgr->AddCreatureToGrid(guid, &data);
if (Creature* creature = trans->CreateNPCPassenger(guid, &data))
{
creature->SaveToDB(trans->GetGOInfo()->moTransport.mapID, 1 << map->GetSpawnMode(), chr->GetPhaseMaskForSpawn());
sObjectMgr->AddCreatureToGrid(guid, &data);
}
return true;
}

View File

@@ -39,8 +39,11 @@ struct go_shadowforge_brazier : public GameObjectAI
{
go_shadowforge_brazier(GameObject* go) : GameObjectAI(go) {}
bool GossipHello(Player* /*player*/, bool /*reportUse*/) override
bool GossipHello(Player* /*player*/, bool reportUse) override
{
if (reportUse)
return false;
if (InstanceScript* instance = me->GetInstanceScript())
{
GameObject* northBrazier = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_SF_BRAZIER_N));

View File

@@ -314,286 +314,7 @@ public:
enum UnworthyInitiate
{
SPELL_SOUL_PRISON_CHAIN = 54612,
SPELL_DK_INITIATE_VISUAL = 51519,
SPELL_ICY_TOUCH = 52372,
SPELL_PLAGUE_STRIKE = 52373,
SPELL_BLOOD_STRIKE = 52374,
SPELL_DEATH_COIL = 52375,
SAY_EVENT_START = 0,
SAY_EVENT_ATTACK = 1,
EVENT_ICY_TOUCH = 1,
EVENT_PLAGUE_STRIKE = 2,
EVENT_BLOOD_STRIKE = 3,
EVENT_DEATH_COIL = 4
};
enum UnworthyInitiatePhase
{
PHASE_CHAINED,
PHASE_TO_EQUIP,
PHASE_EQUIPING,
PHASE_TO_ATTACK,
PHASE_ATTACKING,
};
uint32 acherus_soul_prison[12] =
{
191577,
191580,
191581,
191582,
191583,
191584,
191585,
191586,
191587,
191588,
191589,
191590
};
//uint32 acherus_unworthy_initiate[5] =
//{
// 29519,
// 29520,
// 29565,
// 29566,
// 29567
//};
class npc_unworthy_initiate : public CreatureScript
{
public:
npc_unworthy_initiate() : CreatureScript("npc_unworthy_initiate") { }
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_unworthy_initiateAI(creature);
}
struct npc_unworthy_initiateAI : public ScriptedAI
{
npc_unworthy_initiateAI(Creature* creature) : ScriptedAI(creature)
{
me->SetReactState(REACT_PASSIVE);
if (!me->GetCurrentEquipmentId())
me->SetCurrentEquipmentId(me->GetOriginalEquipmentId());
}
ObjectGuid playerGUID;
UnworthyInitiatePhase phase;
uint32 wait_timer;
float anchorX, anchorY;
ObjectGuid anchorGUID;
EventMap events;
void Reset() override
{
anchorGUID.Clear();
phase = PHASE_CHAINED;
events.Reset();
me->SetFaction(FACTION_CREATURE);
me->SetImmuneToPC(true);
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 8);
me->LoadEquipment(0, true);
}
void JustEngagedWith(Unit* /*who*/) override
{
events.ScheduleEvent(EVENT_ICY_TOUCH, 1s, GCD_CAST);
events.ScheduleEvent(EVENT_PLAGUE_STRIKE, 3s, GCD_CAST);
events.ScheduleEvent(EVENT_BLOOD_STRIKE, 2s, GCD_CAST);
events.ScheduleEvent(EVENT_DEATH_COIL, 5s, GCD_CAST);
}
void MovementInform(uint32 type, uint32 id) override
{
if (type != POINT_MOTION_TYPE)
return;
if (id == 1)
{
wait_timer = 5000;
me->LoadEquipment(1);
me->CastSpell(me, SPELL_DK_INITIATE_VISUAL, true);
if (Player* starter = ObjectAccessor::GetPlayer(*me, playerGUID))
Talk(SAY_EVENT_ATTACK, starter);
phase = PHASE_TO_ATTACK;
}
}
void EventStart(Creature* anchor, Player* target)
{
wait_timer = 5000;
phase = PHASE_TO_EQUIP;
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
me->RemoveAurasDueToSpell(SPELL_SOUL_PRISON_CHAIN);
float z;
anchor->GetContactPoint(me, anchorX, anchorY, z, 1.0f);
playerGUID = target->GetGUID();
Talk(SAY_EVENT_START, target);
}
void UpdateAI(uint32 diff) override
{
switch (phase)
{
case PHASE_CHAINED:
if (!anchorGUID)
{
if (Creature* anchor = me->FindNearestCreature(29521, 30))
{
anchor->AI()->SetGUID(me->GetGUID());
anchor->CastSpell(me, SPELL_SOUL_PRISON_CHAIN, true);
anchorGUID = anchor->GetGUID();
}
float dist = 99.0f;
GameObject* prison = nullptr;
for (uint8 i = 0; i < 12; ++i)
{
if (GameObject* temp_prison = me->FindNearestGameObject(acherus_soul_prison[i], 100))
{
if (me->IsWithinDist(temp_prison, dist, false))
{
dist = me->GetDistance2d(temp_prison);
prison = temp_prison;
}
}
}
// Must check for loot state as out of order updates will reset
// the prison gameobject during spawn causing invalid state
if (prison && prison->getLootState() != GO_NOT_READY)
prison->ResetDoorOrButton();
}
break;
case PHASE_TO_EQUIP:
if (wait_timer)
{
if (wait_timer > diff)
wait_timer -= diff;
else
{
me->GetMotionMaster()->MovePoint(1, anchorX, anchorY, me->GetPositionZ());
//LOG_DEBUG("scripts.ai", "npc_unworthy_initiateAI: move to {} {} {}", anchorX, anchorY, me->GetPositionZ());
phase = PHASE_EQUIPING;
wait_timer = 0;
}
}
break;
case PHASE_TO_ATTACK:
if (wait_timer)
{
if (wait_timer > diff)
wait_timer -= diff;
else
{
me->SetFaction(FACTION_MONSTER);
me->SetImmuneToPC(false);
phase = PHASE_ATTACKING;
if (Player* target = ObjectAccessor::GetPlayer(*me, playerGUID))
AttackStart(target);
wait_timer = 0;
}
}
break;
case PHASE_ATTACKING:
if (!UpdateVictim())
return;
events.Update(diff);
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_ICY_TOUCH:
DoCastVictim(SPELL_ICY_TOUCH);
events.DelayEvents(1s, GCD_CAST);
events.ScheduleEvent(EVENT_ICY_TOUCH, 5s, GCD_CAST);
break;
case EVENT_PLAGUE_STRIKE:
DoCastVictim(SPELL_PLAGUE_STRIKE);
events.DelayEvents(1s, GCD_CAST);
events.ScheduleEvent(EVENT_PLAGUE_STRIKE, 5s, GCD_CAST);
break;
case EVENT_BLOOD_STRIKE:
DoCastVictim(SPELL_BLOOD_STRIKE);
events.DelayEvents(1s, GCD_CAST);
events.ScheduleEvent(EVENT_BLOOD_STRIKE, 5s, GCD_CAST);
break;
case EVENT_DEATH_COIL:
DoCastVictim(SPELL_DEATH_COIL);
events.DelayEvents(1s, GCD_CAST);
events.ScheduleEvent(EVENT_DEATH_COIL, 5s, GCD_CAST);
break;
}
}
DoMeleeAttackIfReady();
break;
default:
break;
}
}
};
};
class npc_unworthy_initiate_anchor : public CreatureScript
{
public:
npc_unworthy_initiate_anchor() : CreatureScript("npc_unworthy_initiate_anchor") { }
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_unworthy_initiate_anchorAI(creature);
}
struct npc_unworthy_initiate_anchorAI : public PassiveAI
{
npc_unworthy_initiate_anchorAI(Creature* creature) : PassiveAI(creature) {}
ObjectGuid prisonerGUID;
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
{
if (!prisonerGUID)
prisonerGUID = guid;
}
ObjectGuid GetGUID(int32 /*id*/) const override
{
return prisonerGUID;
}
};
};
class go_acherus_soul_prison : public GameObjectScript
{
public:
go_acherus_soul_prison() : GameObjectScript("go_acherus_soul_prison") { }
bool OnGossipHello(Player* player, GameObject* go) override
{
if (Creature* anchor = go->FindNearestCreature(29521, 15))
if (ObjectGuid prisonerGUID = anchor->AI()->GetGUID())
if (Creature* prisoner = ObjectAccessor::GetCreature(*player, prisonerGUID))
CAST_AI(npc_unworthy_initiate::npc_unworthy_initiateAI, prisoner->AI())->EventStart(anchor, player);
return false;
}
};
class spell_death_knight_initiate_visual : public SpellScript
@@ -732,9 +453,6 @@ void AddSC_the_scarlet_enclave_c1()
RegisterSpellScript(spell_q12698_the_gift_that_keeps_on_giving);
new npc_scarlet_ghoul();
new npc_dkc1_gothik();
new npc_unworthy_initiate();
new npc_unworthy_initiate_anchor();
new go_acherus_soul_prison();
RegisterSpellScript(spell_death_knight_initiate_visual);
RegisterSpellScript(spell_lich_king_whisper);
RegisterSpellScript(spell_lich_king_vo_blocker);

View File

@@ -229,9 +229,6 @@ struct boss_kaelthas : public BossAI
{
advisor->Respawn(true);
advisor->StopMovingOnCurrentPos();
advisor->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
advisor->SetReactState(REACT_PASSIVE);
summons.Summon(advisor);
}
}
}
@@ -550,7 +547,7 @@ struct boss_kaelthas : public BossAI
void IntroduceNewAdvisor(KTYells talkIntroduction, KTActions kaelAction)
{
std::chrono::milliseconds attackStartTimer = 0ms;
EyeNPCs advisorNPCId = NPC_THALADRED;
uint32 dataIdx = DATA_THALADRED;
scheduler.Schedule(2s, [this, talkIntroduction](TaskContext)
{
Talk(talkIntroduction);
@@ -560,26 +557,26 @@ struct boss_kaelthas : public BossAI
{
case ACTION_START_THALADRED:
attackStartTimer = 7s;
advisorNPCId = NPC_THALADRED;
dataIdx = DATA_THALADRED;
break;
case ACTION_START_SANGUINAR:
attackStartTimer = 14500ms;
advisorNPCId = NPC_LORD_SANGUINAR;
dataIdx = DATA_LORD_SANGUINAR;
break;
case ACTION_START_CAPERNIAN:
attackStartTimer = 9s;
advisorNPCId = NPC_CAPERNIAN;
dataIdx = DATA_CAPERNIAN;
break;
case ACTION_START_TELONICUS:
attackStartTimer = 10400ms;
advisorNPCId = NPC_TELONICUS;
dataIdx = DATA_TELONICUS;
break;
default:
break;
}
scheduler.Schedule(attackStartTimer, [this, advisorNPCId](TaskContext)
scheduler.Schedule(attackStartTimer, [this, dataIdx](TaskContext)
{
if (Creature* advisor = summons.GetCreatureWithEntry(advisorNPCId))
if (Creature* advisor = instance->GetCreature(dataIdx))
{
advisor->SetReactState(REACT_AGGRESSIVE);
advisor->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
@@ -737,6 +734,13 @@ struct advisor_baseAI : public ScriptedAI
scheduler.CancelAll();
}
void JustRespawned() override
{
ScriptedAI::JustRespawned();
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
me->SetReactState(REACT_PASSIVE);
}
void JustEngagedWith(Unit* /*who*/) override { ScheduleEvents(); }
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damageEffectType*/, SpellSchoolMask /*spellSchoolMask*/) override

View File

@@ -67,42 +67,10 @@ public:
LoadBossBoundaries(boundaries);
}
ObjectGuid ThaladredTheDarkenerGUID;
ObjectGuid LordSanguinarGUID;
ObjectGuid GrandAstromancerCapernianGUID;
ObjectGuid MasterEngineerTelonicusGUID;
ObjectGuid AlarGUID;
ObjectGuid KaelthasGUID;
ObjectGuid BridgeWindowGUID;
ObjectGuid KaelStateRightGUID;
ObjectGuid KaelStateLeftGUID;
void OnCreatureCreate(Creature* creature) override
{
switch (creature->GetEntry())
{
case NPC_ALAR:
AlarGUID = creature->GetGUID();
break;
case NPC_KAELTHAS:
KaelthasGUID = creature->GetGUID();
break;
case NPC_THALADRED:
ThaladredTheDarkenerGUID = creature->GetGUID();
break;
case NPC_TELONICUS:
MasterEngineerTelonicusGUID = creature->GetGUID();
break;
case NPC_CAPERNIAN:
GrandAstromancerCapernianGUID = creature->GetGUID();
break;
case NPC_LORD_SANGUINAR:
LordSanguinarGUID = creature->GetGUID();
break;
}
InstanceScript::OnCreatureCreate(creature);
}
void OnGameObjectCreate(GameObject* gobject) override
{
switch (gobject->GetEntry())
@@ -130,10 +98,6 @@ public:
return KaelStateRightGUID;
case GO_KAEL_STATUE_LEFT:
return KaelStateLeftGUID;
case NPC_ALAR:
return AlarGUID;
case NPC_KAELTHAS:
return KaelthasGUID;
}
return ObjectGuid::Empty;

View File

@@ -588,10 +588,8 @@ public:
{
for (Creature* whelp : creatureList)
{
if (whelp->IsAlive() && !whelp->IsInCombat() && whelp->GetMotionMaster()->GetCurrentMovementGeneratorType() != HOME_MOTION_TYPE)
{
if (whelp && whelp->IsAlive() && !whelp->IsInCombat() && whelp->GetMotionMaster()->GetCurrentMovementGeneratorType() != HOME_MOTION_TYPE)
whelp->GetMotionMaster()->MovePoint(0, me->GetNearPosition(4.0f, whelp->GetOrientation()));
}
}
}
}
@@ -600,10 +598,8 @@ public:
{
for (Creature* whelp : creatureList)
{
if (whelp->IsAlive() && !whelp->IsInCombat() && whelp->GetMotionMaster()->GetCurrentMovementGeneratorType() != HOME_MOTION_TYPE)
{
if (whelp && whelp->IsAlive() && !whelp->IsInCombat() && whelp->GetMotionMaster()->GetCurrentMovementGeneratorType() != HOME_MOTION_TYPE)
whelp->GetMotionMaster()->MoveTargetedHome();
}
}
}
}

View File

@@ -214,27 +214,11 @@ enum UnstablePower
SPELL_UNSTABLE_POWER_AURA = 24659
};
enum CommendationOfKaelthas
{
SPELL_COMMENDATION_OF_KAELTHAS = 45480
};
enum CorpseTongueCoin
{
SPELL_CORPSE_TONGUE_COIN = 71633,
SPELL_CORPSE_TONGUE_COIN_HERO = 71634
};
enum CrystalSpireOfKarabor
{
SPELL_CRYSTAL_SPIRE_OF_KARABOR_MANA = 35476
};
enum SoulHarvestersCharm
{
SPELL_SOUL_HARVESTERS_CHARM = 60513
};
enum SunwellExaltedNeck
{
SPELL_LIGHTS_WRATH = 45479,
@@ -260,12 +244,6 @@ enum TotemOfFlowingWater
SPELL_TOTEM_OF_FLOWING_WATER_MANA = 28857
};
enum PetrifiedTwilightScale
{
SPELL_PETRIFIED_TWILIGHT_SCALE_HC = 75480,
SPELL_PETRIFIED_TWILIGHT_SCALE = 75477
};
enum ShardOfTheScale
{
SPELL_PURIFIED_CAUTERIZING_HEAL = 69733,
@@ -5706,67 +5684,30 @@ class spell_item_unstable_power : public AuraScript
}
};
// 45478 - Commendation of Kael'thas
class spell_item_commendation_of_kaelthas : public AuraScript
// 45057 - Evasive Maneuvers (Commendation of Kael'thas)
// 52420 - Deflection (Soul Harvester's Charm)
// 71634 - Item - Icecrown 25 Normal Tank Trinket 1 (Corpse Tongue Coin)
// 71640 - Item - Icecrown 25 Heroic Tank Trinket 1 (Corpse Tongue Coin (Heroic))
// 75475 - Item - Chamber of Aspects 25 Tank Trinket (Petrified Twilight Scale)
// 75481 - Item - Chamber of Aspects 25 Heroic Tank Trinket (Petrified Twilight Scale (Heroic))
// Trinkets that proc only when a melee hit drops you below EFFECT_0 % HP.
class spell_item_proc_below_pct_damaged : public AuraScript
{
PrepareAuraScript(spell_item_commendation_of_kaelthas);
PrepareAuraScript(spell_item_proc_below_pct_damaged);
bool CheckProc(ProcEventInfo& eventInfo)
{
if (HealInfo* healInfo = eventInfo.GetHealInfo())
if (Unit* target = healInfo->GetTarget())
if (target->GetHealth() + healInfo->GetEffectiveHeal() >= target->GetMaxHealth())
return true;
return false;
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
if (!damageInfo || !damageInfo->GetDamage())
return false;
int32 pct = GetSpellInfo()->Effects[EFFECT_0].CalcValue();
return eventInfo.GetActionTarget()->HealthBelowPctDamaged(pct, damageInfo->GetDamage());
}
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_item_commendation_of_kaelthas::CheckProc);
}
};
// 71632 - Corpse Tongue Coin
class spell_item_corpse_tongue_coin : public AuraScript
{
PrepareAuraScript(spell_item_corpse_tongue_coin);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_CORPSE_TONGUE_COIN });
}
void HandleProc(ProcEventInfo& eventInfo)
{
PreventDefaultAction();
eventInfo.GetActor()->CastSpell((Unit*)nullptr, SPELL_CORPSE_TONGUE_COIN, true, nullptr, GetEffect(EFFECT_0));
}
void Register() override
{
OnProc += AuraProcFn(spell_item_corpse_tongue_coin::HandleProc);
}
};
// 71639 - Corpse Tongue Coin (Heroic)
class spell_item_corpse_tongue_coin_heroic : public AuraScript
{
PrepareAuraScript(spell_item_corpse_tongue_coin_heroic);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_CORPSE_TONGUE_COIN_HERO });
}
void HandleProc(ProcEventInfo& eventInfo)
{
PreventDefaultAction();
eventInfo.GetActor()->CastSpell((Unit*)nullptr, SPELL_CORPSE_TONGUE_COIN_HERO, true, nullptr, GetEffect(EFFECT_0));
}
void Register() override
{
OnProc += AuraProcFn(spell_item_corpse_tongue_coin_heroic::HandleProc);
DoCheckProc += AuraCheckProcFn(spell_item_proc_below_pct_damaged::CheckProc);
}
};
@@ -5788,28 +5729,6 @@ class spell_item_crystal_spire_of_karabor : public AuraScript
}
};
// 60512 - Soul Harvester's Charm
class spell_item_soul_harvesters_charm : public AuraScript
{
PrepareAuraScript(spell_item_soul_harvesters_charm);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_SOUL_HARVESTERS_CHARM });
}
void HandleProc(ProcEventInfo& eventInfo)
{
PreventDefaultAction();
eventInfo.GetActor()->CastSpell((Unit*)nullptr, SPELL_SOUL_HARVESTERS_CHARM, true, nullptr, GetEffect(EFFECT_0));
}
void Register() override
{
OnProc += AuraProcFn(spell_item_soul_harvesters_charm::HandleProc);
}
};
// 45481 - Sunwell Exalted Caster Neck
class spell_item_sunwell_exalted_caster_neck : public AuraScript
{
@@ -6025,50 +5944,6 @@ class spell_item_totem_of_flowing_water : public AuraScript
}
};
// 75466 - Petrified Twilight Scale
class spell_item_petrified_twilight_scale : public AuraScript
{
PrepareAuraScript(spell_item_petrified_twilight_scale);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_PETRIFIED_TWILIGHT_SCALE });
}
void HandleProc(ProcEventInfo& eventInfo)
{
PreventDefaultAction();
eventInfo.GetActionTarget()->CastSpell((Unit*)nullptr, SPELL_PETRIFIED_TWILIGHT_SCALE, true, nullptr, GetEffect(EFFECT_0));
}
void Register() override
{
OnProc += AuraProcFn(spell_item_petrified_twilight_scale::HandleProc);
}
};
// 75473 - Petrified Twilight Scale (Heroic)
class spell_item_petrified_twilight_scale_heroic : public AuraScript
{
PrepareAuraScript(spell_item_petrified_twilight_scale_heroic);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_PETRIFIED_TWILIGHT_SCALE_HC });
}
void HandleProc(ProcEventInfo& eventInfo)
{
PreventDefaultAction();
eventInfo.GetActionTarget()->CastSpell((Unit*)nullptr, SPELL_PETRIFIED_TWILIGHT_SCALE_HC, true, nullptr, GetEffect(EFFECT_0));
}
void Register() override
{
OnProc += AuraProcFn(spell_item_petrified_twilight_scale_heroic::HandleProc);
}
};
// 69739 - Purified Shard of the Scale
class spell_item_purified_shard_of_the_scale : public AuraScript
{
@@ -6355,11 +6230,8 @@ void AddSC_item_spell_scripts()
RegisterSpellScript(spell_item_pet_healing);
RegisterSpellScript(spell_item_restless_strength);
RegisterSpellScript(spell_item_unstable_power);
RegisterSpellScript(spell_item_commendation_of_kaelthas);
RegisterSpellScript(spell_item_corpse_tongue_coin);
RegisterSpellScript(spell_item_corpse_tongue_coin_heroic);
RegisterSpellScript(spell_item_proc_below_pct_damaged);
RegisterSpellScript(spell_item_crystal_spire_of_karabor);
RegisterSpellScript(spell_item_soul_harvesters_charm);
RegisterSpellScript(spell_item_sunwell_exalted_caster_neck);
RegisterSpellScript(spell_item_sunwell_exalted_healer_neck);
RegisterSpellScript(spell_item_sunwell_exalted_melee_neck);
@@ -6368,8 +6240,6 @@ void AddSC_item_spell_scripts()
RegisterSpellScript(spell_item_tiny_abomination_in_a_jar);
RegisterSpellScript(spell_item_tiny_abomination_in_a_jar_hero);
RegisterSpellScript(spell_item_totem_of_flowing_water);
RegisterSpellScript(spell_item_petrified_twilight_scale);
RegisterSpellScript(spell_item_petrified_twilight_scale_heroic);
RegisterSpellScript(spell_item_purified_shard_of_the_scale);
RegisterSpellScript(spell_item_shiny_shard_of_the_scale);
RegisterSpellScript(spell_item_living_root_of_the_wildheart);

View File

@@ -574,12 +574,16 @@ public:
void RespawnPet()
{
Creature* precious = Precious();
if (!precious)
return;
Position current = me->GetNearPosition(-5.0f, 0.0f);
Precious()->RemoveCorpse(false, false);
Precious()->SetPosition(current);
Precious()->SetHomePosition(current);
Precious()->setDeathState(DeathState::JustRespawned);
Precious()->UpdateObjectVisibility(true);
precious->RemoveCorpse(false, false);
precious->SetPosition(current);
precious->SetHomePosition(current);
precious->setDeathState(DeathState::JustRespawned);
precious->UpdateObjectVisibility(true);
}
void HandlePetRespawn()