From 29dda79638604fc0626f76d5158085baa8327d5b Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Sun, 26 May 2024 18:11:50 +0200 Subject: [PATCH 01/39] fix(Scripts/Ulduar): Add emote for opening of the Ancient Gate of the Keepers (#18949) add ancient gate emote --- .../pending_db_world/rev_1716655119634919952.sql | 4 ++++ .../Northrend/Ulduar/Ulduar/instance_ulduar.cpp | 16 ++++++++++++++-- .../scripts/Northrend/Ulduar/Ulduar/ulduar.h | 4 ++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1716655119634919952.sql diff --git a/data/sql/updates/pending_db_world/rev_1716655119634919952.sql b/data/sql/updates/pending_db_world/rev_1716655119634919952.sql new file mode 100644 index 000000000..38cbe1cc4 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1716655119634919952.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `creature_text` WHERE (`CreatureID` = 22515) AND (`GroupID` = 19); +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(22515, 19, 0, 'The Ancient Gate of the Keepers unlocks!', 41, 0, 100, 0, 0, 0, 34401, 0, 'Ulduar - The Ancient Gate of the Keepers unlocks!'); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp index d4289a097..8f9a33b30 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp @@ -124,6 +124,9 @@ public: ObjectGuid m_brannBronzebeardBaseCamp; uint32 m_algalonTimer; + // Ancient Gate + const Position triggerAncientGatePosition = { 1883.65f, 269.272f, 418.406f }; + // Shared EventMap _events; bool m_mimironTramUsed; @@ -668,8 +671,17 @@ public: m_auiEncounter[type] = data; if (GetData(TYPE_MIMIRON) == DONE && GetData(TYPE_FREYA) == DONE && GetData(TYPE_HODIR) == DONE && GetData(TYPE_THORIM) == DONE) { - if (GameObject* go = instance->GetGameObject(m_keepersgateGUID)) - go->RemoveGameObjectFlag(GO_FLAG_LOCKED); + scheduler.Schedule(45s, [this](TaskContext /*context*/) + { + if (GameObject* go = instance->GetGameObject(m_keepersgateGUID)) + { + go->RemoveGameObjectFlag(GO_FLAG_LOCKED); + if (Creature* trigger = instance->SummonCreature(NPC_ANCIENT_GATE_WORLD_TRIGGER, triggerAncientGatePosition, nullptr, 10*IN_MILLISECONDS)) + { + trigger->AI()->Talk(EMOTE_ANCIENT_GATE_UNLOCKED); + } + } + }); } if (type == TYPE_MIMIRON && data == IN_PROGRESS) // after reaching him without tram and starting the fight m_mimironTramUsed = true; diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h index 288e87dcb..20e23957b 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h @@ -290,6 +290,10 @@ enum UlduarMisc // Freya, Hodir, Mimiron, Thorim EVENT_KEEPER_TELEPORTED = 62941, + // Ancient Gate + NPC_ANCIENT_GATE_WORLD_TRIGGER = 22515, + EMOTE_ANCIENT_GATE_UNLOCKED = 19, + // Yogg-Saron ACTION_SARA_UPDATE_SUMMON_KEEPERS = 4, KEEPER_FREYA = 0, From bb1f7622ccb07eab68e7e25a8b7a0dc880d0d87e Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Sun, 26 May 2024 18:12:20 +0200 Subject: [PATCH 02/39] fix(ICC/Sindragosa): add a cooldown to proccing Unchained Magic (#18901) * add cooldown to proc * convert to spell and aurascript pair macro * remove no longer needed validate override * set cooldown with Cooldown field in table spell_proc_event --- .../rev_1716477609336515289.sql | 2 + .../IcecrownCitadel/boss_sindragosa.cpp | 92 ++++--------------- 2 files changed, 20 insertions(+), 74 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1716477609336515289.sql diff --git a/data/sql/updates/pending_db_world/rev_1716477609336515289.sql b/data/sql/updates/pending_db_world/rev_1716477609336515289.sql new file mode 100644 index 000000000..953bfff02 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1716477609336515289.sql @@ -0,0 +1,2 @@ +-- +UPDATE `spell_proc_event` SET `Cooldown`=600 WHERE `entry`=69762; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index d21c9935d..b9326859a 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -869,85 +869,29 @@ private: bool _removeHealers; }; -class spell_sindragosa_unchained_magic : public SpellScriptLoader +class spell_sindragosa_unchained_magic : public SpellScript { -public: - spell_sindragosa_unchained_magic() : SpellScriptLoader("spell_sindragosa_unchained_magic") { } + PrepareSpellScript(spell_sindragosa_unchained_magic); - class spell_sindragosa_unchained_magic_SpellScript : public SpellScript + void FilterTargets(std::list& unitList) { - PrepareSpellScript(spell_sindragosa_unchained_magic_SpellScript); - - void FilterTargets(std::list& unitList) - { - std::list healList = unitList; - std::list dpsList = unitList; - unitList.clear(); - uint32 maxSize = uint32(GetCaster()->GetMap()->GetSpawnMode() & 1 ? 3 : 1); - healList.remove_if(UnchainedMagicTargetSelector(false)); - if (healList.size() > maxSize) - Acore::Containers::RandomResize(healList, maxSize); - dpsList.remove_if(UnchainedMagicTargetSelector(true)); - if (dpsList.size() > maxSize) - Acore::Containers::RandomResize(dpsList, maxSize); - unitList.splice(unitList.begin(), healList); - unitList.splice(unitList.begin(), dpsList); - } - - void Register() override - { - OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sindragosa_unchained_magic_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); - } - }; - - SpellScript* GetSpellScript() const override - { - return new spell_sindragosa_unchained_magic_SpellScript(); + std::list healList = unitList; + std::list dpsList = unitList; + unitList.clear(); + uint32 maxSize = uint32(GetCaster()->GetMap()->GetSpawnMode() & 1 ? 3 : 1); + healList.remove_if(UnchainedMagicTargetSelector(false)); + if (healList.size() > maxSize) + Acore::Containers::RandomResize(healList, maxSize); + dpsList.remove_if(UnchainedMagicTargetSelector(true)); + if (dpsList.size() > maxSize) + Acore::Containers::RandomResize(dpsList, maxSize); + unitList.splice(unitList.begin(), healList); + unitList.splice(unitList.begin(), dpsList); } - class spell_sindragosa_unchained_magic_AuraScript : public AuraScript + void Register() override { - PrepareAuraScript(spell_sindragosa_unchained_magic_AuraScript); - - std::map _lastMSTimeForSpell; - - bool Validate(SpellInfo const* /*spellInfo*/) override - { - _lastMSTimeForSpell.clear(); - return true; - } - - bool CheckProc(ProcEventInfo& eventInfo) - { - SpellInfo const* spellInfo = eventInfo.GetSpellInfo(); - if (!spellInfo) - return false; - - uint32 currMSTime = GameTime::GetGameTimeMS().count(); - std::map::iterator itr = _lastMSTimeForSpell.find(spellInfo->Id); - if (itr != _lastMSTimeForSpell.end()) - { - uint32 lastMSTime = itr->second; - itr->second = currMSTime; - if (getMSTimeDiff(lastMSTime, currMSTime) < 600) - return false; - - return true; - } - - _lastMSTimeForSpell[spellInfo->Id] = currMSTime; - return true; - } - - void Register() override - { - DoCheckProc += AuraCheckProcFn(spell_sindragosa_unchained_magic_AuraScript::CheckProc); - } - }; - - AuraScript* GetAuraScript() const override - { - return new spell_sindragosa_unchained_magic_AuraScript(); + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sindragosa_unchained_magic::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); } }; @@ -2012,7 +1956,7 @@ void AddSC_boss_sindragosa() new boss_sindragosa(); new npc_ice_tomb(); new spell_sindragosa_s_fury(); - new spell_sindragosa_unchained_magic(); + RegisterSpellScript(spell_sindragosa_unchained_magic); new spell_sindragosa_permeating_chill(); new spell_sindragosa_instability(); new spell_sindragosa_icy_grip(); From 8e784c19147a44eccdb21a6f3b53dcc18f66dad4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 26 May 2024 16:13:16 +0000 Subject: [PATCH 03/39] chore(DB): import pending files Referenced commit(s): 29dda79638604fc0626f76d5158085baa8327d5b --- .../rev_1716477609336515289.sql => db_world/2024_05_26_00.sql} | 1 + .../rev_1716655119634919952.sql => db_world/2024_05_26_01.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1716477609336515289.sql => db_world/2024_05_26_00.sql} (61%) rename data/sql/updates/{pending_db_world/rev_1716655119634919952.sql => db_world/2024_05_26_01.sql} (90%) diff --git a/data/sql/updates/pending_db_world/rev_1716477609336515289.sql b/data/sql/updates/db_world/2024_05_26_00.sql similarity index 61% rename from data/sql/updates/pending_db_world/rev_1716477609336515289.sql rename to data/sql/updates/db_world/2024_05_26_00.sql index 953bfff02..c127e92e5 100644 --- a/data/sql/updates/pending_db_world/rev_1716477609336515289.sql +++ b/data/sql/updates/db_world/2024_05_26_00.sql @@ -1,2 +1,3 @@ +-- DB update 2024_05_25_01 -> 2024_05_26_00 -- UPDATE `spell_proc_event` SET `Cooldown`=600 WHERE `entry`=69762; diff --git a/data/sql/updates/pending_db_world/rev_1716655119634919952.sql b/data/sql/updates/db_world/2024_05_26_01.sql similarity index 90% rename from data/sql/updates/pending_db_world/rev_1716655119634919952.sql rename to data/sql/updates/db_world/2024_05_26_01.sql index 38cbe1cc4..818e87dfd 100644 --- a/data/sql/updates/pending_db_world/rev_1716655119634919952.sql +++ b/data/sql/updates/db_world/2024_05_26_01.sql @@ -1,3 +1,4 @@ +-- DB update 2024_05_26_00 -> 2024_05_26_01 -- DELETE FROM `creature_text` WHERE (`CreatureID` = 22515) AND (`GroupID` = 19); INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES From 99004116a594bf2f8d76fc7248f6e8130f4a5a40 Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Sun, 26 May 2024 19:38:16 +0200 Subject: [PATCH 04/39] fix(Scripts/Ulduar): falling down Kologarn's pit should kill (#18945) * add insersectboundary * add kill bunny to kologarn's pit * Update data/sql/updates/pending_db_world/rev_1716571588345702920.sql Co-authored-by: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> * refactor: use Map DoForAllPlayers --------- Co-authored-by: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> --- .../rev_1716571588345702920.sql | 5 +++ src/server/game/Maps/AreaBoundary.cpp | 18 +++++++++++ src/server/game/Maps/AreaBoundary.h | 14 ++++++++ .../Northrend/Ulduar/Ulduar/boss_kologarn.cpp | 32 +++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1716571588345702920.sql diff --git a/data/sql/updates/pending_db_world/rev_1716571588345702920.sql b/data/sql/updates/pending_db_world/rev_1716571588345702920.sql new file mode 100644 index 000000000..b674652f0 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1716571588345702920.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `creature` WHERE `id1` = 33742; +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES +(136768, 33742, 0, 0, 603, 0, 0, 3, 1, 0, 1809.8663330078125, -38.2449531555175781, 408.03680419921875, 0, 180, 0, 0, 26066, 0, 0, 0, 0, 0, '', 47720); +UPDATE `creature_template` SET `ScriptName` = 'boss_kologarn_pit_kill_bunny' WHERE `entry` = 33742; diff --git a/src/server/game/Maps/AreaBoundary.cpp b/src/server/game/Maps/AreaBoundary.cpp index 3ef5601a8..e5b184876 100644 --- a/src/server/game/Maps/AreaBoundary.cpp +++ b/src/server/game/Maps/AreaBoundary.cpp @@ -110,3 +110,21 @@ bool BoundaryUnionBoundary::IsWithinBoundaryArea(Position const* pos) const { return (_b1->IsWithinBoundary(pos) || _b2->IsWithinBoundary(pos)); } + +// ---== INTERSECT OF 2 BOUNDARIES ==--- +BoundaryIntersectBoundary::BoundaryIntersectBoundary(AreaBoundary const* b1, AreaBoundary const* b2, bool isInverted) : + AreaBoundary(isInverted), _b1(b1), _b2(b2) +{ + ASSERT(b1 && b2); +} + +BoundaryIntersectBoundary::~BoundaryIntersectBoundary() +{ + delete _b1; + delete _b2; +} + +bool BoundaryIntersectBoundary::IsWithinBoundaryArea(Position const* pos) const +{ + return (_b1->IsWithinBoundary(pos) && _b2->IsWithinBoundary(pos)); +} diff --git a/src/server/game/Maps/AreaBoundary.h b/src/server/game/Maps/AreaBoundary.h index e599c335e..48a5e6671 100644 --- a/src/server/game/Maps/AreaBoundary.h +++ b/src/server/game/Maps/AreaBoundary.h @@ -165,4 +165,18 @@ class AC_GAME_API BoundaryUnionBoundary : public AreaBoundary AreaBoundary const* const _b2; }; +class AC_GAME_API BoundaryIntersectBoundary : public AreaBoundary +{ + public: + BoundaryIntersectBoundary(AreaBoundary const* b1, AreaBoundary const* b2, bool isInverted = false); + + protected: + virtual ~BoundaryIntersectBoundary(); + bool IsWithinBoundaryArea(Position const* pos) const override; + + private: + AreaBoundary const* const _b1; + AreaBoundary const* const _b2; +}; + #endif //ACORE_AREA_BOUNDARY_H diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp index 94e89fa71..56fb1a902 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp @@ -665,6 +665,37 @@ public: }; }; +struct boss_kologarn_pit_kill_bunny : public NullCreatureAI +{ + boss_kologarn_pit_kill_bunny(Creature* creature) : NullCreatureAI(creature) { } + + void Reset() override + { + RectangleBoundary* _boundaryXY = new RectangleBoundary(1782.0f, 1832.0f, -56.0f, 8.0f); + ZRangeBoundary* _boundaryZ = new ZRangeBoundary(400.0f, 439.0f); + _boundaryIntersect = new BoundaryIntersectBoundary(_boundaryXY, _boundaryZ); + + scheduler.Schedule(0s, [this](TaskContext context) + { + me->GetMap()->DoForAllPlayers([&](Player* player) + { + if (_boundaryIntersect->IsWithinBoundary(player->GetPosition()) && !player->IsGameMaster()) + { + player->KillSelf(false); + } + }); + context.Repeat(1s); + }); + } + + void UpdateAI(uint32 diff) override + { + scheduler.Update(diff); + } +private: + BoundaryIntersectBoundary const* _boundaryIntersect; +}; + // predicate function to select non main tank target class StoneGripTargetSelector { @@ -894,6 +925,7 @@ void AddSC_boss_kologarn() new boss_kologarn(); new boss_kologarn_arms(); new boss_kologarn_eyebeam(); + RegisterUlduarCreatureAI(boss_kologarn_pit_kill_bunny); // Spells new spell_ulduar_stone_grip_cast_target(); From 9c27316af61c13af7d122395b50543fe56d8c5d6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 26 May 2024 17:39:08 +0000 Subject: [PATCH 05/39] chore(DB): import pending files Referenced commit(s): 99004116a594bf2f8d76fc7248f6e8130f4a5a40 --- .../rev_1716571588345702920.sql => db_world/2024_05_26_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1716571588345702920.sql => db_world/2024_05_26_02.sql} (93%) diff --git a/data/sql/updates/pending_db_world/rev_1716571588345702920.sql b/data/sql/updates/db_world/2024_05_26_02.sql similarity index 93% rename from data/sql/updates/pending_db_world/rev_1716571588345702920.sql rename to data/sql/updates/db_world/2024_05_26_02.sql index b674652f0..49b4f76e4 100644 --- a/data/sql/updates/pending_db_world/rev_1716571588345702920.sql +++ b/data/sql/updates/db_world/2024_05_26_02.sql @@ -1,3 +1,4 @@ +-- DB update 2024_05_26_01 -> 2024_05_26_02 -- DELETE FROM `creature` WHERE `id1` = 33742; INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES From 4f0c348fb65b056680497b253ea77eef5a724be0 Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Mon, 27 May 2024 09:38:17 +0200 Subject: [PATCH 06/39] fix(Scripts/Ulduar): adjust Mimiron outro RP sleep visuals (#18950) * fix the sleep visual, add stand up event * make Mimi selectable during outro so you can see his faction change * talk with emote oneshot talk * fix selectable * adjust timings * set done status when chest spawns * combat should stop when Mimiron ejects * Revert "combat should stop when Mimiron ejects" This reverts commit 6e476a55a49c33109f9112b2782d0d186eef49f3. * style --- .../Northrend/Ulduar/Ulduar/boss_mimiron.cpp | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp index dfbc906e0..93c0de72f 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp @@ -86,7 +86,8 @@ enum SpellData SPELL_HAND_PULSE_25_L = 64536, SPELL_SELF_REPAIR = 64383, - SPELL_SLEEP = 64394, + SPELL_SLEEP_VISUAL_1 = 64393, + SPELL_SLEEP_VISUAL_2 = 64394, }; enum NPCs @@ -172,10 +173,11 @@ enum EVENTS EVENT_JOIN_ACU = 35, EVENT_START_PHASE4 = 36, EVENT_FINISH = 50, - EVENT_SAY_VOLTRON_DEAD = 51, - EVENT_DISAPPEAR = 52, - EVENT_BERSERK = 53, - EVENT_BERSERK_2 = 54, + EVENT_STAND_UP_FRIENDLY = 51, + EVENT_SAY_VOLTRON_DEAD = 52, + EVENT_DISAPPEAR = 53, + EVENT_BERSERK = 54, + EVENT_BERSERK_2 = 55, // Leviathan: EVENT_SPELL_NAPALM_SHELL = 3, @@ -754,17 +756,20 @@ public: Position exitPos = me->GetPosition(); me->_ExitVehicle(&exitPos); me->AttackStop(); - me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK); me->GetMotionMaster()->Clear(); summons.DoAction(1337); // despawn summons of summons summons.DespawnEntry(NPC_FLAMES_INITIAL); summons.DespawnEntry(33576); + me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + float angle = VX001->GetOrientation(); float v_x = me->GetPositionX() + cos(angle) * 10.0f; float v_y = me->GetPositionY() + std::sin(angle) * 10.0f; me->GetMotionMaster()->MoveJump(v_x, v_y, 364.32f, 7.0f, 7.0f); + DoCastSelf(SPELL_SLEEP_VISUAL_1); + if( pInstance ) for( uint16 i = 0; i < 3; ++i ) if( ObjectGuid guid = pInstance->GetGuidData(DATA_GO_MIMIRON_DOOR_1 + i) ) @@ -783,11 +788,20 @@ public: computer->AI()->Talk(TALK_COMPUTER_TERMINATED); events.Reset(); - events.ScheduleEvent(EVENT_SAY_VOLTRON_DEAD, 6s); + events.ScheduleEvent(EVENT_STAND_UP_FRIENDLY, 6s); } break; + case EVENT_STAND_UP_FRIENDLY: + me->RemoveAurasDueToSpell(SPELL_SLEEP_VISUAL_1); + DoCastSelf(SPELL_SLEEP_VISUAL_2); + me->SetFaction(FACTION_FRIENDLY); + events.ScheduleEvent(EVENT_SAY_VOLTRON_DEAD, 4s); + break; case EVENT_SAY_VOLTRON_DEAD: Talk(SAY_V07TRON_DEATH); + me->HandleEmoteCommand(EMOTE_ONESHOT_TALK); + if (pInstance) + pInstance->SetData(TYPE_MIMIRON, DONE); // spawn chest if (uint32 chestId = (hardmode ? RAID_MODE(GO_MIMIRON_CHEST_HARD, GO_MIMIRON_CHEST_HERO_HARD) : RAID_MODE(GO_MIMIRON_CHEST, GO_MIMIRON_CHEST_HERO))) { @@ -797,11 +811,9 @@ public: go->SetLootRecipient(me->GetMap()); } } - events.ScheduleEvent(EVENT_DISAPPEAR, 15s); + events.ScheduleEvent(EVENT_DISAPPEAR, 9s); break; case EVENT_DISAPPEAR: - if( pInstance ) - pInstance->SetData(TYPE_MIMIRON, DONE); DoCastSelf(SPELL_TELEPORT); summons.DespawnAll(); break; From 458eadd9e47167724c142c3f387219f912215a65 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 27 May 2024 12:41:10 -0300 Subject: [PATCH 07/39] =?UTF-8?q?fix(Scripts/Hyjal):=20Azgalor=20Rain=20of?= =?UTF-8?q?=20Fire=20should=20target=20non-player=20tar=E2=80=A6=20(#18956?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Scripts/Hyjal): Azgalor Rain of Fire should target non-player targets --- .../Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp index a4fb98963..6a7562869 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp @@ -60,7 +60,7 @@ public: context.Repeat(8s, 16s); }).Schedule(25s, [this](TaskContext context) { - DoCastRandomTarget(SPELL_RAIN_OF_FIRE, 0, 40.f); + DoCastRandomTarget(SPELL_RAIN_OF_FIRE, 0, 40.f, false); context.Repeat(15s); }).Schedule(30s, [this](TaskContext context) { From 8200385efb40852413f0d056bcfa667536ae233f Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 27 May 2024 13:51:41 -0300 Subject: [PATCH 08/39] chore(Scripts/Hyjal): Update Mark of Kazrogal script (#18958) --- .../BattleForMountHyjal/boss_kazrogal.cpp | 84 ++++++++----------- 1 file changed, 34 insertions(+), 50 deletions(-) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp index 49937582f..37fc84809 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp @@ -133,67 +133,51 @@ private: uint8 _markCounter; }; -class spell_mark_of_kazrogal : public SpellScriptLoader +class spell_mark_of_kazrogal : public SpellScript { -public: - spell_mark_of_kazrogal() : SpellScriptLoader("spell_mark_of_kazrogal") { } + PrepareSpellScript(spell_mark_of_kazrogal); - class spell_mark_of_kazrogal_SpellScript : public SpellScript + void FilterTargets(std::list& targets) { - PrepareSpellScript(spell_mark_of_kazrogal_SpellScript); - - void FilterTargets(std::list& targets) - { - targets.remove_if(Acore::PowerCheck(POWER_MANA, false)); - } - - void Register() override - { - OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mark_of_kazrogal_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); - } - }; - - class spell_mark_of_kazrogal_AuraScript : public AuraScript - { - PrepareAuraScript(spell_mark_of_kazrogal_AuraScript); - - bool Validate(SpellInfo const* /*spell*/) override - { - return ValidateSpellInfo({ SPELL_MARK_DAMAGE }); - } - - void OnPeriodic(AuraEffect const* aurEff) - { - Unit* target = GetTarget(); - - if ((int32)target->GetPower(POWER_MANA) < aurEff->GetBaseAmount()) - { - target->CastSpell(target, SPELL_MARK_DAMAGE, true, nullptr, aurEff); - // Remove aura - SetDuration(0); - } - } - - void Register() override - { - OnEffectPeriodic += AuraEffectPeriodicFn(spell_mark_of_kazrogal_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_MANA_LEECH); - } - }; - - SpellScript* GetSpellScript() const override - { - return new spell_mark_of_kazrogal_SpellScript(); + targets.remove_if(Acore::PowerCheck(POWER_MANA, false)); } - AuraScript* GetAuraScript() const override + void Register() override { - return new spell_mark_of_kazrogal_AuraScript(); + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mark_of_kazrogal::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); + } +}; + +class spell_mark_of_kazrogal_aura : public AuraScript +{ + PrepareAuraScript(spell_mark_of_kazrogal_aura); + + bool Validate(SpellInfo const* /*spell*/) override + { + return ValidateSpellInfo({ SPELL_MARK_DAMAGE }); + } + + void OnPeriodic(AuraEffect const* aurEff) + { + Unit* target = GetTarget(); + + if ((int32)target->GetPower(POWER_MANA) < aurEff->GetBaseAmount()) + { + target->CastSpell(target, SPELL_MARK_DAMAGE, true, nullptr, aurEff); + // Remove aura + SetDuration(0); + } + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_mark_of_kazrogal_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_MANA_LEECH); } }; void AddSC_boss_kazrogal() { RegisterHyjalAI(boss_kazrogal); - new spell_mark_of_kazrogal(); + RegisterSpellAndAuraScriptPair(spell_mark_of_kazrogal, spell_mark_of_kazrogal_aura); } From 141cc0bd44e54fbadb743ed6ba9b78ecdd9f2967 Mon Sep 17 00:00:00 2001 From: daobashun <49193927+fangshun2004@users.noreply.github.com> Date: Tue, 28 May 2024 00:51:53 +0800 Subject: [PATCH 09/39] Fix creatures combat AI missing (#18947) * add sql * add 18850 fix * fix * Modify the commnet --- .../rev_1716648895478656500.sql | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1716648895478656500.sql diff --git a/data/sql/updates/pending_db_world/rev_1716648895478656500.sql b/data/sql/updates/pending_db_world/rev_1716648895478656500.sql new file mode 100644 index 000000000..df675e7f6 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1716648895478656500.sql @@ -0,0 +1,23 @@ +-- update DONT_OVERRIDE_SAI_ENTRY +-- #18734 +UPDATE `creature_template` SET `flags_extra` = 134217728 WHERE (`entry` = 4300); +UPDATE `creature_template` SET `flags_extra` = 134217728 WHERE (`entry` = 4301); +UPDATE `creature_template` SET `flags_extra` = 134217728 WHERE (`entry` = 4294); +UPDATE `creature_template` SET `flags_extra` = 134217728 WHERE (`entry` = 4295); +UPDATE `creature_template` SET `flags_extra` = 134217728 WHERE (`entry` = 4299); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 429400); +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 +(429400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - Actionlist - Set_Faction Friend'), +(429400, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - Actionlist - stop movement'), +-- new add +(429400, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 212, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - Actionlist - Stop motion (StopMoving: 1, MovementExpired: 1)'), +(429400, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - Actionlist - Set Facing player'), +(429400, 9, 4, 0, 0, 0, 100, 0, 500, 500, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - Actionlist - SetStandState UNIT_STAND_STATE_STAND'), +(429400, 9, 5, 0, 0, 0, 100, 0, 500, 2500, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - Actionlist - SetSheath SHEATH_STATE_UNARMED'), +(429400, 9, 6, 0, 0, 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, 'Scarlet Monaster AshbringerEvent - Actionlist - SetSheath UNIT_STAND_STATE_KNEEL'), +(429400, 9, 7, 0, 0, 0, 50, 0, 1000, 2000, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Monaster AshbringerEvent - Actionlist - Talk 0'); + +-- #18850 fix +UPDATE `creature_template` SET `flags_extra` = 134217728 WHERE (`entry` = 27202); +UPDATE `creature_template` SET `flags_extra` = 134217728 WHERE (`entry` = 27203); From cf4932065608460b910ffac81dc4ec9ffbd2ec30 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 May 2024 16:52:31 +0000 Subject: [PATCH 10/39] chore(DB): import pending files Referenced commit(s): 8200385efb40852413f0d056bcfa667536ae233f --- .../rev_1716648895478656500.sql => db_world/2024_05_27_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1716648895478656500.sql => db_world/2024_05_27_00.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1716648895478656500.sql b/data/sql/updates/db_world/2024_05_27_00.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1716648895478656500.sql rename to data/sql/updates/db_world/2024_05_27_00.sql index df675e7f6..53ae78173 100644 --- a/data/sql/updates/pending_db_world/rev_1716648895478656500.sql +++ b/data/sql/updates/db_world/2024_05_27_00.sql @@ -1,3 +1,4 @@ +-- DB update 2024_05_26_02 -> 2024_05_27_00 -- update DONT_OVERRIDE_SAI_ENTRY -- #18734 UPDATE `creature_template` SET `flags_extra` = 134217728 WHERE (`entry` = 4300); From 3985db30063b17eaf6c98a21f3e3fb236bf7ab2d Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Mon, 27 May 2024 19:24:37 +0200 Subject: [PATCH 11/39] fix(Scripts/Hyjal): Anetheron should not cast sleep on MT (#18948) * init * also talk when spell fails --- .../CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp index e814cc607..02da28a40 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp @@ -65,9 +65,8 @@ public: context.Repeat(10s, 15s); }).Schedule(25s, 32s, [this](TaskContext context) { - if (DoCastRandomTarget(SPELL_SLEEP) == SPELL_CAST_OK) - Talk(SAY_SLEEP); - + Talk(SAY_SLEEP); + DoCastRandomTarget(SPELL_SLEEP, 0, 0.0f, true, false, false); context.Repeat(35s, 48s); }).Schedule(30s, 48s, [this](TaskContext context) { From 73e44859f075321bb53023e48aa13f717f321098 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 27 May 2024 15:48:29 -0300 Subject: [PATCH 12/39] fix(Scripts/Hyjal): Azgalor mark of doom spawn demons on target death (#18959) --- .../rev_1716833230281927300.sql | 4 ++++ .../BattleForMountHyjal/boss_azgalor.cpp | 22 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1716833230281927300.sql diff --git a/data/sql/updates/pending_db_world/rev_1716833230281927300.sql b/data/sql/updates/pending_db_world/rev_1716833230281927300.sql new file mode 100644 index 000000000..411fa534b --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1716833230281927300.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_azgalor_doom' AND `spell_id` = 31347; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(31347, 'spell_azgalor_doom'); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp index 6a7562869..95cdfdffb 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp @@ -17,6 +17,8 @@ #include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" #include "hyjal.h" enum Spells @@ -117,7 +119,27 @@ private: }; +class spell_azgalor_doom : public AuraScript +{ + PrepareAuraScript(spell_azgalor_doom); + + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + Unit* target = GetTarget(); + if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_DEATH) + { + target->CastSpell(target, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, true); + } + } + + void Register() override + { + OnEffectRemove += AuraEffectRemoveFn(spell_azgalor_doom::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); + } +}; + void AddSC_boss_azgalor() { RegisterHyjalAI(boss_azgalor); + RegisterSpellScript(spell_azgalor_doom); } From a99f28fd0b47859b2787dac15e391e144d35f948 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 May 2024 18:49:19 +0000 Subject: [PATCH 13/39] chore(DB): import pending files Referenced commit(s): 73e44859f075321bb53023e48aa13f717f321098 --- .../rev_1716833230281927300.sql => db_world/2024_05_27_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1716833230281927300.sql => db_world/2024_05_27_01.sql} (81%) diff --git a/data/sql/updates/pending_db_world/rev_1716833230281927300.sql b/data/sql/updates/db_world/2024_05_27_01.sql similarity index 81% rename from data/sql/updates/pending_db_world/rev_1716833230281927300.sql rename to data/sql/updates/db_world/2024_05_27_01.sql index 411fa534b..18dac0804 100644 --- a/data/sql/updates/pending_db_world/rev_1716833230281927300.sql +++ b/data/sql/updates/db_world/2024_05_27_01.sql @@ -1,3 +1,4 @@ +-- DB update 2024_05_27_00 -> 2024_05_27_01 -- DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_azgalor_doom' AND `spell_id` = 31347; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES From 049e83c5760909ec6ee66574c52c9560ec2c8466 Mon Sep 17 00:00:00 2001 From: qwe900 Date: Mon, 27 May 2024 21:15:13 +0200 Subject: [PATCH 14/39] fix(Scripts/IcecrownCitadel): Gunship Cannons generates heat on Cast not on Hit (#18805) * Update boss_icecrown_gunship_battle.cpp Makes the Cannons on Gunship Blizzlike. They generate power (heat) on cast and not on Hit. Removes Engergize from Spell 69399 cause its only triggers on target->hit in core Still uses spellscript effect but on cast instead * Update boss_icecrown_gunship_battle.cpp --- .../boss_icecrown_gunship_battle.cpp | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp index 3f151ab85..2ec36b0f9 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp @@ -2383,20 +2383,45 @@ public: return GetCaster()->GetTypeId() == TYPEID_UNIT; } - void CheckEnergy() + void CalculatePower() { - if (GetCaster()->GetPower(POWER_ENERGY) >= 100) + Unit* caster = GetCaster(); + if (!caster) + return; + + SpellInfo const* spellInfo = GetSpellInfo(); + if (!spellInfo) + return; + + // Check if the effect is energize + if (spellInfo->Effects[EFFECT_1].Effect == SPELL_EFFECT_ENERGIZE) { - GetCaster()->CastSpell(GetCaster(), SPELL_OVERHEAT, true); - if (Vehicle* vehicle = GetCaster()->GetVehicleKit()) - if (Unit* passenger = vehicle->GetPassenger(0)) - sCreatureTextMgr->SendChat(GetCaster()->ToCreature(), SAY_OVERHEAT, passenger); + int32 energizeAmount = spellInfo->Effects[EFFECT_1].CalcValue(caster); + + // Apply the power gain directly to the caster + caster->ModifyPower(POWER_ENERGY, energizeAmount); } + + if (caster->GetPower(POWER_ENERGY) >= 100) + { + caster->CastSpell(caster, SPELL_OVERHEAT, true); + if (Vehicle* vehicle = caster->GetVehicleKit()) + if (Unit* passenger = vehicle->GetPassenger(0)) + sCreatureTextMgr->SendChat(caster->ToCreature(), SAY_OVERHEAT, passenger); + } + + } + + void PreventPowerGainOnHit(SpellEffIndex effIndex) + { + PreventHitDefaultEffect(effIndex); } void Register() override { - AfterHit += SpellHitFn(spell_igb_cannon_blast_SpellScript::CheckEnergy); + OnCast += SpellCastFn(spell_igb_cannon_blast_SpellScript::CalculatePower); + OnEffectHitTarget += SpellEffectFn(spell_igb_cannon_blast_SpellScript::PreventPowerGainOnHit, EFFECT_1, SPELL_EFFECT_ENERGIZE); + } }; From 2a1d23e520547c802172e1cae31320607709dd98 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 27 May 2024 20:24:10 -0300 Subject: [PATCH 15/39] =?UTF-8?q?fix(Scripts/Hyjal):=20Implement=20Eternal?= =?UTF-8?q?=20Silence=20spell=20when=20going=20into=20t=E2=80=A6=20(#18960?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Scripts/Hyjal): Implement Eternal Silence spell when going into the Well of Eternity --- .../updates/pending_db_world/rev_1716843579555488300.sql | 4 ++++ src/server/game/Entities/Player/Player.cpp | 3 +++ src/server/game/Instances/InstanceScript.h | 3 +++ .../Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h | 6 +++++- .../CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp | 9 +++++++++ 5 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 data/sql/updates/pending_db_world/rev_1716843579555488300.sql diff --git a/data/sql/updates/pending_db_world/rev_1716843579555488300.sql b/data/sql/updates/pending_db_world/rev_1716843579555488300.sql new file mode 100644 index 000000000..228970e8f --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1716843579555488300.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = -42201 AND `spell_effect` = 42205; +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(-42201, 42205, 0, 'Eternal Silence trigger Residue of Eternity on removal'); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index ee661c9a9..f763ba93b 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -2176,6 +2176,9 @@ void Player::SetInWater(bool apply) RemoveAurasWithInterruptFlags(apply ? AURA_INTERRUPT_FLAG_NOT_ABOVEWATER : AURA_INTERRUPT_FLAG_NOT_UNDERWATER); getHostileRefMgr().updateThreatTables(); + + if (InstanceScript* instance = GetInstanceScript()) + instance->OnPlayerInWaterStateUpdate(this, apply); } bool Player::IsInAreaTriggerRadius(AreaTrigger const* trigger, float delta) const diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index 6fd2c9402..d65bb0349 100644 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -186,6 +186,9 @@ public: virtual void OnPlayerAreaUpdate(Player* /*player*/, uint32 /*oldArea*/, uint32 /*newArea*/) {} + //Called when a player enters/leaves water bodies. + virtual void OnPlayerInWaterStateUpdate(Player* /*player*/, bool /*inWater*/) {} + //Handle open / close objects //use HandleGameObject(ObjectGuid::Empty, boolen, GO); in OnObjectCreate in instance scripts //use HandleGameObject(GUID, boolen, nullptr); in any other script diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h index b0c127f49..7825555cb 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h @@ -144,7 +144,11 @@ enum HyjalMisc START_WAVE_HORDE_RETREAT = 39, START_WAVE_NIGHT_ELF = 42, - CONTEXT_GROUP_WAVES = 1 + CONTEXT_GROUP_WAVES = 1, + + AREA_NORDRASSIL = 3710, + + SPELL_ETERNAL_SILENCE = 42201 }; enum HyjalPaths diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp index fd5d50672..675dc3050 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp @@ -19,6 +19,7 @@ #include "InstanceMapScript.h" #include "InstanceScript.h" #include "Opcodes.h" +#include "Player.h" #include "WorldPacket.h" #include "hyjal.h" @@ -530,6 +531,14 @@ public: _scheduler.Update(diff); } + void OnPlayerInWaterStateUpdate(Player* player, bool inWater) override + { + if (inWater && player->GetAreaId() == AREA_NORDRASSIL) + { + player->CastSpell(player, SPELL_ETERNAL_SILENCE, true); + } + } + protected: int32 trash; uint8 _currentWave; From a45ab5b8f97a2e7e02dd22fcc67a9dad26046c88 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 May 2024 23:25:46 +0000 Subject: [PATCH 16/39] chore(DB): import pending files Referenced commit(s): 2a1d23e520547c802172e1cae31320607709dd98 --- .../rev_1716843579555488300.sql => db_world/2024_05_27_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1716843579555488300.sql => db_world/2024_05_27_02.sql} (85%) diff --git a/data/sql/updates/pending_db_world/rev_1716843579555488300.sql b/data/sql/updates/db_world/2024_05_27_02.sql similarity index 85% rename from data/sql/updates/pending_db_world/rev_1716843579555488300.sql rename to data/sql/updates/db_world/2024_05_27_02.sql index 228970e8f..0bdbf3bf5 100644 --- a/data/sql/updates/pending_db_world/rev_1716843579555488300.sql +++ b/data/sql/updates/db_world/2024_05_27_02.sql @@ -1,3 +1,4 @@ +-- DB update 2024_05_27_01 -> 2024_05_27_02 -- DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = -42201 AND `spell_effect` = 42205; INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES From 733fbf89e130fbad9fdd933e8c3d8b5e171f5cf0 Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Tue, 28 May 2024 08:43:46 +0200 Subject: [PATCH 17/39] fix(Ulduar/Tram): add rocket booster, turnaround visuals, button logic (#18900) fix(Ulduar/Tram): add rocket booster, disable logic, activate turnaround gobjects remove go_call_tram GameObjectScript add tram gobjects to header add tram logic renames update position of boosters --- .../rev_1715708681053405822.sql | 19 +++++ .../Ulduar/Ulduar/instance_ulduar.cpp | 82 ++++++++++++++++++- .../Northrend/Ulduar/Ulduar/ulduar.cpp | 29 ------- .../scripts/Northrend/Ulduar/Ulduar/ulduar.h | 8 ++ 4 files changed, 108 insertions(+), 30 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1715708681053405822.sql diff --git a/data/sql/updates/pending_db_world/rev_1715708681053405822.sql b/data/sql/updates/pending_db_world/rev_1715708681053405822.sql new file mode 100644 index 000000000..a04e01a28 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1715708681053405822.sql @@ -0,0 +1,19 @@ +-- +-- Rocket Booster +UPDATE `gameobject` SET `position_x`=2307.000003, `position_y`=265.6011, `position_z`=424.287993 WHERE (`id` = 194904) AND (`guid` IN (35524)); +-- Delete 2nd Activate Tram gameobject +DELETE FROM `gameobject` WHERE `id` = 194438; +UPDATE `gameobject_template` SET `ScriptName` = '' WHERE `entry` = 194438; +-- Call Tram objects start as non-selectable +UPDATE `gameobject_template_addon` SET `flags` = `flags` | 16 WHERE `entry` IN (194912, 194914); +-- Buttons +UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI', `ScriptName` = '' WHERE `entry` IN (194437,194912,194914); +DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (194437,194912,194914)) AND (`source_type` = 1); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(194437, 1, 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, 'Activate Tram - On Respawn - Set Event Phase 1'), +(194437, 1, 1, 2, 64, 1, 100, 0, 0, 0, 0, 0, 0, 0, 34, 710, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Activate Tram - On Gossip Hello - Set Instance Data 710 to 1 (Phase 1)'), +(194437, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Activate Tram - On Gossip Hello - Set Event Phase 2 (Phase 1)'), +(194437, 1, 3, 4, 64, 2, 100, 0, 0, 0, 0, 0, 0, 0, 34, 710, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Activate Tram - On Gossip Hello - Set Instance Data 710 to 0 (Phase 2)'), +(194437, 1, 4, 0, 61, 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, 'Activate Tram - On Gossip Hello - Set Event Phase 1 (Phase 2)'), +(194912, 1, 0, 0, 64, 0, 100, 0, 0, 0, 0, 0, 0, 0, 34, 710, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Call Tram - On Gossip Hello - Set Instance Data 710 to 1'), +(194914, 1, 0, 0, 64, 0, 100, 0, 0, 0, 0, 0, 0, 0, 34, 710, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Call Tram - On Gossip Hello - Set Instance Data 710 to 0'); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp index 8f9a33b30..ed7f69221 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp @@ -100,6 +100,15 @@ public: Position normalChestPosition = { 1967.152588f, -204.188461f, 432.686951f, 5.50957f }; Position hardChestPosition = { 2035.94600f, -202.084885f, 432.686859f, 3.164077f }; + // Mimiron Tram + ObjectGuid m_mimironTramGUID; + ObjectGuid m_mimironActivateTramGUID; + ObjectGuid m_mimironTramRocketBoosterGUID; + ObjectGuid m_mimironTramTurnaround1GUID; + ObjectGuid m_mimironTramTurnaround2GUID; + ObjectGuid m_mimironCallTramCenterGUID; + ObjectGuid m_mimironCallTramMimironGUID; + // Mimiron ObjectGuid m_MimironDoor[3]; ObjectGuid m_MimironLeviathanMKIIguid; @@ -130,7 +139,6 @@ public: // Shared EventMap _events; bool m_mimironTramUsed; - ObjectGuid m_mimironTramGUID; ObjectGuid m_keepersgateGUID; ObjectGuid m_keepersGossipGUID[4]; @@ -173,7 +181,18 @@ public: // mimiron tram: instance->LoadGrid(2307.0f, 284.632f); if (GameObject* MimironTram = instance->GetGameObject(m_mimironTramGUID)) + { player->UpdateVisibilityOf(MimironTram); + if (StaticTransport* t = MimironTram->ToStaticTransport()) + { + if (GameObject* go = instance->GetGameObject(m_mimironTramRocketBoosterGUID)) + if (!go->GetTransport()) + t->AddPassenger(go, true); + if (GameObject* go = instance->GetGameObject(m_mimironActivateTramGUID)) + if (!go->GetTransport()) + t->AddPassenger(go, true); + } + } if (!m_uiAlgalonGUID && m_algalonTimer && (m_algalonTimer <= 60 || m_algalonTimer == TIMER_ALGALON_TO_SUMMON)) { @@ -556,11 +575,30 @@ public: case GO_SNOW_MOUND: gameObject->EnableCollision(false); break; + // Mimiron Tram case GO_MIMIRON_TRAM: if (GetData(TYPE_MIMIRON) == DONE) m_mimironTramUsed = true; m_mimironTramGUID = gameObject->GetGUID(); break; + case GO_MIMIRON_TRAM_ROCKET_BOOSTER: + m_mimironTramRocketBoosterGUID = gameObject->GetGUID(); + break; + case GO_MIMIRON_ACTIVATE_TRAM: + m_mimironActivateTramGUID = gameObject->GetGUID(); + break; + case GO_MIMIRON_CALL_TRAM_CENTER: + m_mimironCallTramCenterGUID = gameObject->GetGUID(); + break; + case GO_MIMIRON_CALL_TRAM_MIMIRON: + m_mimironCallTramMimironGUID = gameObject->GetGUID(); + break; + case GO_DOODAD_UL_TRAIN_TURNAROUND01: + m_mimironTramTurnaround1GUID = gameObject->GetGUID(); + break; + case GO_DOODAD_UL_TRAIN_TURNAROUND02: + m_mimironTramTurnaround2GUID = gameObject->GetGUID(); + break; // Algalon the Observer case GO_CELESTIAL_PLANETARIUM_ACCESS_10: case GO_CELESTIAL_PLANETARIUM_ACCESS_25: @@ -797,9 +835,51 @@ public: if (StaticTransport* t = MimironTram->ToStaticTransport()) { if (data == 0 && t->GetGoState() == GO_STATE_ACTIVE && t->GetPathProgress() == t->GetPauseTime()) + { MimironTram->SetGoState(GO_STATE_READY); + if (GameObject* rocketBooster = instance->GetGameObject(m_mimironTramRocketBoosterGUID)) + rocketBooster->SetGoState(GO_STATE_ACTIVE); + if (GameObject* activateTramButton = instance->GetGameObject(m_mimironActivateTramGUID)) + activateTramButton->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE); + if (GameObject* callTramCenterButton = instance->GetGameObject(m_mimironCallTramCenterGUID)) + callTramCenterButton->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE); + scheduler.Schedule(30s, [this](TaskContext /*context*/) + { + if (GameObject* turnaround1 = instance->GetGameObject(m_mimironTramTurnaround1GUID)) + turnaround1->UseDoorOrButton(); + if (GameObject* rocketBooster = instance->GetGameObject(m_mimironTramRocketBoosterGUID)) + rocketBooster->SetGoState(GO_STATE_READY); + }).Schedule(60s, [this](TaskContext /*context*/) + { + if (GameObject* activateTramButton = instance->GetGameObject(m_mimironActivateTramGUID)) + activateTramButton->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE); + if (GameObject* callTramMimironButton = instance->GetGameObject(m_mimironCallTramMimironGUID)) + callTramMimironButton->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE); + }); + } if (data == 1 && t->GetGoState() == GO_STATE_READY && t->GetPathProgress() == 0) + { MimironTram->SetGoState(GO_STATE_ACTIVE); + if (GameObject* rocketBooster = instance->GetGameObject(m_mimironTramRocketBoosterGUID)) + rocketBooster->SetGoState(GO_STATE_ACTIVE); + if (GameObject* activateTramButton = instance->GetGameObject(m_mimironActivateTramGUID)) + activateTramButton->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE); + if (GameObject* callTramMimironButton = instance->GetGameObject(m_mimironCallTramMimironGUID)) + callTramMimironButton->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE); + scheduler.Schedule(33s, [this](TaskContext /*context*/) + { + if (GameObject* turnaround2 = instance->GetGameObject(m_mimironTramTurnaround2GUID)) + turnaround2->UseDoorOrButton(); + if (GameObject* rocketBooster = instance->GetGameObject(m_mimironTramRocketBoosterGUID)) + rocketBooster->SetGoState(GO_STATE_READY); + }).Schedule(63s, [this](TaskContext /*context*/) + { + if (GameObject* activateTramButton = instance->GetGameObject(m_mimironActivateTramGUID)) + activateTramButton->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE); + if (GameObject* callTramCenterButton = instance->GetGameObject(m_mimironCallTramCenterGUID)) + callTramCenterButton->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE); + }); + } } break; case DATA_BRANN_MEMOTESAY: diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp index e8b6042d8..c9717cd34 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp @@ -545,33 +545,6 @@ public: } }; -class go_call_tram : public GameObjectScript -{ -public: - go_call_tram() : GameObjectScript("go_call_tram") { } - - bool OnGossipHello(Player* /*player*/, GameObject* go) override - { - InstanceScript* pInstance = go->GetInstanceScript(); - - if (!pInstance) - return false; - - switch(go->GetEntry()) - { - case 194914: - case 194438: - pInstance->SetData(DATA_CALL_TRAM, 0); - break; - case 194912: - case 194437: - pInstance->SetData(DATA_CALL_TRAM, 1); - break; - } - return true; - } -}; - struct npc_salvaged_siege_engine : public VehicleAI { npc_salvaged_siege_engine(Creature* creature) : VehicleAI(creature) { } @@ -609,7 +582,5 @@ void AddSC_ulduar() new npc_ulduar_arachnopod_destroyer(); new spell_ulduar_arachnopod_damaged(); new AreaTrigger_at_celestial_planetarium_enterance(); - new go_call_tram(); - RegisterCreatureAI(npc_salvaged_siege_engine); } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h index 20e23957b..1735aeb39 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h @@ -215,7 +215,15 @@ enum UlduarGameObjects GO_KOLOGARN_DOORS = 194553, GO_KEEPERS_GATE = 194255, GO_XT002_DOORS = 194631, + + // Tram GO_MIMIRON_TRAM = 194675, + GO_MIMIRON_ACTIVATE_TRAM = 194437, + GO_MIMIRON_CALL_TRAM_CENTER = 194914, + GO_MIMIRON_CALL_TRAM_MIMIRON = 194912, + GO_MIMIRON_TRAM_ROCKET_BOOSTER = 194904, + GO_DOODAD_UL_TRAIN_TURNAROUND01 = 194915, // center + GO_DOODAD_UL_TRAIN_TURNAROUND02 = 194913, // mimiron // Mimiron, Hodir, Vezax GO_MIMIRON_ELEVATOR = 194749, From 46aed4dec7687a24cef8caebc8362507fa8a2638 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 May 2024 06:44:38 +0000 Subject: [PATCH 18/39] chore(DB): import pending files Referenced commit(s): 733fbf89e130fbad9fdd933e8c3d8b5e171f5cf0 --- .../rev_1715708681053405822.sql => db_world/2024_05_28_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1715708681053405822.sql => db_world/2024_05_28_00.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1715708681053405822.sql b/data/sql/updates/db_world/2024_05_28_00.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1715708681053405822.sql rename to data/sql/updates/db_world/2024_05_28_00.sql index a04e01a28..2d0e8b2e4 100644 --- a/data/sql/updates/pending_db_world/rev_1715708681053405822.sql +++ b/data/sql/updates/db_world/2024_05_28_00.sql @@ -1,3 +1,4 @@ +-- DB update 2024_05_27_02 -> 2024_05_28_00 -- -- Rocket Booster UPDATE `gameobject` SET `position_x`=2307.000003, `position_y`=265.6011, `position_z`=424.287993 WHERE (`id` = 194904) AND (`guid` IN (35524)); From 7692b709acb3b0813bf9a66b74a8a31e45e7b9c8 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 28 May 2024 14:55:28 -0300 Subject: [PATCH 19/39] fix(Scripts/Hyjal): Azgalor doom shouldnt target tank MKII (#18964) --- .../Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp index 95cdfdffb..a066ac8f7 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp @@ -70,7 +70,7 @@ public: context.Repeat(18s, 20s); }).Schedule(45s, 55s, [this](TaskContext context) { - DoCastRandomTarget(SPELL_DOOM, 0, 100.f, true, false, false); + DoCastRandomTarget(SPELL_DOOM, 1, 100.f, true, false, false); Talk(SAY_DOOM); context.Repeat(); }).Schedule(10min, [this](TaskContext context) From 9b363594e7fdb1eb296e7fb46fb43909f476a52f Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 28 May 2024 19:39:05 -0300 Subject: [PATCH 20/39] fix(Scripts/Hyjal): Fix Doom spawning Doomguards twice on expire (#18968) --- .../Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp index a066ac8f7..bf62aabb8 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp @@ -126,7 +126,7 @@ class spell_azgalor_doom : public AuraScript void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { Unit* target = GetTarget(); - if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_DEATH) + if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_DEATH && !IsExpired()) { target->CastSpell(target, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, true); } From 2c246e49d036fddcb0619a1ebe78f495ff134a47 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 28 May 2024 19:39:21 -0300 Subject: [PATCH 21/39] fix(Scripts/Hyjal): Anetheron dont cast sleep on tank (#18969) --- .../CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp index 02da28a40..b6263024a 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp @@ -66,7 +66,7 @@ public: }).Schedule(25s, 32s, [this](TaskContext context) { Talk(SAY_SLEEP); - DoCastRandomTarget(SPELL_SLEEP, 0, 0.0f, true, false, false); + DoCastRandomTarget(SPELL_SLEEP, 1, 0.0f, true, false, false); context.Repeat(35s, 48s); }).Schedule(30s, 48s, [this](TaskContext context) { From fe6137b0a07b754d24070911da4d3905cc48c366 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Wed, 29 May 2024 08:04:13 +0200 Subject: [PATCH 22/39] fix(Scripts/Hyjal): tweak movement of Doomfire (#18970) initial --- .../pending_db_world/doomfire_scripting.sql | 3 ++ .../BattleForMountHyjal/boss_archimonde.cpp | 46 ++++++++++++++++--- 2 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 data/sql/updates/pending_db_world/doomfire_scripting.sql diff --git a/data/sql/updates/pending_db_world/doomfire_scripting.sql b/data/sql/updates/pending_db_world/doomfire_scripting.sql new file mode 100644 index 000000000..d13094d7b --- /dev/null +++ b/data/sql/updates/pending_db_world/doomfire_scripting.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid` = 18104 AND `source_type` = 0; +UPDATE `creature_template` SET `speed_run` = 3, `AIName` = '', `ScriptName` = 'npc_doomfire_spirit' WHERE `entry` = 18104; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index 36b6a393f..0198e43d4 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -99,6 +99,7 @@ Position const nordrassilPosition = { 5503.713f, -3523.436f, 1608.781f, 0.0f }; float const DOOMFIRE_OFFSET = 15.0f; uint8 const WISP_OFFSET = 40; +uint8 NEAR_POINT = 0; struct npc_ancient_wisp : public ScriptedAI { @@ -148,6 +149,39 @@ private: InstanceScript* _instance; }; +struct npc_doomfire_spirit : public ScriptedAI +{ + npc_doomfire_spirit(Creature* creature) : ScriptedAI(creature) + { + _instance = creature->GetInstanceScript(); + } + + void Reset() override + { + scheduler.CancelAll(); + ScheduleTimedEvent(0s, [&]{ + if (Creature* archimonde = _instance->GetCreature(DATA_ARCHIMONDE)) + { + Position randomNearPosition = archimonde->GetRandomNearPosition(100.0f); + me->GetMotionMaster()->MovePoint(NEAR_POINT, randomNearPosition); + } + }, 2s); + } + + void UpdateAI(uint32 diff) override + { + scheduler.Update(diff); + + if (!UpdateVictim()) + return; + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + } +private: + InstanceScript* _instance; +}; + struct boss_archimonde : public BossAI { boss_archimonde(Creature* creature) : BossAI(creature, DATA_ARCHIMONDE) @@ -262,10 +296,7 @@ struct boss_archimonde : public BossAI }, 25s, 40s); ScheduleTimedEvent(25s, 35s, [&] { - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false)) - { - DoCastDoomFire(target); - } + DoCastDoomFire(); }, 20s); ScheduleTimedEvent(25s, 35s, [&] { @@ -391,12 +422,12 @@ struct boss_archimonde : public BossAI } } - void DoCastDoomFire(Unit* target) + void DoCastDoomFire() { // hack because spell doesn't work? Talk(SAY_DOOMFIRE); - Position spiritPosition = { target->GetPositionX() + DOOMFIRE_OFFSET, target->GetPositionY() + DOOMFIRE_OFFSET, target->GetPositionZ(), 0.0f }; - Position doomfirePosition = { target->GetPositionX() - DOOMFIRE_OFFSET, target->GetPositionY() - DOOMFIRE_OFFSET, target->GetPositionZ(), 0.0f }; + Position spiritPosition = { me->GetPositionX() + DOOMFIRE_OFFSET, me->GetPositionY() + DOOMFIRE_OFFSET, me->GetPositionZ(), 0.0f }; + Position doomfirePosition = { me->GetPositionX() - DOOMFIRE_OFFSET, me->GetPositionY() - DOOMFIRE_OFFSET, me->GetPositionZ(), 0.0f }; if (Creature* doomfireSpirit = me->SummonCreature(CREATURE_DOOMFIRE_SPIRIT, spiritPosition, TEMPSUMMON_TIMED_DESPAWN, 27000)) { if (Creature* doomfire = me->SummonCreature(CREATURE_DOOMFIRE, doomfirePosition, TEMPSUMMON_TIMED_DESPAWN, 27000)) @@ -508,5 +539,6 @@ void AddSC_boss_archimonde() RegisterSpellScript(spell_finger_of_death); RegisterHyjalAI(boss_archimonde); RegisterHyjalAI(npc_ancient_wisp); + RegisterHyjalAI(npc_doomfire_spirit); } From c027f7a0c297fb90c007702c21ce2408b837bd2d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 May 2024 06:05:05 +0000 Subject: [PATCH 23/39] chore(DB): import pending files Referenced commit(s): fe6137b0a07b754d24070911da4d3905cc48c366 --- .../doomfire_scripting.sql => db_world/2024_05_29_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/doomfire_scripting.sql => db_world/2024_05_29_00.sql} (82%) diff --git a/data/sql/updates/pending_db_world/doomfire_scripting.sql b/data/sql/updates/db_world/2024_05_29_00.sql similarity index 82% rename from data/sql/updates/pending_db_world/doomfire_scripting.sql rename to data/sql/updates/db_world/2024_05_29_00.sql index d13094d7b..5b2dbda9e 100644 --- a/data/sql/updates/pending_db_world/doomfire_scripting.sql +++ b/data/sql/updates/db_world/2024_05_29_00.sql @@ -1,3 +1,4 @@ +-- DB update 2024_05_28_00 -> 2024_05_29_00 -- DELETE FROM `smart_scripts` WHERE `entryorguid` = 18104 AND `source_type` = 0; UPDATE `creature_template` SET `speed_run` = 3, `AIName` = '', `ScriptName` = 'npc_doomfire_spirit' WHERE `entry` = 18104; From 4884e33f078de8d5d19db4e7fc4b36a299e2c944 Mon Sep 17 00:00:00 2001 From: Emmanuel Ferdman Date: Wed, 29 May 2024 21:10:39 +0300 Subject: [PATCH 24/39] fix(LICENSE): update license file paths (#18972) Signed-off-by: Emmanuel Ferdman --- AUTHORS | 2 +- conf/dist/config.cmake | 2 +- deps/recastnavigation/Detour/CMakeLists.txt | 2 +- deps/recastnavigation/Recast/CMakeLists.txt | 2 +- doc/changelog/master.md | 2 +- src/common/Utilities/CircularBuffer.h | 2 +- src/common/Utilities/DataMap.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/AUTHORS b/AUTHORS index ebf2b5f8a..8cf220b41 100644 --- a/AUTHORS +++ b/AUTHORS @@ -3,7 +3,7 @@ ## Warning The code of AzerothCore is shipped as it is without any form of warranty, and - except for third party libraries licensed under the AGPL 3, -which you can read from the file "LICENSE-AGPL3". +which you can read from the file "LICENSE". ## Point of current development The project is currently hosted at https://www.azerothcore.org/ and developed under https://github.com/azerothcore diff --git a/conf/dist/config.cmake b/conf/dist/config.cmake index 381cce46b..ab370f458 100644 --- a/conf/dist/config.cmake +++ b/conf/dist/config.cmake @@ -1,5 +1,5 @@ # -# Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 +# Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE # Copyright (C) 2021+ WarheadCore # # This file is free software; as a special exception the author gives diff --git a/deps/recastnavigation/Detour/CMakeLists.txt b/deps/recastnavigation/Detour/CMakeLists.txt index c04ee437e..e658bef15 100644 --- a/deps/recastnavigation/Detour/CMakeLists.txt +++ b/deps/recastnavigation/Detour/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright (C) 2008-2016 TrinityCore -# Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 +# Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/deps/recastnavigation/Recast/CMakeLists.txt b/deps/recastnavigation/Recast/CMakeLists.txt index 0058d81e0..ab1641bad 100644 --- a/deps/recastnavigation/Recast/CMakeLists.txt +++ b/deps/recastnavigation/Recast/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright (C) 2008-2016 TrinityCore -# Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 +# Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/doc/changelog/master.md b/doc/changelog/master.md index b64820713..3cd001b8d 100644 --- a/doc/changelog/master.md +++ b/doc/changelog/master.md @@ -414,7 +414,7 @@ minimal-dynamic - builds commands and spells dynamically. Now don't support - Example loader script for modules: ```cpp /* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 + * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE */ // From SC diff --git a/src/common/Utilities/CircularBuffer.h b/src/common/Utilities/CircularBuffer.h index 17172b404..898ab1a11 100644 --- a/src/common/Utilities/CircularBuffer.h +++ b/src/common/Utilities/CircularBuffer.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 + * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE * * This file was based on * https://embeddedartistry.com/blog/2017/05/17/creating-a-circular-buffer-in-c-and-c/ diff --git a/src/common/Utilities/DataMap.h b/src/common/Utilities/DataMap.h index 2deb99904..170539a67 100644 --- a/src/common/Utilities/DataMap.h +++ b/src/common/Utilities/DataMap.h @@ -1,5 +1,5 @@ /* - * Originally written by Rochet2 - Copyright (C) 2018+ AzerothCore , released under GNU AGPL v3 license: http://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 + * Originally written by Rochet2 - Copyright (C) 2018+ AzerothCore , released under GNU AGPL v3 license: http://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE */ #ifndef _DATA_MAP_H_ From 0793a979bb2c39baef29926ad98a16e152f062f1 Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Wed, 29 May 2024 20:17:25 +0200 Subject: [PATCH 25/39] fix(Unit/ProcessTerrainStatusUpdate): prevent removal swimming auras if swimming (#18902) * do not remove swimming auras if we are swimming * refactor to isSwimming() * Update src/server/game/Entities/Unit/Unit.cpp Co-authored-by: Andrew <47818697+Nyeriah@users.noreply.github.com> --------- Co-authored-by: Andrew <47818697+Nyeriah@users.noreply.github.com> --- src/server/game/Entities/Unit/Unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 9cc2e85e3..0e679cfcc 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -4223,7 +4223,7 @@ void Unit::ProcessTerrainStatusUpdate() // remove appropriate auras if we are swimming/not swimming respectively if (liquidData.Status & MAP_LIQUID_STATUS_SWIMMING) RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_NOT_ABOVEWATER); - else + else if (!isSwimming()) RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_NOT_UNDERWATER); // liquid aura handling From 9d672f8b627e7a143eac7ce5f84faa7d8fefbad0 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Wed, 29 May 2024 23:57:34 +0200 Subject: [PATCH 26/39] fix(Scripts/Hyjal): remove summoned mobs on boss evade and reset waves (#18975) init --- .../BattleForMountHyjal/boss_anetheron.cpp | 21 +++++++++++++++++++ .../BattleForMountHyjal/boss_azgalor.cpp | 21 +++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp index b6263024a..8cd23296a 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp @@ -32,6 +32,11 @@ enum Spells SPELL_INFERNAL_IMMOLATION = 31304 }; +enum Misc +{ + NPC_TOWERING_INFERNAL = 17818 +}; + enum Texts { SAY_ONDEATH = 0, @@ -54,6 +59,22 @@ public: }); } + void EnterEvadeMode(EvadeReason why) override + { + std::list infernalList; + me->GetCreatureListWithEntryInGrid(infernalList, NPC_TOWERING_INFERNAL, 100.0f); + if (infernalList.size() > 0) + { + for (Creature* infernal : infernalList) + { + infernal->DespawnOrUnsummon(); + } + } + infernalList.clear(); + instance->SetData(DATA_RESET_ALLIANCE, 0); + me->DespawnOrUnsummon(); + } + void JustEngagedWith(Unit * who) override { BossAI::JustEngagedWith(who); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp index bf62aabb8..f71903261 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp @@ -30,6 +30,11 @@ enum Spells SPELL_BERSERK = 26662 }; +enum Misc +{ + NPC_LESSER_DOOMGUARD = 17864 +}; + enum Texts { SAY_ONDEATH = 0, @@ -52,6 +57,22 @@ public: }); } + void EnterEvadeMode(EvadeReason why) override + { + std::list doomguardList; + me->GetCreatureListWithEntryInGrid(doomguardList, NPC_LESSER_DOOMGUARD, 100.0f); + if (doomguardList.size() > 0) + { + for (Creature* doomguard : doomguardList) + { + doomguard->DespawnOrUnsummon(); + } + } + doomguardList.clear(); + instance->SetData(DATA_RESET_HORDE, 0); + me->DespawnOrUnsummon(); + } + void JustEngagedWith(Unit * who) override { BossAI::JustEngagedWith(who); From 0f5992045ccd8e7c9fc320cd21f2cd4184552de4 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Wed, 29 May 2024 23:57:56 +0200 Subject: [PATCH 27/39] fix(Scripts/Hyjal): increase ranges on doomfire to make movement less inclined to stick close to the boss (#18976) initial --- .../BattleForMountHyjal/boss_archimonde.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index 0198e43d4..27da08ef9 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -97,7 +97,7 @@ uint32 const availableChargeAurasAndSpells[3][2] = { Position const nordrassilPosition = { 5503.713f, -3523.436f, 1608.781f, 0.0f }; -float const DOOMFIRE_OFFSET = 15.0f; +float const DOOMFIRE_OFFSET = 25.0f; uint8 const WISP_OFFSET = 40; uint8 NEAR_POINT = 0; @@ -162,10 +162,10 @@ struct npc_doomfire_spirit : public ScriptedAI ScheduleTimedEvent(0s, [&]{ if (Creature* archimonde = _instance->GetCreature(DATA_ARCHIMONDE)) { - Position randomNearPosition = archimonde->GetRandomNearPosition(100.0f); + Position randomNearPosition = archimonde->GetRandomNearPosition(200.0f); me->GetMotionMaster()->MovePoint(NEAR_POINT, randomNearPosition); } - }, 2s); + }, 6s); } void UpdateAI(uint32 diff) override @@ -426,8 +426,8 @@ struct boss_archimonde : public BossAI { // hack because spell doesn't work? Talk(SAY_DOOMFIRE); - Position spiritPosition = { me->GetPositionX() + DOOMFIRE_OFFSET, me->GetPositionY() + DOOMFIRE_OFFSET, me->GetPositionZ(), 0.0f }; - Position doomfirePosition = { me->GetPositionX() - DOOMFIRE_OFFSET, me->GetPositionY() - DOOMFIRE_OFFSET, me->GetPositionZ(), 0.0f }; + Position spiritPosition = me->GetRandomNearPosition(DOOMFIRE_OFFSET); + Position doomfirePosition = me->GetRandomNearPosition(DOOMFIRE_OFFSET); if (Creature* doomfireSpirit = me->SummonCreature(CREATURE_DOOMFIRE_SPIRIT, spiritPosition, TEMPSUMMON_TIMED_DESPAWN, 27000)) { if (Creature* doomfire = me->SummonCreature(CREATURE_DOOMFIRE, doomfirePosition, TEMPSUMMON_TIMED_DESPAWN, 27000)) From 94991004dca5af4f05d1a4c58503226e18b6ac3a Mon Sep 17 00:00:00 2001 From: sudlud Date: Sat, 1 Jun 2024 11:00:49 +0200 Subject: [PATCH 28/39] fix(CI): fix ubuntu-24.04 build (#18984) fix(CI): try to fix ubuntu-24.04 build --- .github/actions/linux-build/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/linux-build/action.yml b/.github/actions/linux-build/action.yml index 4109f918c..d06f88551 100644 --- a/.github/actions/linux-build/action.yml +++ b/.github/actions/linux-build/action.yml @@ -47,6 +47,7 @@ runs: shell: bash run: | sudo apt update + sudo apt remove needrestart #refer: https://github.com/actions/runner-images/issues/9937 sudo apt-get -y install ccache clang cmake curl google-perftools \ libmysqlclient-dev make unzip build-essential cmake-data \ libboost-all-dev libbz2-dev libncurses5-dev libmysql++-dev \ From 8e9e134924efc5da5f50d3dd197f613cabadaa33 Mon Sep 17 00:00:00 2001 From: sudlud Date: Sat, 1 Jun 2024 12:25:53 +0200 Subject: [PATCH 29/39] fix(Scripts/Hyjal): fix some build warnings for unused parameters (#18986) --- .../CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp | 2 +- .../Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp index 8cd23296a..7abe536b1 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp @@ -59,7 +59,7 @@ public: }); } - void EnterEvadeMode(EvadeReason why) override + void EnterEvadeMode(EvadeReason /*why*/) override { std::list infernalList; me->GetCreatureListWithEntryInGrid(infernalList, NPC_TOWERING_INFERNAL, 100.0f); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp index f71903261..86185647d 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp @@ -57,7 +57,7 @@ public: }); } - void EnterEvadeMode(EvadeReason why) override + void EnterEvadeMode(EvadeReason /*why*/) override { std::list doomguardList; me->GetCreatureListWithEntryInGrid(doomguardList, NPC_LESSER_DOOMGUARD, 100.0f); From 6f1d3aab153d8f9c86e3d5b6f5d535c45cf4b822 Mon Sep 17 00:00:00 2001 From: sudlud Date: Sat, 1 Jun 2024 21:43:06 +0200 Subject: [PATCH 30/39] fix(CI): bump pr-labeler dependencies for usage of Node.js 20 (#18983) this workflow currently has the warning: ``` Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/labeler@v4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/. ``` --- .github/workflows/pr_labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_labeler.yml b/.github/workflows/pr_labeler.yml index 4e231bb0b..28ee6bd3d 100644 --- a/.github/workflows/pr_labeler.yml +++ b/.github/workflows/pr_labeler.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v4 with: persist-credentials: true - - uses: actions/labeler@v4 + - uses: actions/labeler@v5 with: repo-token: ${{ secrets.GITHUB_TOKEN }} configuration-path: .github/labeler.yml From 1d664870d2a04bcbe69e4c82233fdc1c8bace544 Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Sat, 1 Jun 2024 15:50:56 -0400 Subject: [PATCH 31/39] fix(DB/Creature): Couple Netherwing related fixes. (#18981) * Init. * Update. --- .../updates/pending_db_world/netherwing-misc.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 data/sql/updates/pending_db_world/netherwing-misc.sql diff --git a/data/sql/updates/pending_db_world/netherwing-misc.sql b/data/sql/updates/pending_db_world/netherwing-misc.sql new file mode 100644 index 000000000..40f708ef7 --- /dev/null +++ b/data/sql/updates/pending_db_world/netherwing-misc.sql @@ -0,0 +1,15 @@ +UPDATE `gameobject_loot_template` SET `MaxCount` = 6 WHERE `Entry` = 22070 AND `Item` IN (22573, 22574); -- Mote of Fire/Earth +UPDATE `gameobject_loot_template` SET `MaxCount` = 4 WHERE `Entry` = 22070 AND `Item` = 32464; -- Nethercite Ore +UPDATE `item_loot_template` SET `Chance` = 60, `MaxCount` = 3 WHERE `Entry` = 32724 AND `Item` = 32728; -- Sludge +UPDATE `item_loot_template` SET `Chance` = 10 WHERE `Entry` = 32724 AND `Item` = 32727; -- Vial of Tears +UPDATE `item_loot_template` SET `Chance` = 2 WHERE `Entry` = 32724 AND `Item` = 32726; -- Murkblood Escape Plans +UPDATE `item_loot_template` SET `Chance` = 5 WHERE `Entry` = 32724 AND `Item` IN (32464, 32468, 32470); -- Ore, Pollen, Hide +UPDATE `creature_loot_template` SET `Chance` = 50 WHERE `Item` = 32427; -- Netherwing Crystal +UPDATE `creature_loot_template` SET `Chance` = 100 WHERE `Item` = 32502; -- Fel Gland +UPDATE `creature_loot_template` SET `Chance` = 1 WHERE `Item` = 32506; -- Netherwing Egg + +INSERT INTO `gameobject_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(22070, 32506, 0, 1, 0, 1, 0, 1, 1, 'Nethercite Deposit - Netherwing Egg'); +INSERT INTO `item_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(32724, 32506, 0, 1, 0, 1, 0, 1, 1, 'Sludge-covered Object - Netherwing Egg'), +(32724, 32725, 0, 10, 0, 1, 0, 1, 1, 'Sludge-covered Object - Murkblood Miner''s Pick'); From 35de41b45f425759efdeb97af1731490882109f1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 1 Jun 2024 19:51:52 +0000 Subject: [PATCH 32/39] chore(DB): import pending files Referenced commit(s): 1d664870d2a04bcbe69e4c82233fdc1c8bace544 --- .../netherwing-misc.sql => db_world/2024_06_01_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/netherwing-misc.sql => db_world/2024_06_01_00.sql} (97%) diff --git a/data/sql/updates/pending_db_world/netherwing-misc.sql b/data/sql/updates/db_world/2024_06_01_00.sql similarity index 97% rename from data/sql/updates/pending_db_world/netherwing-misc.sql rename to data/sql/updates/db_world/2024_06_01_00.sql index 40f708ef7..7e0b7adae 100644 --- a/data/sql/updates/pending_db_world/netherwing-misc.sql +++ b/data/sql/updates/db_world/2024_06_01_00.sql @@ -1,3 +1,4 @@ +-- DB update 2024_05_29_00 -> 2024_06_01_00 UPDATE `gameobject_loot_template` SET `MaxCount` = 6 WHERE `Entry` = 22070 AND `Item` IN (22573, 22574); -- Mote of Fire/Earth UPDATE `gameobject_loot_template` SET `MaxCount` = 4 WHERE `Entry` = 22070 AND `Item` = 32464; -- Nethercite Ore UPDATE `item_loot_template` SET `Chance` = 60, `MaxCount` = 3 WHERE `Entry` = 32724 AND `Item` = 32728; -- Sludge From dbb7107d7cad7c70645da6f73f97f286d39da556 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 2 Jun 2024 06:29:11 +0200 Subject: [PATCH 33/39] fix(CI): fix labeler (#18990) * fix(CI): I think this fixes the labeler :D * Update labeler.yml * Update pr_labeler.yml * Update labeler.yml * test complete - this should work after merge * Update labeler.yml --- .github/labeler.yml | 53 ++++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index d5987dac0..c41c0b22b 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,37 +1,54 @@ file-cpp: - - src/**/*.cpp - - src/**/*.h - - deps/**/*.cpp - - deps/**/*.h +- changed-files: + - any-glob-to-any-file: + - src/**/*.cpp + - src/**/*.h + - deps/**/*.cpp + - deps/**/*.h DB: - - data/**/*.sql +- changed-files: + - any-glob-to-any-file: data/**/*.sql CORE: - - any: ['src/**/*', '!src/server/scripts/*', '!src/tests/*'] +- all: + - changed-files: + - any-glob-to-any-file: 'src/**/*' + - all-globs-to-all-files: + - '!src/server/scripts/*' + - '!src/tests/*' Script: - - src/server/scripts/**/*.cpp - - src/server/scripts/**/*.h +- changed-files: + - any-glob-to-any-file: + - src/server/scripts/**/*.cpp + - src/server/scripts/**/*.h UnitTests: - - src/test/**/* +- changed-files: + - any-glob-to-any-file: src/test/**/* Documentation: - - ./*.md +- changed-files: + - any-glob-to-any-file: ./*.md Bash: - - ./*.sh - - apps/**/*.sh - - conf/**/*.sh - - deps/**/*.sh - - modules/**/*.sh +- changed-files: + - any-glob-to-any-file: + - ./*.sh + - apps/**/*.sh + - conf/**/*.sh + - deps/**/*.sh + - modules/**/*.sh CMake: - - ./*.cmake +- changed-files: + - any-glob-to-any-file: ./*.cmake Workflow: - - .github/workflows/* +- changed-files: + - any-glob-to-any-file: .github/workflows/* Batch: - - apps/**/*.bat +- changed-files: + - any-glob-to-any-file: apps/**/*.bat From 1663045da6651c83785a694303a1cf4bf0dc6ee0 Mon Sep 17 00:00:00 2001 From: sudlud Date: Sun, 2 Jun 2024 14:29:54 +0200 Subject: [PATCH 34/39] =?UTF-8?q?fix(Core/Mail):=20calculate=20unReadMails?= =?UTF-8?q?=20and=20m=5FnextMailDelivereTime=20usin=E2=80=A6=20(#18996)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Core/Mail): calculate unReadMails and m_nextMailDelivereTime using mail cache - these values were grepped directly from DB before -> this change was introduced with azerothcore/azerothcore-wotlk#3420 - the whole mailing system relies on the mails beeing cached in the core -> these get stored in DB regularly or on specific events - so apparently the DB is not always in sync with the current mail cache state of the core -> so grepping data directly from DB is not a good idea at this point * Update PlayerUpdates.cpp --- .../game/Entities/Player/PlayerUpdates.cpp | 42 +++++++++---------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/src/server/game/Entities/Player/PlayerUpdates.cpp b/src/server/game/Entities/Player/PlayerUpdates.cpp index 7bcb5e567..4c1b5bb4a 100644 --- a/src/server/game/Entities/Player/PlayerUpdates.cpp +++ b/src/server/game/Entities/Player/PlayerUpdates.cpp @@ -435,31 +435,27 @@ void Player::UpdateNextMailTimeAndUnreads() { // Update the next delivery time and unread mails time_t cTime = GameTime::GetGameTime().count(); - // Get the next delivery time - CharacterDatabasePreparedStatement* stmtNextDeliveryTime = - CharacterDatabase.GetPreparedStatement(CHAR_SEL_NEXT_MAIL_DELIVERYTIME); - stmtNextDeliveryTime->SetData(0, GetGUID().GetCounter()); - stmtNextDeliveryTime->SetData(1, uint32(cTime)); - PreparedQueryResult resultNextDeliveryTime = - CharacterDatabase.Query(stmtNextDeliveryTime); - if (resultNextDeliveryTime) - { - Field* fields = resultNextDeliveryTime->Fetch(); - m_nextMailDelivereTime = time_t(fields[0].Get()); - } - // Get unread mails count - CharacterDatabasePreparedStatement* stmtUnreadAmount = - CharacterDatabase.GetPreparedStatement( - CHAR_SEL_CHARACTER_MAILCOUNT_UNREAD_SYNCH); - stmtUnreadAmount->SetData(0, GetGUID().GetCounter()); - stmtUnreadAmount->SetData(1, uint32(cTime)); - PreparedQueryResult resultUnreadAmount = - CharacterDatabase.Query(stmtUnreadAmount); - if (resultUnreadAmount) + m_nextMailDelivereTime = 0; + unReadMails = 0; + + for (Mail const* mail : GetMails()) { - Field* fields = resultUnreadAmount->Fetch(); - unReadMails = uint8(fields[0].Get()); + if (mail->deliver_time > cTime) + { + if (!m_nextMailDelivereTime || m_nextMailDelivereTime > mail->deliver_time) + m_nextMailDelivereTime = mail->deliver_time; + } + + // must be not checked yet + if (mail->checked & MAIL_CHECK_MASK_READ) + continue; + + // and already delivered or expired + if (cTime < mail->deliver_time || cTime > mail->expire_time) + continue; + + unReadMails++; } } From a0b942332b1ababd8ffdcdb26a1188d64a049b67 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Sun, 2 Jun 2024 17:07:34 +0200 Subject: [PATCH 35/39] fix(DB/achievement_reward): award title on Hand of A'dal FoS (#18998) * init * oops --- data/sql/updates/pending_db_world/hand_of_adal.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/hand_of_adal.sql diff --git a/data/sql/updates/pending_db_world/hand_of_adal.sql b/data/sql/updates/pending_db_world/hand_of_adal.sql new file mode 100644 index 000000000..39f4b2ce1 --- /dev/null +++ b/data/sql/updates/pending_db_world/hand_of_adal.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `achievement_reward` WHERE `ID` = 431; +INSERT INTO `achievement_reward` (`ID`, `TitleA`, `TitleH`, `ItemID`, `Sender`, `Subject`, `Body`, `MailTemplateID`) VALUES +(431, 64, 64, 0, 0, null, null, 0); From ba8a152479b80d3f1b074e964fa45256debab3ed Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Sun, 2 Jun 2024 17:07:42 +0200 Subject: [PATCH 36/39] fix(Scripts/Hyjal): correctly despawn summoned creatures on Jaina/Thrall death (#18997) * init * change logic despawning of bosses is not really done the normal way, but it's forced with a set amount of guids. So we simply need to register the summons as guids as well * small fixes * Delete creature_scripts.sql * Update boss_azgalor.cpp --- .../BattleForMountHyjal/boss_anetheron.cpp | 22 ----------------- .../BattleForMountHyjal/boss_azgalor.cpp | 22 ----------------- .../CavernsOfTime/BattleForMountHyjal/hyjal.h | 6 ++++- .../BattleForMountHyjal/instance_hyjal.cpp | 24 +++++++++++++++++++ 4 files changed, 29 insertions(+), 45 deletions(-) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp index 7abe536b1..ef67ccd39 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp @@ -32,11 +32,6 @@ enum Spells SPELL_INFERNAL_IMMOLATION = 31304 }; -enum Misc -{ - NPC_TOWERING_INFERNAL = 17818 -}; - enum Texts { SAY_ONDEATH = 0, @@ -59,22 +54,6 @@ public: }); } - void EnterEvadeMode(EvadeReason /*why*/) override - { - std::list infernalList; - me->GetCreatureListWithEntryInGrid(infernalList, NPC_TOWERING_INFERNAL, 100.0f); - if (infernalList.size() > 0) - { - for (Creature* infernal : infernalList) - { - infernal->DespawnOrUnsummon(); - } - } - infernalList.clear(); - instance->SetData(DATA_RESET_ALLIANCE, 0); - me->DespawnOrUnsummon(); - } - void JustEngagedWith(Unit * who) override { BossAI::JustEngagedWith(who); @@ -157,7 +136,6 @@ public: private: bool _recentlySpoken; - }; class spell_anetheron_sleep : public SpellScript diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp index 86185647d..4bf335c9d 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp @@ -30,11 +30,6 @@ enum Spells SPELL_BERSERK = 26662 }; -enum Misc -{ - NPC_LESSER_DOOMGUARD = 17864 -}; - enum Texts { SAY_ONDEATH = 0, @@ -57,22 +52,6 @@ public: }); } - void EnterEvadeMode(EvadeReason /*why*/) override - { - std::list doomguardList; - me->GetCreatureListWithEntryInGrid(doomguardList, NPC_LESSER_DOOMGUARD, 100.0f); - if (doomguardList.size() > 0) - { - for (Creature* doomguard : doomguardList) - { - doomguard->DespawnOrUnsummon(); - } - } - doomguardList.clear(); - instance->SetData(DATA_RESET_HORDE, 0); - me->DespawnOrUnsummon(); - } - void JustEngagedWith(Unit * who) override { BossAI::JustEngagedWith(who); @@ -137,7 +116,6 @@ public: private: bool _recentlySpoken; - }; class spell_azgalor_doom : public AuraScript diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h index 7825555cb..4f2493e7c 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h @@ -120,7 +120,11 @@ enum HyjalCreaturesIds NPC_KAZROGAL = 17888, NPC_AZGALOR = 17842, NPC_ARCHIMONDE = 17968, - NPC_WORLD_TRIGGER_TINY = 21987 + NPC_WORLD_TRIGGER_TINY = 21987, + + // Boss summons + NPC_TOWERING_INFERNAL = 17818, + NPC_LESSER_DOOMGUARD = 17864 }; enum HyjalGameobjectIds diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp index 675dc3050..289d064c8 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp @@ -102,6 +102,7 @@ public: trash = 0; _currentWave = 0; _encounterNPCs.clear(); + _summonedNPCs.clear(); _baseAlliance.clear(); _baseHorde.clear(); _infernalTargets.clear(); @@ -200,6 +201,13 @@ public: _encounterNPCs.insert(creature->GetGUID()); // Used for despawning on wipe } break; + case NPC_TOWERING_INFERNAL: + case NPC_LESSER_DOOMGUARD: + if (creature->IsSummon()) + { + _summonedNPCs.insert(creature->GetGUID()); + } + break; } InstanceScript::OnCreatureCreate(creature); } @@ -233,6 +241,10 @@ public: } } break; + case NPC_TOWERING_INFERNAL: + case NPC_LESSER_DOOMGUARD: + _summonedNPCs.erase(unit->ToCreature()->GetGUID()); + break; case NPC_WINTERCHILL: case NPC_ANETHERON: case NPC_KAZROGAL: @@ -402,6 +414,11 @@ public: if (Creature* creature = instance->GetCreature(guid)) creature->DespawnOrUnsummon(); + // also force despawn boss summons + for (ObjectGuid const& guid : _summonedNPCs) + if (Creature* creature = instance->GetCreature(guid)) + creature->DespawnOrUnsummon(); + _scheduler.Schedule(300s, [this](TaskContext) { for (ObjectGuid const& guid : _baseAlliance) @@ -420,6 +437,11 @@ public: if (Creature* creature = instance->GetCreature(guid)) creature->DespawnOrUnsummon(); + // also force despawn boss summons + for (ObjectGuid const& guid : _summonedNPCs) + if (Creature* creature = instance->GetCreature(guid)) + creature->DespawnOrUnsummon(); + _scheduler.Schedule(300s, [this](TaskContext) { for (ObjectGuid const& guid : _baseHorde) @@ -455,6 +477,7 @@ public: case DATA_RESET_WAVES: _scheduler.CancelGroup(CONTEXT_GROUP_WAVES); _encounterNPCs.clear(); + _summonedNPCs.clear(); _currentWave = 0; trash = 0; _bossWave = 0; @@ -546,6 +569,7 @@ public: uint8 _retreat; TaskScheduler _scheduler; GuidSet _encounterNPCs; + GuidSet _summonedNPCs; GuidSet _baseAlliance; GuidSet _baseHorde; GuidVector _infernalTargets; From 708e2681b6845c5cd3486ca40d8911d5f2ec7a7e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Jun 2024 15:08:23 +0000 Subject: [PATCH 37/39] chore(DB): import pending files Referenced commit(s): a0b942332b1ababd8ffdcdb26a1188d64a049b67 --- .../hand_of_adal.sql => db_world/2024_06_02_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/hand_of_adal.sql => db_world/2024_06_02_00.sql} (82%) diff --git a/data/sql/updates/pending_db_world/hand_of_adal.sql b/data/sql/updates/db_world/2024_06_02_00.sql similarity index 82% rename from data/sql/updates/pending_db_world/hand_of_adal.sql rename to data/sql/updates/db_world/2024_06_02_00.sql index 39f4b2ce1..cfcd02f1b 100644 --- a/data/sql/updates/pending_db_world/hand_of_adal.sql +++ b/data/sql/updates/db_world/2024_06_02_00.sql @@ -1,3 +1,4 @@ +-- DB update 2024_06_01_00 -> 2024_06_02_00 -- DELETE FROM `achievement_reward` WHERE `ID` = 431; INSERT INTO `achievement_reward` (`ID`, `TitleA`, `TitleH`, `ItemID`, `Sender`, `Subject`, `Body`, `MailTemplateID`) VALUES From 70fc43ff8d7130ccec526e7889af99a26c2c9e50 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 3 Jun 2024 00:31:31 -0300 Subject: [PATCH 38/39] =?UTF-8?q?fix(Script/Hyjal):=20Fix=20encounter=20st?= =?UTF-8?q?ates=20not=20reseting=20if=20bosses=20are=20de=E2=80=A6=20(#190?= =?UTF-8?q?00)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Script/Hyjal): Fix encounter states not reseting if bosses are despawned while in combat * Update instance_hyjal.cpp --- .../CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp index 289d064c8..f27da4a41 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp @@ -419,6 +419,9 @@ public: if (Creature* creature = instance->GetCreature(guid)) creature->DespawnOrUnsummon(); + if (_bossWave && (GetBossState(_bossWave) != DONE)) + SetBossState(_bossWave, NOT_STARTED); + _scheduler.Schedule(300s, [this](TaskContext) { for (ObjectGuid const& guid : _baseAlliance) @@ -442,6 +445,9 @@ public: if (Creature* creature = instance->GetCreature(guid)) creature->DespawnOrUnsummon(); + if (_bossWave && (GetBossState(_bossWave) != DONE)) + SetBossState(_bossWave, NOT_STARTED); + _scheduler.Schedule(300s, [this](TaskContext) { for (ObjectGuid const& guid : _baseHorde) From a6425c36309f59eebbd1369dbfc5b09099a4dde5 Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Mon, 3 Jun 2024 05:42:06 +0200 Subject: [PATCH 39/39] fix(Core/PetHandler): when dismissing a charmed unit owned by another unit; stop the charm instead of despawning (#18989) https://github.com/TrinityCore/TrinityCore/commit/2cdea49d81ce2bb4e19df594c019a42fb4ba0c5b --- src/server/game/Handlers/PetHandler.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index 3d283f5ed..bf0ab70fa 100644 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -287,10 +287,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe case COMMAND_ABANDON: // abandon (hunter pet) or dismiss (summoned pet) if (pet->GetCharmerGUID() == GetPlayer()->GetGUID()) { - if (pet->IsSummon()) - pet->ToTempSummon()->UnSummon(); - else - _player->StopCastingCharm(); + _player->StopCastingCharm(); } else if (pet->GetOwnerGUID() == GetPlayer()->GetGUID()) {