From 8f7a135a70d7139ca0b8dd517a3c50f12ff4585e Mon Sep 17 00:00:00 2001 From: Rocco Silipo <108557877+Rorschach91@users.noreply.github.com> Date: Thu, 5 Mar 2026 17:25:10 +0100 Subject: [PATCH] fix(DB/Script): Move Brozebeard Radio behaviour on SAI. (#25006) --- .../pending_db_world/rev_1772715792.sql | 46 ++++++++++ .../Ulduar/Ulduar/boss_flame_leviathan.cpp | 88 ------------------- 2 files changed, 46 insertions(+), 88 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1772715792.sql diff --git a/data/sql/updates/pending_db_world/rev_1772715792.sql b/data/sql/updates/pending_db_world/rev_1772715792.sql new file mode 100644 index 000000000..1557f48b2 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1772715792.sql @@ -0,0 +1,46 @@ + +-- Remove c++ script and set SAI. +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE (`entry` = 34054); + +-- Set Areatrigger Scripts. +DELETE FROM `areatrigger_scripts` WHERE (`entry` IN (5414, 5415, 5416, 5417, 5442, 5443)); +INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES +(5414, 'SmartTrigger'), +(5415, 'SmartTrigger'), +(5416, 'SmartTrigger'), +(5417, 'SmartTrigger'), +(5442, 'SmartTrigger'), +(5443, 'SmartTrigger'); + +-- Set Comments. +UPDATE `creature` SET `Comment` = 'Has Personal GUID SAI' WHERE `id1` = 34054; + +-- Set Areatrigger SAI. +DELETE FROM `smart_scripts` WHERE (`source_type` = 2) AND (`entryorguid` IN (5414, 5415, 5416, 5417, 5442, 5443)); +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 +(5414, 2, 0, 0, 46, 0, 100, 0, 5414, 0, 0, 0, 0, 0, 223, 27, 0, 0, 0, 0, 0, 10, 1975200, 34054, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Do Action ID 27'), +(5415, 2, 0, 0, 46, 0, 100, 0, 5415, 0, 0, 0, 0, 0, 223, 28, 0, 0, 0, 0, 0, 10, 1975199, 34054, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Do Action ID 28'), +(5416, 2, 0, 0, 46, 0, 100, 0, 5416, 0, 0, 0, 0, 0, 223, 26, 0, 0, 0, 0, 0, 10, 1975202, 34054, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Do Action ID 26'), +(5417, 2, 0, 0, 46, 0, 100, 0, 5417, 0, 0, 0, 0, 0, 223, 25, 0, 0, 0, 0, 0, 10, 1975203, 34054, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Do Action ID 25'), +(5442, 2, 0, 0, 46, 0, 100, 0, 5442, 0, 0, 0, 0, 0, 223, 24, 0, 0, 0, 0, 0, 10, 1975201, 34054, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Do Action ID 24'), +(5443, 2, 0, 0, 46, 0, 100, 0, 5443, 0, 0, 0, 0, 0, 223, 23, 0, 0, 0, 0, 0, 10, 1975198, 34054, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Do Action ID 24'); + +-- Set Bronzebeard Radio Personal GUID SAI. +DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (-1975198, -1975199, -1975200, -1975201, -1975202, -1975203)); +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 +(-1975198, 0, 0, 0, 72, 0, 100, 257, 23, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bronzebeard Radio - On Action 23 Done - Say Line 3 (No Repeat)'), +(-1975199, 0, 0, 0, 72, 0, 100, 257, 28, 0, 0, 0, 0, 0, 1, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bronzebeard Radio - On Action 28 Done - Say Line 8 (No Repeat)'), +(-1975200, 0, 0, 0, 72, 0, 100, 257, 27, 0, 0, 0, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bronzebeard Radio - On Action 27 Done - Say Line 7 (No Repeat)'), +(-1975201, 0, 0, 0, 72, 0, 100, 257, 24, 0, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bronzebeard Radio - On Action 24 Done - Say Line 4 (No Repeat)'), +(-1975202, 0, 0, 0, 72, 0, 100, 257, 26, 0, 0, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bronzebeard Radio - On Action 26 Done - Say Line 6 (No Repeat)'), +(-1975203, 0, 0, 0, 72, 0, 100, 257, 25, 0, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bronzebeard Radio - On Action 25 Done - Say Line 5 (No Repeat)'); + +-- Set Conditions +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 22) AND (`SourceEntry` IN (-1975198, -1975199, -1975200, -1975201, -1975202, -1975203)) AND (`SourceId` = 0); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 1, -1975198, 0, 0, 13, 1, 0, 0, 2, 0, 0, 0, '', 'Bronzebeard Radio event only occours if Leviathan in not started'), +(22, 1, -1975199, 0, 0, 13, 1, 0, 0, 2, 0, 0, 0, '', 'Bronzebeard Radio event only occours if Leviathan in not started'), +(22, 1, -1975200, 0, 0, 13, 1, 0, 0, 2, 0, 0, 0, '', 'Bronzebeard Radio event only occours if Leviathan in not started'), +(22, 1, -1975201, 0, 0, 13, 1, 0, 0, 2, 0, 0, 0, '', 'Bronzebeard Radio event only occours if Leviathan in not started'), +(22, 1, -1975202, 0, 0, 13, 1, 0, 0, 2, 0, 0, 0, '', 'Bronzebeard Radio event only occours if Leviathan in not started'), +(22, 1, -1975203, 0, 0, 13, 1, 0, 0, 2, 0, 0, 0, '', 'Bronzebeard Radio event only occours if Leviathan in not started'); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp index 34da82189..7b1728615 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp @@ -151,12 +151,6 @@ enum Texts BRANN_RADIO_SAY_FL_START_0 = 0, BRANN_RADIO_SAY_FL_START_1 = 1, BRANN_RADIO_SAY_FL_START_2 = 2, - BRANN_RADIO_SAY_GENERATORS = 3, - BRANN_RADIO_SAY_STATIONS = 4, - BRANN_RADIO_SAY_TOWER_THORIM = 5, - BRANN_RADIO_SAY_TOWER_HODIR = 6, - BRANN_RADIO_SAY_TOWER_FREYA = 7, - BRANN_RADIO_SAY_TOWER_MIMIRON = 8, // Vehicle Repair - Said by a spell, BroadcastTextID, same as FLAME_LEVIATHAN_EMOTE_REPAIR VEHICLE_EMOTE_REPAIR = 33538, @@ -1082,87 +1076,6 @@ struct npc_pool_of_tar : public NullCreatureAI } }; -struct npc_brann_radio : public NullCreatureAI -{ - npc_brann_radio(Creature* c) : NullCreatureAI(c) - { - _lock = (me->GetInstanceScript() && me->GetInstanceScript()->GetBossState(BOSS_LEVIATHAN) > NOT_STARTED); - _helpLock = _lock; - } - - bool _lock; - bool _helpLock; - - void Reset() override - { - me->SetReactState(REACT_AGGRESSIVE); - } - - void MoveInLineOfSight(Unit* who) override - { - if (!_lock) - { - if (!who->IsPlayer() && !who->IsVehicle()) - return; - - // MIMIRON - else if (me->GetDistance2d(-81.9207f, 111.432f) < 5.0f) - { - if (me->GetDistance2d(who) <= 60.0f && who->GetPositionZ() > 430.0f) - { - Talk(BRANN_RADIO_SAY_TOWER_MIMIRON); - _lock = true; - } - } - // FREYA - else if (me->GetDistance2d(-221.475f, -271.087f) < 5.0f) - { - if (me->GetDistance2d(who) <= 60.0f && who->GetPositionZ() < 380.0f) - { - Talk(BRANN_RADIO_SAY_TOWER_FREYA); - _lock = true; - } - } - // STATIONS - else if (me->GetDistance2d(73.8978f, -29.3306f) < 5.0f) - { - if (me->GetDistance2d(who) <= 40.0f) - { - Talk(BRANN_RADIO_SAY_STATIONS); - _lock = true; - } - } - // HODIR - else if (me->GetDistance2d(68.7679f, -325.026f) < 5.0f) - { - if (me->GetDistance2d(who) <= 40.0f) - { - Talk(BRANN_RADIO_SAY_TOWER_HODIR); - _lock = true; - } - } - // THORIM - else if (me->GetDistance2d(174.442f, 345.679f) < 5.0f) - { - if (me->GetDistance2d(who) <= 60.0f) - { - Talk(BRANN_RADIO_SAY_TOWER_THORIM); - _lock = true; - } - } - // COME A BIT CLOSER - else if (me->GetDistance2d(-508.898f, -32.9631f) < 5.0f) - { - if (who->GetPositionX() >= -480.0f) - { - Talk(BRANN_RADIO_SAY_GENERATORS); - _lock = true; - } - } - } - } -}; - struct npc_storm_beacon_spawn : public NullCreatureAI { npc_storm_beacon_spawn(Creature* c) : NullCreatureAI(c) @@ -1825,7 +1738,6 @@ void AddSC_boss_flame_leviathan() RegisterUlduarCreatureAI(npc_hodirs_fury); // Helpers - RegisterUlduarCreatureAI(npc_brann_radio); RegisterUlduarCreatureAI(npc_storm_beacon_spawn); RegisterUlduarCreatureAI(boss_flame_leviathan_safety_container);