From fb3749718e12c2214c010a811ec896323267758f Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Thu, 9 Jan 2025 16:15:50 -0300 Subject: [PATCH 01/51] =?UTF-8?q?fix(Scripts/Spells):=20Move=20Curse=20of?= =?UTF-8?q?=20Mending=20(7098=20&=2039647)=20to=20spell=20sc=E2=80=A6=20(#?= =?UTF-8?q?21117)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rev_1736342655634713400.sql | 5 +++++ src/server/game/Entities/Unit/Unit.cpp | 2 -- src/server/scripts/Spells/spell_generic.cpp | 21 +++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1736342655634713400.sql diff --git a/data/sql/updates/pending_db_world/rev_1736342655634713400.sql b/data/sql/updates/pending_db_world/rev_1736342655634713400.sql new file mode 100644 index 000000000..31f9f2c0e --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1736342655634713400.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id` IN (7098, 39647); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(7098, 'spell_gen_proc_on_victim'), +(39647, 'spell_gen_proc_on_victim'); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 85fe37b52..3de8d2a55 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -9673,8 +9673,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg return false; } // Cast positive spell on enemy target - case 7099: // Curse of Mending - case 39703: // Curse of Mending case 20233: // Improved Lay on Hands (cast on target) { target = victim; diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index f672ad8b6..8ce23ac5f 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -5379,6 +5379,26 @@ class spell_pet_spellhit_expertise_spellpen_scaling : public AuraScript } }; +// 7098 - Curse of Mending +// 39647 - Curse of Mending +class spell_gen_proc_on_victim : public AuraScript +{ + PrepareAuraScript(spell_gen_proc_on_victim); + + void OnProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + + if (Unit* target = eventInfo.GetActionTarget()) + GetUnitOwner()->CastSpell(target, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, true); + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_gen_proc_on_victim::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } +}; + void AddSC_generic_spell_scripts() { RegisterSpellScript(spell_silithyst); @@ -5538,4 +5558,5 @@ void AddSC_generic_spell_scripts() RegisterSpellScript(spell_gen_steal_weapon); RegisterSpellScript(spell_gen_set_health); RegisterSpellScript(spell_pet_spellhit_expertise_spellpen_scaling); + RegisterSpellScript(spell_gen_proc_on_victim); } From 6b22c7b43ee0cb2731b9d68b8029ea36876cf316 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 9 Jan 2025 19:16:51 +0000 Subject: [PATCH 02/51] chore(DB): import pending files Referenced commit(s): fb3749718e12c2214c010a811ec896323267758f --- .../rev_1736342655634713400.sql => db_world/2025_01_09_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1736342655634713400.sql => db_world/2025_01_09_01.sql} (82%) diff --git a/data/sql/updates/pending_db_world/rev_1736342655634713400.sql b/data/sql/updates/db_world/2025_01_09_01.sql similarity index 82% rename from data/sql/updates/pending_db_world/rev_1736342655634713400.sql rename to data/sql/updates/db_world/2025_01_09_01.sql index 31f9f2c0e..b6c6992a4 100644 --- a/data/sql/updates/pending_db_world/rev_1736342655634713400.sql +++ b/data/sql/updates/db_world/2025_01_09_01.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_09_00 -> 2025_01_09_01 -- DELETE FROM `spell_script_names` WHERE `spell_id` IN (7098, 39647); INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES From 70c34bd403962e2b678ba60d1462f2ddb209fe2a Mon Sep 17 00:00:00 2001 From: Tralenor <76077537+Tralenor@users.noreply.github.com> Date: Thu, 9 Jan 2025 20:20:02 +0100 Subject: [PATCH 03/51] fix(Core/World): edge case when last Char on realm was deleted (#20864) --- src/server/game/World/World.cpp | 28 ++++++++++++++-------------- src/server/game/World/World.h | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index f0893f3f1..a6bf64577 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -2884,27 +2884,27 @@ void World::UpdateRealmCharCount(uint32 accountId) { CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_COUNT); stmt->SetData(0, accountId); - _queryProcessor.AddCallback(CharacterDatabase.AsyncQuery(stmt).WithPreparedCallback(std::bind(&World::_UpdateRealmCharCount, this, std::placeholders::_1))); + _queryProcessor.AddCallback(CharacterDatabase.AsyncQuery(stmt).WithPreparedCallback(std::bind(&World::_UpdateRealmCharCount, this, std::placeholders::_1,accountId))); } -void World::_UpdateRealmCharCount(PreparedQueryResult resultCharCount) +void World::_UpdateRealmCharCount(PreparedQueryResult resultCharCount,uint32 accountId) { + uint8 charCount{0}; if (resultCharCount) { Field* fields = resultCharCount->Fetch(); - uint32 accountId = fields[0].Get(); - uint8 charCount = uint8(fields[1].Get()); - - LoginDatabaseTransaction trans = LoginDatabase.BeginTransaction(); - - LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_REP_REALM_CHARACTERS); - stmt->SetData(0, charCount); - stmt->SetData(1, accountId); - stmt->SetData(2, realm.Id.Realm); - trans->Append(stmt); - - LoginDatabase.CommitTransaction(trans); + charCount = uint8(fields[1].Get()); } + + LoginDatabaseTransaction trans = LoginDatabase.BeginTransaction(); + + LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_REP_REALM_CHARACTERS); + stmt->SetData(0, charCount); + stmt->SetData(1, accountId); + stmt->SetData(2, realm.Id.Realm); + trans->Append(stmt); + + LoginDatabase.CommitTransaction(trans); } void World::InitWeeklyQuestResetTime() diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index 76869e8f3..fa0e1302a 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -347,7 +347,7 @@ public: protected: void _UpdateGameTime(); // callback for UpdateRealmCharacters - void _UpdateRealmCharCount(PreparedQueryResult resultCharCount); + void _UpdateRealmCharCount(PreparedQueryResult resultCharCount,uint32 accountId); void InitDailyQuestResetTime(); void InitWeeklyQuestResetTime(); From 22397d04116b741c44aad8570a23f8dbb0b1c98f Mon Sep 17 00:00:00 2001 From: Exitare Date: Thu, 9 Jan 2025 11:20:54 -0800 Subject: [PATCH 04/51] fix(DB/Creature)Badlands Reagent Run II dragons don't aggro when sucking blood (#21021) --- data/sql/updates/pending_db_world/rev_1734919858671408200.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1734919858671408200.sql diff --git a/data/sql/updates/pending_db_world/rev_1734919858671408200.sql b/data/sql/updates/pending_db_world/rev_1734919858671408200.sql new file mode 100644 index 000000000..6a1c03bdb --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1734919858671408200.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2726) AND (`source_type` = 0) AND (`id` IN (1)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(2726, 0, 1, 0, 8, 0, 100, 0, 9712, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Scorched Guardian - Aggro on spell hit'); From 07a077a207d87a8a252547ce7d8ad0e002bce89a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 9 Jan 2025 19:21:01 +0000 Subject: [PATCH 05/51] chore(DB): import pending files Referenced commit(s): 70c34bd403962e2b678ba60d1462f2ddb209fe2a --- .../rev_1734919858671408200.sql => db_world/2025_01_09_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1734919858671408200.sql => db_world/2025_01_09_02.sql} (94%) diff --git a/data/sql/updates/pending_db_world/rev_1734919858671408200.sql b/data/sql/updates/db_world/2025_01_09_02.sql similarity index 94% rename from data/sql/updates/pending_db_world/rev_1734919858671408200.sql rename to data/sql/updates/db_world/2025_01_09_02.sql index 6a1c03bdb..fabf2fd94 100644 --- a/data/sql/updates/pending_db_world/rev_1734919858671408200.sql +++ b/data/sql/updates/db_world/2025_01_09_02.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_09_01 -> 2025_01_09_02 -- DELETE FROM `smart_scripts` WHERE (`entryorguid` = 2726) AND (`source_type` = 0) AND (`id` IN (1)); INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES From fcfa35139e2a92ae1166718ab64ce8b980fd03e7 Mon Sep 17 00:00:00 2001 From: Exitare Date: Fri, 10 Jan 2025 09:20:47 -0800 Subject: [PATCH 06/51] fix(Scripts/ShatteredHalls): Add scripts & spawn for quest "Imprisoned in the citadel" (#21114) --- .../rev_1736296967844459600.sql | 4 +++ .../instance_shattered_halls.cpp | 29 +++++++++++-------- .../ShatteredHalls/shattered_halls.h | 5 ++++ 3 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1736296967844459600.sql diff --git a/data/sql/updates/pending_db_world/rev_1736296967844459600.sql b/data/sql/updates/pending_db_world/rev_1736296967844459600.sql new file mode 100644 index 000000000..ade2aba1e --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1736296967844459600.sql @@ -0,0 +1,4 @@ +-- Spawn alliance quest giver for Shattered Halls Imprisoned in the Citadel quest +DELETE FROM `creature` WHERE (`id1` = 17288) AND (`guid` IN (151300)); +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES +(151300, 17288, 0, 0, 540, 37114, 3714, 2, 1, 0, 120.88, 252.78, -14.57, 0.82, 7200, 0, 0, 6104, 0, 0, 2, 0, 0, '', 0); diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp index 3e739e6a4..03e4c3250 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp @@ -67,6 +67,7 @@ public: { if (TeamIdInInstance == TEAM_NEUTRAL) TeamIdInInstance = player->GetTeamId(); + } void OnCreatureCreate(Creature* creature) override @@ -84,22 +85,26 @@ public: case NPC_SHATTERED_EXECUTIONER: if (RescueTimer > 25 * MINUTE * IN_MILLISECONDS) creature->AddLootMode(2); - executionerGUID = creature->GetGUID(); + ExecutionerGUID = creature->GetGUID(); break; case NPC_RIFLEMAN_BROWNBEARD: if (TeamIdInInstance == TEAM_HORDE) creature->UpdateEntry(NPC_KORAG_PROUDMANE); - prisonerGUID[0] = creature->GetGUID(); + PrisonerGUID[0] = creature->GetGUID(); break; case NPC_CAPTAIN_ALINA: if (TeamIdInInstance == TEAM_HORDE) creature->UpdateEntry(NPC_CAPTAIN_BONESHATTER); - prisonerGUID[1] = creature->GetGUID(); + PrisonerGUID[1] = creature->GetGUID(); break; case NPC_PRIVATE_JACINT: if (TeamIdInInstance == TEAM_HORDE) creature->UpdateEntry(NPC_SCOUT_ORGARR); - prisonerGUID[2] = creature->GetGUID(); + PrisonerGUID[2] = creature->GetGUID(); + break; + case NPC_RANDY_WHIZZLESPROCKET: + if (TeamIdInInstance == TEAM_HORDE) + creature->UpdateEntry(NPC_DRISELLA); break; } InstanceScript::OnCreatureCreate(creature); @@ -126,9 +131,9 @@ public: case DATA_PRISONER_1: case DATA_PRISONER_2: case DATA_PRISONER_3: - return prisonerGUID[data - DATA_PRISONER_1]; + return PrisonerGUID[data - DATA_PRISONER_1]; case DATA_EXECUTIONER: - return executionerGUID; + return ExecutionerGUID; } return ObjectGuid::Empty; @@ -144,22 +149,22 @@ public: { DoRemoveAurasDueToSpellOnPlayers(SPELL_KARGATHS_EXECUTIONER_1); DoCastSpellOnPlayers(SPELL_KARGATHS_EXECUTIONER_2); - if (Creature* prisoner = instance->GetCreature(prisonerGUID[0])) + if (Creature* prisoner = instance->GetCreature(PrisonerGUID[0])) Unit::Kill(prisoner, prisoner); - if (Creature* executioner = instance->GetCreature(executionerGUID)) + if (Creature* executioner = instance->GetCreature(ExecutionerGUID)) executioner->RemoveLootMode(2); } else if ((RescueTimer / IN_MILLISECONDS) == 15 * MINUTE) { DoRemoveAurasDueToSpellOnPlayers(SPELL_KARGATHS_EXECUTIONER_2); DoCastSpellOnPlayers(SPELL_KARGATHS_EXECUTIONER_3); - if (Creature* prisoner = instance->GetCreature(prisonerGUID[1])) + if (Creature* prisoner = instance->GetCreature(PrisonerGUID[1])) Unit::Kill(prisoner, prisoner); } else if ((RescueTimer / IN_MILLISECONDS) == 0) { DoRemoveAurasDueToSpellOnPlayers(SPELL_KARGATHS_EXECUTIONER_3); - if (Creature* prisoner = instance->GetCreature(prisonerGUID[2])) + if (Creature* prisoner = instance->GetCreature(PrisonerGUID[2])) Unit::Kill(prisoner, prisoner); } } @@ -176,8 +181,8 @@ public: } protected: - ObjectGuid executionerGUID; - ObjectGuid prisonerGUID[3]; + ObjectGuid ExecutionerGUID; + ObjectGuid PrisonerGUID[3]; uint32 RescueTimer; TeamId TeamIdInInstance; }; diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h index 9001522a8..f0c0a3647 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h @@ -66,6 +66,11 @@ enum CreatureIds NPC_KORAG_PROUDMANE = 17295, NPC_CAPTAIN_BONESHATTER = 17296, NPC_SCOUT_ORGARR = 17297, + + //Drisella + NPC_DRISELLA = 17294, + // Randy Whizzlesprocket + NPC_RANDY_WHIZZLESPROCKET = 17288, }; enum GameobjectIds From 1fca5a13bdfee254d3a873676cd359542a8797f8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 10 Jan 2025 17:21:47 +0000 Subject: [PATCH 07/51] chore(DB): import pending files Referenced commit(s): fcfa35139e2a92ae1166718ab64ce8b980fd03e7 --- .../rev_1736296967844459600.sql => db_world/2025_01_10_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1736296967844459600.sql => db_world/2025_01_10_00.sql} (93%) diff --git a/data/sql/updates/pending_db_world/rev_1736296967844459600.sql b/data/sql/updates/db_world/2025_01_10_00.sql similarity index 93% rename from data/sql/updates/pending_db_world/rev_1736296967844459600.sql rename to data/sql/updates/db_world/2025_01_10_00.sql index ade2aba1e..a83046324 100644 --- a/data/sql/updates/pending_db_world/rev_1736296967844459600.sql +++ b/data/sql/updates/db_world/2025_01_10_00.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_09_02 -> 2025_01_10_00 -- Spawn alliance quest giver for Shattered Halls Imprisoned in the Citadel quest DELETE FROM `creature` WHERE (`id1` = 17288) AND (`guid` IN (151300)); INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES From 89204a4cdcfdf5ae9d999d66fa4c1ad48175acee Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:51:30 -0300 Subject: [PATCH 08/51] fix(Scripts/ZulAman): Limit target search range for Cyclones (#21131) --- src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index 59b0686d1..8c5690fc7 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -394,10 +394,8 @@ struct npc_zuljin_vortex : public ScriptedAI void ChangeToNewPlayer() { DoResetThreatList(); - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true)) - { + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true)) me->AddThreat(target, 10000000.0f); - } } void UpdateAI(uint32 /*diff*/) override From 564ccd945ab055e97f88c175c75abfd88ca83c27 Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Fri, 10 Jan 2025 22:12:34 +0100 Subject: [PATCH 09/51] fix(Scripts/ZulAman): Zul'jin Add Cooldown to EnergyStorm proc (#21132) --- .../rev_1736536297178305597.sql | 7 +++++ .../EasternKingdoms/ZulAman/boss_zuljin.cpp | 30 +++++++++++++++---- 2 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1736536297178305597.sql diff --git a/data/sql/updates/pending_db_world/rev_1736536297178305597.sql b/data/sql/updates/pending_db_world/rev_1736536297178305597.sql new file mode 100644 index 000000000..42ca17f2d --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1736536297178305597.sql @@ -0,0 +1,7 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id`=42577 AND `ScriptName`='spell_zuljin_zap'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES(42577, 'spell_zuljin_zap'); +-- 43983 Energy Storm, add CD to proc +DELETE FROM `spell_proc_event` WHERE `entry` = 43983; +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(43983, 0, 0, 0, 0, 0, 0x4000|0x10000, 1|2, 1, 0.0, 100.0, 600); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index 8c5690fc7..b415fe0d1 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -385,12 +385,6 @@ struct npc_zuljin_vortex : public ScriptedAI ChangeToNewPlayer(); } - void SpellHit(Unit* caster, SpellInfo const* spell) override - { - if (spell->Id == SPELL_ZAP_INFORM) - DoCast(caster, SPELL_ZAP_DAMAGE, true); - } - void ChangeToNewPlayer() { DoResetThreatList(); @@ -440,9 +434,33 @@ class spell_claw_rage_aura : public AuraScript } }; +// 42577 - Zap +class spell_zuljin_zap : public SpellScript +{ + PrepareSpellScript(spell_zuljin_zap); + + bool Validate(SpellInfo const* /*spell*/) override + { + return ValidateSpellInfo({ SPELL_ZAP_DAMAGE }); + } + + void HandleScript(SpellEffIndex effIndex) + { + PreventHitDefaultEffect(effIndex); + if (Unit* victim = GetHitUnit()) + victim->CastSpell(GetCaster(), SPELL_ZAP_DAMAGE, true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_zuljin_zap::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_boss_zuljin() { RegisterZulAmanCreatureAI(boss_zuljin); RegisterZulAmanCreatureAI(npc_zuljin_vortex); RegisterSpellScript(spell_claw_rage_aura); + RegisterSpellScript(spell_zuljin_zap); } From 71155cb7304f5e2f41a1fcf17177363b9a58aa17 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 10 Jan 2025 21:13:37 +0000 Subject: [PATCH 10/51] chore(DB): import pending files Referenced commit(s): 564ccd945ab055e97f88c175c75abfd88ca83c27 --- .../rev_1736536297178305597.sql => db_world/2025_01_10_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1736536297178305597.sql => db_world/2025_01_10_01.sql} (92%) diff --git a/data/sql/updates/pending_db_world/rev_1736536297178305597.sql b/data/sql/updates/db_world/2025_01_10_01.sql similarity index 92% rename from data/sql/updates/pending_db_world/rev_1736536297178305597.sql rename to data/sql/updates/db_world/2025_01_10_01.sql index 42ca17f2d..67b8ac0d3 100644 --- a/data/sql/updates/pending_db_world/rev_1736536297178305597.sql +++ b/data/sql/updates/db_world/2025_01_10_01.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_10_00 -> 2025_01_10_01 -- DELETE FROM `spell_script_names` WHERE `spell_id`=42577 AND `ScriptName`='spell_zuljin_zap'; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES(42577, 'spell_zuljin_zap'); From e941d43a0ad79478d96b4627c17bd63fb74dbcd0 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 10 Jan 2025 19:15:05 -0300 Subject: [PATCH 11/51] fix(Scripts/ZulAman): Fix Hexlord gate not opening after crashes (#21133) --- .../EasternKingdoms/ZulAman/instance_zulaman.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp index 802fb0fdd..555c38b7c 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp @@ -149,10 +149,10 @@ public: void OnGameObjectCreate(GameObject* go) override { - if (go->GetEntry() == GO_GATE_HEXLORD) - CheckInstanceStatus(); - InstanceScript::OnGameObjectCreate(go); + + if (go->GetEntry() == GO_GATE_HEXLORD) + CheckInstanceStatus(go); } void SummonHostage(uint8 num) @@ -189,10 +189,10 @@ public: } } - void CheckInstanceStatus() + void CheckInstanceStatus(GameObject* gate = nullptr) { if (AllBossesDone({ DATA_NALORAKK, DATA_AKILZON, DATA_JANALAI, DATA_HALAZZI })) - HandleGameObject(ObjectGuid::Empty, true, GetGameObject(DATA_HEXLORD_GATE)); + HandleGameObject(ObjectGuid::Empty, true, gate ? gate : GetGameObject(DATA_HEXLORD_GATE)); } void SetData(uint32 type, uint32 data) override From 5bc20a184d2c9212da1e2aec9b075b39792eac82 Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Fri, 10 Jan 2025 23:38:24 +0100 Subject: [PATCH 12/51] fix(Player/SpellQueue): bandaid crashfix (#21103) --- src/server/game/Entities/Player/PlayerUpdates.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/server/game/Entities/Player/PlayerUpdates.cpp b/src/server/game/Entities/Player/PlayerUpdates.cpp index 162b10d48..8c33e67ba 100644 --- a/src/server/game/Entities/Player/PlayerUpdates.cpp +++ b/src/server/game/Entities/Player/PlayerUpdates.cpp @@ -2333,6 +2333,12 @@ void Player::ProcessSpellQueue() { PendingSpellCastRequest& request = SpellQueue.front(); // Peek at the first spell SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(request.spellId); + if (!spellInfo) + { + LOG_ERROR("entities.player", "Player::ProcessSpellQueue: Invalid spell {}", request.spellId); + SpellQueue.clear(); + break; + } if (CanExecutePendingSpellCastRequest(spellInfo)) { ExecuteOrCancelSpellCastRequest(&request); From 3e465ddedcd1f3fe8e89f2c085d85663882d2bbb Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 10 Jan 2025 20:43:11 -0300 Subject: [PATCH 13/51] feat(Scripts/Commands): Update GetBossState to display all states (#21134) --- .../pending_db_world/rev_1736546523943069600.sql | 2 ++ src/server/scripts/Commands/cs_instance.cpp | 12 +++++------- 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1736546523943069600.sql diff --git a/data/sql/updates/pending_db_world/rev_1736546523943069600.sql b/data/sql/updates/pending_db_world/rev_1736546523943069600.sql new file mode 100644 index 000000000..f9f863d9e --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1736546523943069600.sql @@ -0,0 +1,2 @@ +-- +UPDATE `command` SET `help` = 'Syntax: .instance getbossstate [$Name]\nDisplays the state for every available encounter.\nIf no character name is provided, the current map will be used as target.' WHERE `name` = 'instance getbossstate'; diff --git a/src/server/scripts/Commands/cs_instance.cpp b/src/server/scripts/Commands/cs_instance.cpp index cd6836372..7b1c452e9 100644 --- a/src/server/scripts/Commands/cs_instance.cpp +++ b/src/server/scripts/Commands/cs_instance.cpp @@ -206,7 +206,7 @@ public: return true; } - static bool HandleInstanceGetBossStateCommand(ChatHandler* handler, uint32 encounterId, Optional player) + static bool HandleInstanceGetBossStateCommand(ChatHandler* handler, Optional player) { // Character name must be provided when using this from console. if (!player && !handler->GetSession()) @@ -237,15 +237,13 @@ public: return false; } - if (encounterId > map->GetInstanceScript()->GetEncounterCount()) + for (uint8 i = 0; i < map->GetInstanceScript()->GetEncounterCount(); ++i) { - handler->SendErrorMessage(LANG_BAD_VALUE); - return false; + uint32 state = map->GetInstanceScript()->GetBossState(i); + std::string stateName = InstanceScript::GetBossStateName(state); + handler->PSendSysMessage(LANG_COMMAND_INST_GET_BOSS_STATE, i, state, stateName); } - uint32 state = map->GetInstanceScript()->GetBossState(encounterId); - std::string stateName = InstanceScript::GetBossStateName(state); - handler->PSendSysMessage(LANG_COMMAND_INST_GET_BOSS_STATE, encounterId, state, stateName); return true; } }; From 8b21b6150fdab31c9f6f90e8c4fe88e5759d76b6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 10 Jan 2025 23:44:14 +0000 Subject: [PATCH 14/51] chore(DB): import pending files Referenced commit(s): 3e465ddedcd1f3fe8e89f2c085d85663882d2bbb --- .../rev_1736546523943069600.sql => db_world/2025_01_10_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1736546523943069600.sql => db_world/2025_01_10_02.sql} (84%) diff --git a/data/sql/updates/pending_db_world/rev_1736546523943069600.sql b/data/sql/updates/db_world/2025_01_10_02.sql similarity index 84% rename from data/sql/updates/pending_db_world/rev_1736546523943069600.sql rename to data/sql/updates/db_world/2025_01_10_02.sql index f9f863d9e..a03165b3e 100644 --- a/data/sql/updates/pending_db_world/rev_1736546523943069600.sql +++ b/data/sql/updates/db_world/2025_01_10_02.sql @@ -1,2 +1,3 @@ +-- DB update 2025_01_10_01 -> 2025_01_10_02 -- UPDATE `command` SET `help` = 'Syntax: .instance getbossstate [$Name]\nDisplays the state for every available encounter.\nIf no character name is provided, the current map will be used as target.' WHERE `name` = 'instance getbossstate'; From 07937d34da6f1e60d045841d4d8f592367ec4078 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 10 Jan 2025 20:48:58 -0300 Subject: [PATCH 15/51] feat(Scripts/Commands): Implement opendoor command (#21136) --- .../pending_db_world/rev_1736551855453244500.sql | 9 +++++++++ src/server/game/Miscellaneous/Language.h | 5 ++++- src/server/scripts/Commands/cs_misc.cpp | 16 +++++++++++++++- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1736551855453244500.sql diff --git a/data/sql/updates/pending_db_world/rev_1736551855453244500.sql b/data/sql/updates/pending_db_world/rev_1736551855453244500.sql new file mode 100644 index 000000000..db974204a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1736551855453244500.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `acore_string` WHERE `entry` IN (5086, 5087); +INSERT INTO `acore_string` (`entry`, `content_default`) VALUES +(5086, 'No doors found within range ({} yards).'), +(5087, 'Door {} (Entry: {}) opened!'); + +DELETE FROM `command` WHERE `name` = 'opendoor'; +INSERT INTO `command` (`name`, `security`, `help`) VALUES +('opendoor', 1, 'Syntax: .opendoor [$range]\nOpens the nearest door within the range provided (default 5.0yd)'); diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index d0219e83b..2911adad2 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -1145,7 +1145,10 @@ enum AcoreStrings LANG_CMD_GO_RESPAWN = 5085, - // Room for more strings 5086-9999 + LANG_CMD_NO_DOOR_FOUND = 5086, + LANG_CMD_DOOR_OPENED = 5087, + + // Room for more strings 5088-9999 // Level requirement notifications LANG_SAY_REQ = 6604, diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 17ee47611..6613f6adc 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -146,7 +146,8 @@ public: { "playall", HandlePlayAllCommand, SEC_GAMEMASTER, Console::No }, { "skirmish", HandleSkirmishCommand, SEC_ADMINISTRATOR, Console::No }, { "mailbox", HandleMailBoxCommand, SEC_MODERATOR, Console::No }, - { "string", HandleStringCommand, SEC_GAMEMASTER, Console::No } + { "string", HandleStringCommand, SEC_GAMEMASTER, Console::No }, + { "opendoor", HandleOpenDoorCommand, SEC_GAMEMASTER, Console::No } }; return commandTable; @@ -3034,6 +3035,19 @@ public: return true; } } + + static bool HandleOpenDoorCommand(ChatHandler* handler, Optional range) + { + if (GameObject* go = handler->GetPlayer()->FindNearestGameObjectOfType(GAMEOBJECT_TYPE_DOOR, range ? *range : 5.0f)) + { + go->SetGoState(GO_STATE_ACTIVE); + handler->PSendSysMessage(LANG_CMD_DOOR_OPENED, go->GetName(), go->GetEntry()); + return true; + } + + handler->SendErrorMessage(LANG_CMD_NO_DOOR_FOUND, range ? *range : 5.0f); + return false; + } }; void AddSC_misc_commandscript() From 4c18c6a8cf43dad90ef7aa01b185553a1625bdd3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 10 Jan 2025 23:49:59 +0000 Subject: [PATCH 16/51] chore(DB): import pending files Referenced commit(s): 07937d34da6f1e60d045841d4d8f592367ec4078 --- .../rev_1736551855453244500.sql => db_world/2025_01_10_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1736551855453244500.sql => db_world/2025_01_10_03.sql} (90%) diff --git a/data/sql/updates/pending_db_world/rev_1736551855453244500.sql b/data/sql/updates/db_world/2025_01_10_03.sql similarity index 90% rename from data/sql/updates/pending_db_world/rev_1736551855453244500.sql rename to data/sql/updates/db_world/2025_01_10_03.sql index db974204a..0f2b094b1 100644 --- a/data/sql/updates/pending_db_world/rev_1736551855453244500.sql +++ b/data/sql/updates/db_world/2025_01_10_03.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_10_02 -> 2025_01_10_03 -- DELETE FROM `acore_string` WHERE `entry` IN (5086, 5087); INSERT INTO `acore_string` (`entry`, `content_default`) VALUES From ea28a9f24955c9dda675349586cf87e5b3b0810a Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 10 Jan 2025 22:23:59 -0300 Subject: [PATCH 17/51] fix(DB/Creature): Akil'zon interrupt immunity (#21130) --- data/sql/updates/pending_db_world/rev_1736537763501202700.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1736537763501202700.sql diff --git a/data/sql/updates/pending_db_world/rev_1736537763501202700.sql b/data/sql/updates/pending_db_world/rev_1736537763501202700.sql new file mode 100644 index 000000000..3a4f848d8 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1736537763501202700.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|33554432 WHERE `entry` = 23574; From fe30831bc2cd1166caaf98949d4e21872e779ae6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 11 Jan 2025 01:25:02 +0000 Subject: [PATCH 18/51] chore(DB): import pending files Referenced commit(s): ea28a9f24955c9dda675349586cf87e5b3b0810a --- .../rev_1736537763501202700.sql => db_world/2025_01_11_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1736537763501202700.sql => db_world/2025_01_11_00.sql} (72%) diff --git a/data/sql/updates/pending_db_world/rev_1736537763501202700.sql b/data/sql/updates/db_world/2025_01_11_00.sql similarity index 72% rename from data/sql/updates/pending_db_world/rev_1736537763501202700.sql rename to data/sql/updates/db_world/2025_01_11_00.sql index 3a4f848d8..33c3d0807 100644 --- a/data/sql/updates/pending_db_world/rev_1736537763501202700.sql +++ b/data/sql/updates/db_world/2025_01_11_00.sql @@ -1,2 +1,3 @@ +-- DB update 2025_01_10_03 -> 2025_01_11_00 -- UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|33554432 WHERE `entry` = 23574; From 601901b0de764ded4197d6e83d376e9ce26de903 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 10 Jan 2025 22:25:43 -0300 Subject: [PATCH 19/51] fix(DB/SAI): Fix Marauding Bursters repositioning in combat (#21135) --- .../updates/pending_db_world/rev_1736550580324276200.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1736550580324276200.sql diff --git a/data/sql/updates/pending_db_world/rev_1736550580324276200.sql b/data/sql/updates/pending_db_world/rev_1736550580324276200.sql new file mode 100644 index 000000000..ce3e36e92 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1736550580324276200.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 16857) AND (`source_type` = 0) AND (`id` IN (3, 7, 11)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(16857, 0, 3, 11, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 90, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Marauding Crust Burster - On Reset - Set Bytes0'), +(16857, 0, 7, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Marauding Crust Burster - On Aggro - Set Rooted On'), +(16857, 0, 11, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 103, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Marauding Crust Burster - On Reset - Set Rooted Off'); From 6baae1d942c1f8ab78170077d4cf3b38b3ded884 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 11 Jan 2025 01:26:02 +0000 Subject: [PATCH 20/51] chore(DB): import pending files Referenced commit(s): fe30831bc2cd1166caaf98949d4e21872e779ae6 --- .../rev_1736550580324276200.sql => db_world/2025_01_11_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1736550580324276200.sql => db_world/2025_01_11_01.sql} (96%) diff --git a/data/sql/updates/pending_db_world/rev_1736550580324276200.sql b/data/sql/updates/db_world/2025_01_11_01.sql similarity index 96% rename from data/sql/updates/pending_db_world/rev_1736550580324276200.sql rename to data/sql/updates/db_world/2025_01_11_01.sql index ce3e36e92..96ab31a24 100644 --- a/data/sql/updates/pending_db_world/rev_1736550580324276200.sql +++ b/data/sql/updates/db_world/2025_01_11_01.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_11_00 -> 2025_01_11_01 -- DELETE FROM `smart_scripts` WHERE (`entryorguid` = 16857) AND (`source_type` = 0) AND (`id` IN (3, 7, 11)); INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES From 03c263f88e0c0f217b40a667fce68b5504f2309c Mon Sep 17 00:00:00 2001 From: iThorgrim <125808072+iThorgrim@users.noreply.github.com> Date: Sat, 11 Jan 2025 13:03:20 +0100 Subject: [PATCH 21/51] feat(CMake/Eluna): Update CMakeLists for modules to allow Eluna to switch Lua version (#21123) --- modules/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index afdfe2c5a..46c9d5e16 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -277,6 +277,10 @@ add_library(modules STATIC ${SCRIPT_MODULE_PRIVATE_SCRIPTLOADER} ${PRIVATE_SOURCES_MODULES}) +if (MOD_ELUNA_FOUND) + target_link_libraries(modules PUBLIC lualib) +endif() + target_link_libraries(modules PRIVATE acore-core-interface From 849e10439ef02372907f5b7603fd4db2619cedf5 Mon Sep 17 00:00:00 2001 From: FlyingArowana Date: Sun, 12 Jan 2025 13:32:34 +0000 Subject: [PATCH 22/51] fix(DB/Creature) - Removes weapons from Rorgish Jowl (#21142) --- data/sql/updates/pending_db_world/rev_1736627805988028300.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1736627805988028300.sql diff --git a/data/sql/updates/pending_db_world/rev_1736627805988028300.sql b/data/sql/updates/pending_db_world/rev_1736627805988028300.sql new file mode 100644 index 000000000..95406f0dc --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1736627805988028300.sql @@ -0,0 +1,3 @@ +-- +-- Removes `Monster - Axe, 2H Horde Massive Spiked` from creature `Rorgish Jowl` +UPDATE `creature_equip_template` SET `ItemID1` = 0 WHERE (`CreatureID` = 10639 AND `ItemID1` = 14870); From e9dfbe016330431dde78e58bd185dd45b860442f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 12 Jan 2025 13:33:38 +0000 Subject: [PATCH 23/51] chore(DB): import pending files Referenced commit(s): 849e10439ef02372907f5b7603fd4db2619cedf5 --- .../rev_1736627805988028300.sql => db_world/2025_01_12_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1736627805988028300.sql => db_world/2025_01_12_00.sql} (80%) diff --git a/data/sql/updates/pending_db_world/rev_1736627805988028300.sql b/data/sql/updates/db_world/2025_01_12_00.sql similarity index 80% rename from data/sql/updates/pending_db_world/rev_1736627805988028300.sql rename to data/sql/updates/db_world/2025_01_12_00.sql index 95406f0dc..429bab2ee 100644 --- a/data/sql/updates/pending_db_world/rev_1736627805988028300.sql +++ b/data/sql/updates/db_world/2025_01_12_00.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_11_01 -> 2025_01_12_00 -- -- Removes `Monster - Axe, 2H Horde Massive Spiked` from creature `Rorgish Jowl` UPDATE `creature_equip_template` SET `ItemID1` = 0 WHERE (`CreatureID` = 10639 AND `ItemID1` = 14870); From 085a8d31a07b47d3f9e923b8d2471e166389828e Mon Sep 17 00:00:00 2001 From: Tereneckla Date: Sun, 12 Jan 2025 13:33:46 +0000 Subject: [PATCH 24/51] fix(DB/Loot): Malacrass should drop 2 pieces of loot and sometimes Tiny Vodoo Mask (#21139) --- .../sql/updates/pending_db_world/rev_1736616775226885710.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1736616775226885710.sql diff --git a/data/sql/updates/pending_db_world/rev_1736616775226885710.sql b/data/sql/updates/pending_db_world/rev_1736616775226885710.sql new file mode 100644 index 000000000..41820b13d --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1736616775226885710.sql @@ -0,0 +1,5 @@ +DELETE FROM `reference_loot_template` WHERE `Entry` = 34078 AND `Item` = 34029; +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(24239, 34029, 0, 30, 0, 1, 0, 1, 1, 'Hex Lord Malacrass - Tiny Voodoo Mask'); + +UPDATE `creature_loot_template` SET `MinCount` = 2, `MaxCount` = 2 WHERE `Entry` = 24239 AND `Reference` = 34078; From 286e79e8dd87a4e2ee00cb3019d8e2a0767da1e5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 12 Jan 2025 13:34:36 +0000 Subject: [PATCH 25/51] chore(DB): import pending files Referenced commit(s): e9dfbe016330431dde78e58bd185dd45b860442f --- .../rev_1736616775226885710.sql => db_world/2025_01_12_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1736616775226885710.sql => db_world/2025_01_12_01.sql} (90%) diff --git a/data/sql/updates/pending_db_world/rev_1736616775226885710.sql b/data/sql/updates/db_world/2025_01_12_01.sql similarity index 90% rename from data/sql/updates/pending_db_world/rev_1736616775226885710.sql rename to data/sql/updates/db_world/2025_01_12_01.sql index 41820b13d..93d0f5160 100644 --- a/data/sql/updates/pending_db_world/rev_1736616775226885710.sql +++ b/data/sql/updates/db_world/2025_01_12_01.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_12_00 -> 2025_01_12_01 DELETE FROM `reference_loot_template` WHERE `Entry` = 34078 AND `Item` = 34029; INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES (24239, 34029, 0, 30, 0, 1, 0, 1, 1, 'Hex Lord Malacrass - Tiny Voodoo Mask'); From 67afd97edfb97c9b6d7b7bfc6b2f6ce430159ef4 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 12 Jan 2025 11:23:09 -0300 Subject: [PATCH 26/51] =?UTF-8?q?fix(Scripts/ZulAman):=20Use=20Zul'jins=20?= =?UTF-8?q?threatlist=20to=20search=20for=20cyclone=20t=E2=80=A6=20(#21138?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index b415fe0d1..feb6b3553 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -388,8 +388,10 @@ struct npc_zuljin_vortex : public ScriptedAI void ChangeToNewPlayer() { DoResetThreatList(); - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true)) - me->AddThreat(target, 10000000.0f); + if (WorldObject* summoner = GetSummoner()) + if (Creature* zuljin = summoner->ToCreature()) + if (Unit* target = zuljin->AI()->SelectTarget(SelectTargetMethod::Random, 0, 80.0f, true)) + me->AddThreat(target, 10000000.0f); } void UpdateAI(uint32 /*diff*/) override From bf4118362ae08e5f33c375f63918b6067c24c49f Mon Sep 17 00:00:00 2001 From: manstfu <33990720+manstfu@users.noreply.github.com> Date: Mon, 13 Jan 2025 12:54:47 +0100 Subject: [PATCH 27/51] fix(Core/Group): CF Faction Assign & Leader Instance Faction (#21118) Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- src/server/game/Instances/InstanceScript.h | 3 + src/server/game/Maps/Map.cpp | 3 + .../instance_trial_of_the_champion.cpp | 38 +++++++++- .../instance_trial_of_the_crusader.cpp | 42 ++++++++++- .../ForgeOfSouls/instance_forge_of_souls.cpp | 37 +++++++++- .../instance_halls_of_reflection.cpp | 46 +++++++++++- .../PitOfSaron/instance_pit_of_saron.cpp | 49 ++++++++++++- .../instance_icecrown_citadel.cpp | 70 +++++++++++++++++-- .../Northrend/Nexus/Nexus/instance_nexus.cpp | 52 ++++++++++++-- .../instance_shattered_halls.cpp | 33 ++++++++- 10 files changed, 349 insertions(+), 24 deletions(-) diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index 8e6f83c1f..cae3994ed 100644 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -184,6 +184,9 @@ public: //Called when a player successfully enters the instance. virtual void OnPlayerEnter(Player* /*player*/) {} + //Called when a player successfully leaves the instance. + virtual void OnPlayerLeave(Player* /*player*/) {} + virtual void OnPlayerAreaUpdate(Player* /*player*/, uint32 /*oldArea*/, uint32 /*newArea*/) {} //Called when a player enters/leaves water bodies. diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index ccf24f0a3..84617f5d3 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -3048,6 +3048,9 @@ void InstanceMap::RemovePlayerFromMap(Player* player, bool remove) // If remove == true - player already deleted. if (!remove) player->SetPendingBind(0, 0); + + if (instance_data) + instance_data->OnPlayerLeave(player); } void InstanceMap::AfterPlayerUnlinkFromMap() diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp index e5ca3913b..7de0e534b 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp @@ -114,7 +114,17 @@ public: Map::PlayerList const& players = instance->GetPlayers(); if (!players.IsEmpty()) if (Player* pPlayer = players.begin()->GetSource()) - TeamIdInInstance = pPlayer->GetTeamId(); + { + if (Group* group = pPlayer->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + TeamIdInInstance = pPlayer->GetTeamId(); + } + else + TeamIdInInstance = pPlayer->GetTeamId(); + } } switch (creature->GetEntry()) @@ -271,9 +281,25 @@ public: // EVENT STUFF BELOW: - void OnPlayerEnter(Player* plr) override + void OnPlayerEnter(Player* player) override { - if (DoNeedCleanup(plr)) + if (TeamIdInInstance == TEAM_NEUTRAL) + { + if (Group* group = player->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + TeamIdInInstance = player->GetTeamId(); + } + else + TeamIdInInstance = player->GetTeamId(); + } + + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP)) + player->SetFaction((TeamIdInInstance == TEAM_HORDE) ? 1610 : 1); + + if (DoNeedCleanup(player)) { InstanceCleanup(); } @@ -281,6 +307,12 @@ public: events.RescheduleEvent(EVENT_CHECK_PLAYERS, CLEANUP_CHECK_INTERVAL); } + void OnPlayerLeave(Player* player) override + { + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP)) + player->SetFactionForRace(player->getRace()); + } + bool DoNeedCleanup(Player* ignoredPlayer = nullptr) { uint8 aliveCount = 0; diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index 8a4dc0d70..0d53492fc 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp @@ -1203,8 +1203,24 @@ public: if (Player* plr = itr->GetSource()) if (!plr->IsGameMaster()) { - TeamIdInInstance = plr->GetTeamId(); - break; + if (Group* group = plr->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + { + TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + break; + } + else + { + TeamIdInInstance = plr->GetTeamId(); + break; + } + } + else + { + TeamIdInInstance = plr->GetTeamId(); + break; + } } } if (Creature* c = instance->GetCreature(TeamIdInInstance == TEAM_ALLIANCE ? NPC_VarianGUID : NPC_GarroshGUID)) @@ -1397,6 +1413,22 @@ public: void OnPlayerEnter(Player* plr) override { + if (TeamIdInInstance == TEAM_NEUTRAL) + { + if (Group* group = plr->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + TeamIdInInstance = plr->GetTeamId(); + } + else + TeamIdInInstance = plr->GetTeamId(); + } + + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP)) + plr->SetFaction((TeamIdInInstance == TEAM_HORDE) ? 1610 : 1); + if (instance->IsHeroic()) { plr->SendUpdateWorldState(UPDATE_STATE_UI_SHOW, 1); @@ -1416,6 +1448,12 @@ public: events.RescheduleEvent(EVENT_CHECK_PLAYERS, 5s); } + void OnPlayerLeave(Player* player) override + { + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP)) + player->SetFactionForRace(player->getRace()); + } + bool DoNeedCleanup(Player* ignoredPlayer = nullptr) { uint8 aliveCount = 0; diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp index 73550b3db..382a4c577 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp @@ -19,6 +19,7 @@ #include "Player.h" #include "ScriptedCreature.h" #include "forge_of_souls.h" +#include "Group.h" BossBoundaryData const boundaries = { @@ -69,8 +70,24 @@ public: return false; } - void OnPlayerEnter(Player* /*plr*/) override + void OnPlayerEnter(Player* player) override { + if (teamIdInInstance == TEAM_NEUTRAL) + { + if (Group* group = player->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + teamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + teamIdInInstance = player->GetTeamId(); + } + else + teamIdInInstance = player->GetTeamId(); + } + + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP)) + player->SetFaction((teamIdInInstance == TEAM_HORDE) ? 1610 : 1); + // this will happen only after crash and loading the instance from db if (m_auiEncounter[0] == DONE && m_auiEncounter[1] == DONE && (!NPC_LeaderSecondGUID || !instance->GetCreature(NPC_LeaderSecondGUID))) { @@ -79,6 +96,12 @@ public: } } + void OnPlayerLeave(Player* player) override + { + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP)) + player->SetFactionForRace(player->getRace()); + } + void OnCreatureCreate(Creature* creature) override { if (teamIdInInstance == TEAM_NEUTRAL) @@ -86,7 +109,17 @@ public: Map::PlayerList const& players = instance->GetPlayers(); if (!players.IsEmpty()) if (Player* player = players.begin()->GetSource()) - teamIdInInstance = player->GetTeamId(); + { + if (Group* group = player->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + teamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + teamIdInInstance = player->GetTeamId(); + } + else + teamIdInInstance = player->GetTeamId(); + } } switch (creature->GetEntry()) diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp index 14d01fe94..708ca27c1 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp @@ -20,6 +20,7 @@ #include "Transport.h" #include "halls_of_reflection.h" #include "InstanceScript.h" +#include "Group.h" class UtherBatteredHiltEvent : public BasicEvent { @@ -213,6 +214,31 @@ public: return (instance->HavePlayers() && WaveNumber) || IsDuringLKFight; // during LK fight npcs are active and will unset this variable } + void OnPlayerEnter(Player* player) override + { + if (TeamIdInInstance == TEAM_NEUTRAL) + { + if (Group* group = player->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + TeamIdInInstance = player->GetTeamId(); + } + else + TeamIdInInstance = player->GetTeamId(); + } + + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP)) + player->SetFaction((TeamIdInInstance == TEAM_HORDE) ? 1610 : 1); + } + + void OnPlayerLeave(Player* player) override + { + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP)) + player->SetFactionForRace(player->getRace()); + } + void OnCreatureCreate(Creature* creature) override { if (TeamIdInInstance == TEAM_NEUTRAL) @@ -223,8 +249,24 @@ public: if (Player* p = itr->GetSource()) if (!p->IsGameMaster()) { - TeamIdInInstance = p->GetTeamId(); - break; + if (Group* group = p->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + { + TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + break; + } + else + { + TeamIdInInstance = p->GetTeamId(); + break; + } + } + else + { + TeamIdInInstance = p->GetTeamId(); + break; + } } } diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp index d7210151f..9d1e26a90 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp @@ -20,6 +20,7 @@ #include "Player.h" #include "ScriptedCreature.h" #include "pit_of_saron.h" +#include "Group.h" class instance_pit_of_saron : public InstanceMapScript { @@ -75,13 +76,35 @@ public: return false; } - void OnPlayerEnter(Player* /*plr*/) override + void OnPlayerEnter(Player* player) override { + if (teamIdInInstance == TEAM_NEUTRAL) + { + if (Group* group = player->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + teamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + teamIdInInstance = player->GetTeamId(); + } + else + teamIdInInstance = player->GetTeamId(); + } + + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP)) + player->SetFaction((teamIdInInstance == TEAM_HORDE) ? 1610 : 1); + instance->LoadGrid(LeaderIntroPos.GetPositionX(), LeaderIntroPos.GetPositionY()); if (Creature* c = instance->GetCreature(GetGuidData(DATA_LEADER_FIRST_GUID))) c->AI()->SetData(DATA_START_INTRO, 0); } + void OnPlayerLeave(Player* player) override + { + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP)) + player->SetFactionForRace(player->getRace()); + } + uint32 GetCreatureEntry(ObjectGuid::LowType /*guidLow*/, CreatureData const* data) override { if (teamIdInInstance == TEAM_NEUTRAL) @@ -89,7 +112,17 @@ public: Map::PlayerList const& players = instance->GetPlayers(); if (!players.IsEmpty()) if (Player* player = players.begin()->GetSource()) - teamIdInInstance = player->GetTeamId(); + { + if (Group* group = player->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + teamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + teamIdInInstance = player->GetTeamId(); + } + else + teamIdInInstance = player->GetTeamId(); + } } uint32 entry = data->id1; @@ -115,7 +148,17 @@ public: Map::PlayerList const& players = instance->GetPlayers(); if (!players.IsEmpty()) if (Player* player = players.begin()->GetSource()) - teamIdInInstance = player->GetTeamId(); + { + if (Group* group = player->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + teamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + teamIdInInstance = player->GetTeamId(); + } + else + teamIdInInstance = player->GetTeamId(); + } } switch (creature->GetEntry()) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index 4398b49a2..1fcd8bccf 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -262,7 +262,20 @@ public: void OnPlayerEnter(Player* player) override { if (TeamIdInInstance == TEAM_NEUTRAL) - TeamIdInInstance = player->GetTeamId(); + { + if (Group* group = player->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + TeamIdInInstance = player->GetTeamId(); + } + else + TeamIdInInstance = player->GetTeamId(); + } + + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP)) + player->SetFaction((TeamIdInInstance == TEAM_HORDE) ? 1610 : 1); // for professor putricide hc DoRemoveAurasDueToSpellOnPlayers(SPELL_GAS_VARIABLE); @@ -293,6 +306,12 @@ public: } } + void OnPlayerLeave(Player* player) override + { + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP)) + player->SetFactionForRace(player->getRace()); + } + void OnCreatureCreate(Creature* creature) override { if (TeamIdInInstance == TEAM_NEUTRAL) @@ -300,7 +319,17 @@ public: Map::PlayerList const& players = instance->GetPlayers(); if (!players.IsEmpty()) if (Player* player = players.begin()->GetSource()) - TeamIdInInstance = player->GetTeamId(); + { + if (Group* group = player->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + TeamIdInInstance = player->GetTeamId(); + } + else + TeamIdInInstance = player->GetTeamId(); + } } // apply ICC buff to pets/summons @@ -537,6 +566,7 @@ public: } InstanceScript::OnCreatureCreate(creature); + } void OnCreatureRemove(Creature* creature) override @@ -554,7 +584,17 @@ public: Map::PlayerList const& players = instance->GetPlayers(); if (!players.IsEmpty()) if (Player* player = players.begin()->GetSource()) - TeamIdInInstance = player->GetTeamId(); + { + if (Group* group = player->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + TeamIdInInstance = player->GetTeamId(); + } + else + TeamIdInInstance = player->GetTeamId(); + } } uint32 entry = data->id1; @@ -599,7 +639,17 @@ public: Map::PlayerList const& players = instance->GetPlayers(); if (!players.IsEmpty()) if (Player* player = players.begin()->GetSource()) - TeamIdInInstance = player->GetTeamId(); + { + if (Group* group = player->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + TeamIdInInstance = player->GetTeamId(); + } + else + TeamIdInInstance = player->GetTeamId(); + } } switch (entry) @@ -703,7 +753,17 @@ public: Map::PlayerList const& players = instance->GetPlayers(); if (!players.IsEmpty()) if (Player* player = players.begin()->GetSource()) - TeamIdInInstance = player->GetTeamId(); + { + if (Group* group = player->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + TeamIdInInstance = player->GetTeamId(); + } + else + TeamIdInInstance = player->GetTeamId(); + } } switch (go->GetEntry()) diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp index 658e903f9..28c44cedc 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp @@ -20,6 +20,7 @@ #include "ScriptedCreature.h" #include "nexus.h" #include "Player.h" +#include "Group.h" DoorData const doorData[] = { @@ -48,15 +49,29 @@ public: SetHeaders(DataHeader); SetBossNumber(MAX_ENCOUNTERS); LoadDoorData(doorData); + + TeamIdInInstance = TEAM_NEUTRAL; } void OnCreatureCreate(Creature* creature) override { - Map::PlayerList const& players = instance->GetPlayers(); - TeamId TeamIdInInstance = TEAM_NEUTRAL; - if (!players.IsEmpty()) - if (Player* pPlayer = players.begin()->GetSource()) - TeamIdInInstance = pPlayer->GetTeamId(); + if (TeamIdInInstance == TEAM_NEUTRAL) + { + Map::PlayerList const& players = instance->GetPlayers(); + if (!players.IsEmpty()) + if (Player* pPlayer = players.begin()->GetSource()) + { + if (Group* group = pPlayer->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + TeamIdInInstance = pPlayer->GetTeamId(); + } + else + TeamIdInInstance = pPlayer->GetTeamId(); + } + } switch (creature->GetEntry()) { @@ -88,6 +103,31 @@ public: } } + void OnPlayerEnter(Player* player) override + { + if (TeamIdInInstance == TEAM_NEUTRAL) + { + if (Group* group = player->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + TeamIdInInstance = player->GetTeamId(); + } + else + TeamIdInInstance = player->GetTeamId(); + } + + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP)) + player->SetFaction((TeamIdInInstance == TEAM_HORDE) ? 1610 : 1); + } + + void OnPlayerLeave(Player* player) override + { + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP)) + player->SetFactionForRace(player->getRace()); + } + void OnGameObjectCreate(GameObject* gameObject) override { switch (gameObject->GetEntry()) @@ -154,6 +194,8 @@ public: (*i)->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE); return true; } + protected: + TeamId TeamIdInInstance; }; }; diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp index 03e4c3250..1a137d590 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp @@ -21,6 +21,7 @@ #include "InstanceMapScript.h" #include "InstanceScript.h" #include "shattered_halls.h" +#include "Group.h" ObjectData const creatureData[] = { @@ -66,8 +67,26 @@ public: void OnPlayerEnter(Player* player) override { if (TeamIdInInstance == TEAM_NEUTRAL) - TeamIdInInstance = player->GetTeamId(); + { + if (Group* group = player->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + TeamIdInInstance = player->GetTeamId(); + } + else + TeamIdInInstance = player->GetTeamId(); + } + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP)) + player->SetFaction((TeamIdInInstance == TEAM_HORDE) ? 1610 : 1); + } + + void OnPlayerLeave(Player* player) override + { + if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP)) + player->SetFactionForRace(player->getRace()); } void OnCreatureCreate(Creature* creature) override @@ -77,7 +96,17 @@ public: Map::PlayerList const& players = instance->GetPlayers(); if (!players.IsEmpty()) if (Player* player = players.begin()->GetSource()) - TeamIdInInstance = player->GetTeamId(); + { + if (Group* group = player->GetGroup()) + { + if (Player* gLeader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) + TeamIdInInstance = Player::TeamIdForRace(gLeader->getRace()); + else + TeamIdInInstance = player->GetTeamId(); + } + else + TeamIdInInstance = player->GetTeamId(); + } } switch (creature->GetEntry()) From 3d1efbd4e51e2d5cd73a5cfa35adb0eb4655532d Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 13 Jan 2025 13:47:30 -0300 Subject: [PATCH 28/51] =?UTF-8?q?fix(DB/Conditions):=20Havenshire=20horses?= =?UTF-8?q?=20spellclick=20should=20require=20Grand=E2=80=A6=20(#21154)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../updates/pending_db_world/rev_1736783548288617200.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1736783548288617200.sql diff --git a/data/sql/updates/pending_db_world/rev_1736783548288617200.sql b/data/sql/updates/pending_db_world/rev_1736783548288617200.sql new file mode 100644 index 000000000..faf64b891 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1736783548288617200.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 18) AND (`SourceEntry` = 52263); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(18, 28605, 52263, 0, 0, 9, 0, 12680, 0, 0, 0, 0, 0, '', 'Havenshire Stallion spellclick require Grand Theft Palomino quest taken'), +(18, 28606, 52263, 0, 0, 9, 0, 12680, 0, 0, 0, 0, 0, '', 'Havenshire Mare spellclick require Grand Theft Palomino quest taken'), +(18, 28607, 52263, 0, 0, 9, 0, 12680, 0, 0, 0, 0, 0, '', 'Havenshire Colt spellclick require Grand Theft Palomino quest taken'); From 8bd66612dbb2bad517c6d03e8dc2d7ae67117cd9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 13 Jan 2025 16:48:33 +0000 Subject: [PATCH 29/51] chore(DB): import pending files Referenced commit(s): 3d1efbd4e51e2d5cd73a5cfa35adb0eb4655532d --- .../rev_1736783548288617200.sql => db_world/2025_01_13_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1736783548288617200.sql => db_world/2025_01_13_00.sql} (94%) diff --git a/data/sql/updates/pending_db_world/rev_1736783548288617200.sql b/data/sql/updates/db_world/2025_01_13_00.sql similarity index 94% rename from data/sql/updates/pending_db_world/rev_1736783548288617200.sql rename to data/sql/updates/db_world/2025_01_13_00.sql index faf64b891..33ba5bff6 100644 --- a/data/sql/updates/pending_db_world/rev_1736783548288617200.sql +++ b/data/sql/updates/db_world/2025_01_13_00.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_12_01 -> 2025_01_13_00 -- DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 18) AND (`SourceEntry` = 52263); INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES From 241d05f569e2ab27af8c570e687a26898adbec33 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 13 Jan 2025 17:33:05 -0300 Subject: [PATCH 30/51] fix(Core/Map): Fix crash OnPlayerLeave() (#21155) --- src/server/game/Maps/Map.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 84617f5d3..e68abeef7 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -3040,6 +3040,8 @@ void InstanceMap::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread void InstanceMap::RemovePlayerFromMap(Player* player, bool remove) { + if (instance_data) + instance_data->OnPlayerLeave(player); // pussywizard: moved m_unloadTimer to InstanceMap::AfterPlayerUnlinkFromMap(), in this function if 2 players run out at the same time the instance won't close //if (!m_unloadTimer && m_mapRefMgr.getSize() == 1) // m_unloadTimer = m_unloadWhenEmpty ? MIN_UNLOAD_DELAY : std::max(sWorld->getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY); @@ -3048,9 +3050,6 @@ void InstanceMap::RemovePlayerFromMap(Player* player, bool remove) // If remove == true - player already deleted. if (!remove) player->SetPendingBind(0, 0); - - if (instance_data) - instance_data->OnPlayerLeave(player); } void InstanceMap::AfterPlayerUnlinkFromMap() From 10be6b056fe88ce3193acdd53abd119c305b758a Mon Sep 17 00:00:00 2001 From: Exitare Date: Mon, 13 Jan 2025 18:39:43 -0800 Subject: [PATCH 31/51] fix(DB/SAI): Sunfury Bloodwarder do not intercept anymore (#21147) --- .../updates/pending_db_world/rev_1736654302862534200.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1736654302862534200.sql diff --git a/data/sql/updates/pending_db_world/rev_1736654302862534200.sql b/data/sql/updates/pending_db_world/rev_1736654302862534200.sql new file mode 100644 index 000000000..e7524de6c --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1736654302862534200.sql @@ -0,0 +1,7 @@ +-- Remove intercept from smart AI & add missing Mark of the Sunfury +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 18853) AND (`source_type` = 0) AND (`id` IN (0)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18853, 0, 0, 0, 0, 0, 100, 0, 1000, 2000, 30000, 30000, 0, 0, 11, 35877, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunfury Bloodwarder - In Combat - Cast Mark of the Sunfury'); +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 18850) AND (`source_type` = 0) AND (`id` IN (0)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18850, 0, 0, 0, 0, 0, 100, 0, 1000, 2000, 30000, 30000, 0, 0, 11, 35877, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunfury Guardsman - In Combat - Cast Mark of the Sunfury'); From 88914e6a4827d7eac38e4560a44d6e035553e761 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 Jan 2025 02:40:41 +0000 Subject: [PATCH 32/51] chore(DB): import pending files Referenced commit(s): 10be6b056fe88ce3193acdd53abd119c305b758a --- .../rev_1736654302862534200.sql => db_world/2025_01_14_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1736654302862534200.sql => db_world/2025_01_14_00.sql} (97%) diff --git a/data/sql/updates/pending_db_world/rev_1736654302862534200.sql b/data/sql/updates/db_world/2025_01_14_00.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1736654302862534200.sql rename to data/sql/updates/db_world/2025_01_14_00.sql index e7524de6c..60ef295d4 100644 --- a/data/sql/updates/pending_db_world/rev_1736654302862534200.sql +++ b/data/sql/updates/db_world/2025_01_14_00.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_13_00 -> 2025_01_14_00 -- Remove intercept from smart AI & add missing Mark of the Sunfury DELETE FROM `smart_scripts` WHERE (`entryorguid` = 18853) AND (`source_type` = 0) AND (`id` IN (0)); INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES From 29f91878824e33d56fcfcd1f0ed84e742c7b165c Mon Sep 17 00:00:00 2001 From: FlyingArowana Date: Tue, 14 Jan 2025 10:12:00 +0000 Subject: [PATCH 33/51] fix(DB/page_text) - Added Sniffed Texts to the plaques in Hall of Champions (Scarlet Monastery Armoury) (#21157) co-author @heyitsbench --- .../rev_1736798670655210700.sql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1736798670655210700.sql diff --git a/data/sql/updates/pending_db_world/rev_1736798670655210700.sql b/data/sql/updates/pending_db_world/rev_1736798670655210700.sql new file mode 100644 index 000000000..5e750101e --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1736798670655210700.sql @@ -0,0 +1,17 @@ +-- +-- Removes all the plaque texts. +DELETE FROM `page_text` WHERE `id` IN (2151, 2152, 2153, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178); + +-- Adds the correct plaque texts from the sniff `V 3.4.3.53788` (credits to sniff: @heyitsbench) +INSERT INTO `page_text` (`ID`, `Text`, `NextPageID`, `VerifiedBuild`) VALUES +(2175, "Invar One-Arm$BThe first Chief Assassin of the Scarlet Crusade$BCitizen of Dalaran$BLast seen on the shores of Northrend", 0, 53788), +(2151, "Arellas Fireleaf$BHigh Wizard of the Scarlet Crusade$BCitizen of Quel'Thalas$BLocked in eternal combat with the Necromancer Diesalven", 0, 53788), +(2174, "Holia Sunshield$BDefender of the Scarlet Crusade$BKilled while slaying the Dreadlord Beltheris", 0, 53788), +(2172, "Ferren Marcus$BHigh Abbot of the Scarlet Monastery$BCitizen of Stratholme$BKilled defending the Scarlet Monastery at the First Summertide Assault", 0, 53788), +(2178, "Yana Bloodspear$BThe Second Chief Assassin of the Scarlet Crusade$BCitizen of Dalaran$BLost in the Tirisfal Glades", 0, 53788), +(2176, "Orman of Stromgarde$BThe first Captain General of the Scarlet Crusade$BCitizen of Stromgarde$BLost at the mouth of Icecrown Glacier", 0, 53788), +(2171, "Fellari Swiftarrow$BRanger Captain of the Scarlet Crusade$BCitizen of Quel'Thalas$BLost in the forests of Silverpine", 0, 53788), +(2153, "Dorgar Stoenbrow$BWarrior of the Scarlet Crusade$BLord of the Red Caverns$BLast seen in the Mountains of Alterac", 0, 53788), +(2177, "Valea Twinblades$BWarrior of the Scarlet Crusade$BCitizen of Alterac$BLast seen deep in the Eastern Plaguelands", 0, 53788), +(2173, "Harthal Truesight$BLord Paladin of the Scarlet Crusade$BCitizen of Azeroth - Knight of the Silver Hand$BLast seen entering the cursed city of Stratholme", 0, 53788), +(2152, "Admiral Barean Westwind$BGrand Admiral of the Scarlet Fleet$BCitizen of Kul'Tiras$BLost off the Frozen Coast of Northrend", 0, 53788); From c16af59b5f9f3dbaedb01bc633caca2c4b654f1b Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 14 Jan 2025 07:12:15 -0300 Subject: [PATCH 34/51] fix(Scripts/ZulAman): Store chest count in DB (#21160) --- .../scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp | 9 +++++---- src/server/scripts/EasternKingdoms/ZulAman/zulaman.h | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp index 555c38b7c..d443425eb 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp @@ -112,7 +112,6 @@ public: LoadBossBoundaries(boundaries); LoadDoorData(doorData); LoadSummonData(summonData); - _chestLooted = 0; for (uint8 i = 0; i < RAND_VENDOR; ++i) RandVendor[i] = NOT_STARTED; @@ -211,7 +210,10 @@ public: _akilzonGauntlet = DONE; } else if (type == DATA_CHEST_LOOTED) - ++_chestLooted; + { + uint8 chestCount = GetPersistentData(DATA_CHEST_COUNT); + StorePersistentData(DATA_CHEST_COUNT, ++chestCount); + } } void StartAkilzonGauntlet() @@ -337,7 +339,7 @@ public: else if (type == TYPE_AKILZON_GAUNTLET) return _akilzonGauntlet; else if (type == DATA_CHEST_LOOTED) - return _chestLooted; + return GetPersistentData(DATA_CHEST_COUNT); return 0; } @@ -348,7 +350,6 @@ public: } private: - uint16 _chestLooted; uint32 RandVendor[RAND_VENDOR]; GuidSet AkilzonTrash; EncounterState _akilzonGauntlet = NOT_STARTED; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h index 1004be12f..444da72d0 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h @@ -90,14 +90,17 @@ enum GameobjectIds enum MiscIds { + // Persistent data DATA_TIMED_RUN = 0, + DATA_CHEST_COUNT = 1, + ACTION_START_TIMED_RUN = 0, ACTION_START_AKILZON_GAUNTLET = 1, ACTION_RESET_AKILZON_GAUNTLET = 2, GROUP_TIMED_RUN = 1 }; -uint32 constexpr PersistentDataCount = 1; +uint32 constexpr PersistentDataCount = 2; template inline AI* GetZulAmanAI(T* obj) From f4534e256a18577da22737337c2b4aabec2ec347 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 Jan 2025 10:13:03 +0000 Subject: [PATCH 35/51] chore(DB): import pending files Referenced commit(s): 29f91878824e33d56fcfcd1f0ed84e742c7b165c --- .../rev_1736798670655210700.sql => db_world/2025_01_14_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1736798670655210700.sql => db_world/2025_01_14_01.sql} (97%) diff --git a/data/sql/updates/pending_db_world/rev_1736798670655210700.sql b/data/sql/updates/db_world/2025_01_14_01.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1736798670655210700.sql rename to data/sql/updates/db_world/2025_01_14_01.sql index 5e750101e..78a85f222 100644 --- a/data/sql/updates/pending_db_world/rev_1736798670655210700.sql +++ b/data/sql/updates/db_world/2025_01_14_01.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_14_00 -> 2025_01_14_01 -- -- Removes all the plaque texts. DELETE FROM `page_text` WHERE `id` IN (2151, 2152, 2153, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178); From b1d72f14a7c9e9bf8a4b4b78461a9aef7313d53f Mon Sep 17 00:00:00 2001 From: Rocco Silipo <108557877+Rorschach91@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:23:32 +0100 Subject: [PATCH 36/51] fix(DB/Creature) Remove double Nerub'ar Victims and set a Crystalline Tender movement type to 0. (#21153) --- data/sql/updates/pending_db_world/Nerub_ar_Victim.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 data/sql/updates/pending_db_world/Nerub_ar_Victim.sql diff --git a/data/sql/updates/pending_db_world/Nerub_ar_Victim.sql b/data/sql/updates/pending_db_world/Nerub_ar_Victim.sql new file mode 100644 index 000000000..a8e411123 --- /dev/null +++ b/data/sql/updates/pending_db_world/Nerub_ar_Victim.sql @@ -0,0 +1,6 @@ + +-- Delete Double Nerub'ar Victims +DELETE FROM `creature` WHERE (`id1` = 25284) AND (`guid` IN (143230, 143231, 143232, 143263, 143264, 143268, 143269, 143271, 143272, 143273)); + +-- Set MT to 0 for a Crystalline Tender inside The Nexus (dungeon). +UPDATE `creature` SET `MovementType` = 0 WHERE (`id1` = 28231) AND (`guid` IN (126441)); From 1fdc887780898f93ccb55e9e5b0116f0720c491a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 Jan 2025 10:24:32 +0000 Subject: [PATCH 37/51] chore(DB): import pending files Referenced commit(s): b1d72f14a7c9e9bf8a4b4b78461a9aef7313d53f --- .../Nerub_ar_Victim.sql => db_world/2025_01_14_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/Nerub_ar_Victim.sql => db_world/2025_01_14_02.sql} (88%) diff --git a/data/sql/updates/pending_db_world/Nerub_ar_Victim.sql b/data/sql/updates/db_world/2025_01_14_02.sql similarity index 88% rename from data/sql/updates/pending_db_world/Nerub_ar_Victim.sql rename to data/sql/updates/db_world/2025_01_14_02.sql index a8e411123..d8f408161 100644 --- a/data/sql/updates/pending_db_world/Nerub_ar_Victim.sql +++ b/data/sql/updates/db_world/2025_01_14_02.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_14_01 -> 2025_01_14_02 -- Delete Double Nerub'ar Victims DELETE FROM `creature` WHERE (`id1` = 25284) AND (`guid` IN (143230, 143231, 143232, 143263, 143264, 143268, 143269, 143271, 143272, 143273)); From 995eed88a5b0ab0d618ad832366e5c2c23df5d3d Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Tue, 14 Jan 2025 12:22:37 +0100 Subject: [PATCH 38/51] fix(Scripts/ZulAman): Akilzon Gauntlet hyperspawn, handling Eagle Trash Triggers (#21129) --- .../rev_1736530112429984785.sql | 2 ++ .../ZulAman/instance_zulaman.cpp | 17 ++++++++++++ .../EasternKingdoms/ZulAman/zulaman.cpp | 26 ++++++++++++++++++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 data/sql/updates/pending_db_world/rev_1736530112429984785.sql diff --git a/data/sql/updates/pending_db_world/rev_1736530112429984785.sql b/data/sql/updates/pending_db_world/rev_1736530112429984785.sql new file mode 100644 index 000000000..049a8e315 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1736530112429984785.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `ScriptName` = 'npc_eagle_trash_aggro_trigger' WHERE (`entry` = 24223); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp index d443425eb..4ac563b7b 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp @@ -251,6 +251,23 @@ public: creature->Respawn(true); } + void OnUnitDeath(Unit* unit) override + { + Creature* creature = unit->ToCreature(); + if (!creature) + return; + + switch (creature->GetEntry()) + { + case NPC_AMINISHI_PROTECTOR: + case NPC_AMANISHI_WIND_WALKER: + if (_akilzonGauntlet == NOT_STARTED && AkilzonTrash.contains(creature->GetGUID())) + creature->DespawnOrUnsummon(30s, 1s); + default: + break; + } + } + void OnCreatureEvade(Creature* creature) override { switch (creature->GetEntry()) diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index ecc4ec01a..bbe60ba86 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -561,7 +561,7 @@ struct npc_amanishi_lookout : public NullCreatureAI void MoveInLineOfSight(Unit* who) override { - if (!me->IsWithinDist(who, 25.0f, false)) // distance not confirmed + if (!me->IsWithinDist(who, me->GetAggroRange(who), false)) return; Player* player = who->GetCharmerOrOwnerPlayerOrPlayerItself(); @@ -596,6 +596,29 @@ private: InstanceScript* _instance; }; +struct npc_eagle_trash_aggro_trigger : public ScriptedAI +{ + npc_eagle_trash_aggro_trigger(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) {} + + void MoveInLineOfSight(Unit* who) override + { + if (who->GetLevel() > 70) + return; + + if (!me->IsWithinDist(who, me->GetAggroRange(who), false)) + return; + + Player* player = who->GetCharmerOrOwnerPlayerOrPlayerItself(); + if (!player || player->IsGameMaster()) + return; + + if (_instance->GetData(TYPE_AKILZON_GAUNTLET) == NOT_STARTED) + _instance->SetData(TYPE_AKILZON_GAUNTLET, IN_PROGRESS); + } +private: + InstanceScript* _instance; +}; + enum AmanishiTempest { GROUP_AKILZON_GAUNTLET = 1, @@ -845,6 +868,7 @@ void AddSC_zulaman() RegisterZulAmanCreatureAI(npc_harrison_jones); RegisterSpellScript(spell_ritual_of_power); RegisterZulAmanCreatureAI(npc_amanishi_lookout); + RegisterZulAmanCreatureAI(npc_eagle_trash_aggro_trigger); RegisterZulAmanCreatureAI(npc_amanishi_tempest); RegisterZulAmanCreatureAI(npc_amanishi_scout); RegisterSpellScript(spell_alert_drums); From ee0525843a69b2db1ea3c244e930ba691999a322 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 Jan 2025 11:23:36 +0000 Subject: [PATCH 39/51] chore(DB): import pending files Referenced commit(s): 995eed88a5b0ab0d618ad832366e5c2c23df5d3d --- .../rev_1736530112429984785.sql => db_world/2025_01_14_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1736530112429984785.sql => db_world/2025_01_14_03.sql} (70%) diff --git a/data/sql/updates/pending_db_world/rev_1736530112429984785.sql b/data/sql/updates/db_world/2025_01_14_03.sql similarity index 70% rename from data/sql/updates/pending_db_world/rev_1736530112429984785.sql rename to data/sql/updates/db_world/2025_01_14_03.sql index 049a8e315..e36ac78b4 100644 --- a/data/sql/updates/pending_db_world/rev_1736530112429984785.sql +++ b/data/sql/updates/db_world/2025_01_14_03.sql @@ -1,2 +1,3 @@ +-- DB update 2025_01_14_02 -> 2025_01_14_03 -- UPDATE `creature_template` SET `ScriptName` = 'npc_eagle_trash_aggro_trigger' WHERE (`entry` = 24223); From 6c4db8e667e39355994a0708242a5ae0d2626597 Mon Sep 17 00:00:00 2001 From: Rocco Silipo <108557877+Rorschach91@users.noreply.github.com> Date: Tue, 14 Jan 2025 17:50:10 +0100 Subject: [PATCH 40/51] fix(DB/Creature) Solve some npc problems along the road to Drakos. (#21152) --- .../pending_db_world/The_Oculus_Trashes.sql | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 data/sql/updates/pending_db_world/The_Oculus_Trashes.sql diff --git a/data/sql/updates/pending_db_world/The_Oculus_Trashes.sql b/data/sql/updates/pending_db_world/The_Oculus_Trashes.sql new file mode 100644 index 000000000..4f69fd562 --- /dev/null +++ b/data/sql/updates/pending_db_world/The_Oculus_Trashes.sql @@ -0,0 +1,93 @@ + +-- Add Waypoint. +DELETE FROM `waypoint_data` WHERE `id` IN (10041400); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(10041400, 1, 1142.7643, 977.347, 361.2085, NULL, 0, 0, 0, 100, 0), +(10041400, 2, 1155.1647, 984.28235, 361.20853, NULL, 0, 0, 0, 100, 0), +(10041400, 3, 1166.8981, 993.3729, 361.2085, NULL, 0, 0, 0, 100, 0), +(10041400, 4, 1174.3507, 1003.2168, 361.20853, NULL, 0, 0, 0, 100, 0), +(10041400, 5, 1179.8309, 1016.7469, 361.20847, NULL, 0, 0, 0, 100, 0), +(10041400, 6, 1181.4456, 1026.8712, 361.20853, NULL, 0, 0, 0, 100, 0), +(10041400, 7, 1179.8309, 1016.7469, 361.20847, NULL, 0, 0, 0, 100, 0), +(10041400, 8, 1174.3507, 1003.2168, 361.20853, NULL, 0, 0, 0, 100, 0), +(10041400, 9, 1166.8981, 993.3729, 361.2085, NULL, 0, 0, 0, 100, 0), +(10041400, 10, 1155.1647, 984.28235, 361.20853, NULL, 0, 0, 0, 100, 0), +(10041400, 11, 1142.7643, 977.347, 361.2085, NULL, 0, 0, 0, 100, 0), +(10041400, 12, 1123.0382, 971.89996, 361.30014, NULL, 0, 0, 0, 100, 0); + +-- Change WD, MT, Position for an Azure Inquisitor. +UPDATE `creature` SET `wander_distance` = 0, `MovementType` = 2, `position_x` = 1123.0382, `position_y` = 971.89996, `position_z` = 361.30014, `orientation` = 3.4109 WHERE `guid` IN (100414) AND `id1` = 27633; + +-- Create new Azure Spellbinders. +DELETE FROM `creature` WHERE (`id1` = 27635) AND (`guid` IN (100400, 100402, 100404)); +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES +(100400, 27635, 0, 0, 578, 0, 0, 3, 1, 1, 1123.0382, 971.89996, 361.30014, 3.4109, 3600, 0, 0, 48700, 19465, 2, 0, 0, 0, '', 0, 0, NULL), +(100402, 27635, 0, 0, 578, 0, 0, 3, 1, 1, 1183, 1037.33, 361.07, 3.93238, 3600, 2, 0, 48700, 19465, 1, 0, 0, 0, '', 0, 0, NULL), +(100404, 27635, 0, 0, 578, 0, 0, 3, 1, 1, 1094.9, 1127.86, 361.07, 4.98004, 3600, 2, 0, 48700, 19465, 1, 0, 0, 0, '', 0, 0, NULL); + +-- Create new Azure Inquisitors. +DELETE FROM `creature` WHERE (`id1` = 27633) AND (`guid` IN (100405, 100406, 100409)); +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES +(100405, 27633, 0, 0, 578, 0, 0, 3, 1, 1, 1179.05, 1068.18, 361.07, 3.20184, 3600, 5, 0, 48700, 0, 1, 0, 0, 0, '', 0), +(100406, 27633, 0, 0, 578, 0, 0, 3, 1, 1, 1181.48, 1070.53, 361.07, 4.55913, 3600, 5, 0, 48700, 0, 1, 0, 0, 0, '', 0), +(100409, 27633, 0, 0, 578, 0, 0, 3, 1, 1, 1107.68, 1132.91, 361.07, 2.17407, 3600, 5, 0, 48700, 0, 1, 0, 0, 0, '', 0); + +-- Set waypoint for an Azure Inquisitor and Spellbinder. +DELETE FROM `creature_addon` WHERE (`guid` IN (100414, 100400)); +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(100414, 10041400, 0, 0, 0, 0, 0, NULL), +(100400, 10041400, 0, 0, 0, 0, 0, NULL); + +-- Create Groups. +DELETE FROM `pool_template` WHERE (`entry` IN (22408, 22409, 22410, 22411, 22412, 22413)); +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(22408, 1, 'Azure Spellbinder/Inquisitor 1'), +(22409, 1, 'Azure Spellbinder/Inquisitor 2'), +(22410, 1, 'Azure Spellbinder/Inquisitor 3'), +(22411, 1, 'Azure Spellbinder/Inquisitor 4'), +(22412, 1, 'Azure Spellbinder/Inquisitor 5'), +(22413, 1, 'Azure Spellbinder/Inquisitor 6'); + +DELETE FROM `pool_creature` WHERE (`pool_entry` IN (22408, 22409, 22410, 22411, 22412, 22413)) AND (`guid` IN (100405, 100418, 100406, 100416, 100409, 100419, 100411, 100404, 100414, 100400, 100415, 100402)); +INSERT INTO `pool_creature` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(100405, 22408, 0, 'Azure Spellbinder/Inquisitor (1-2)'), +(100418, 22408, 0, 'Azure Spellbinder/Inquisitor (2-2)'), +(100406, 22409, 0, 'Azure Spellbinder/Inquisitor (1-2)'), +(100416, 22409, 0, 'Azure Spellbinder/Inquisitor (2-2)'), +(100409, 22410, 0, 'Azure Spellbinder/Inquisitor (1-2)'), +(100419, 22410, 0, 'Azure Spellbinder/Inquisitor (2-2)'), +(100411, 22411, 0, 'Azure Spellbinder/Inquisitor (1-2)'), +(100404, 22411, 0, 'Azure Spellbinder/Inquisitor (2-2)'), +(100414, 22412, 0, 'Azure Spellbinder/Inquisitor (1-2)'), +(100400, 22412, 0, 'Azure Spellbinder/Inquisitor (2-2)'), +(100415, 22413, 0, 'Azure Spellbinder/Inquisitor (1-2)'), +(100402, 22413, 0, 'Azure Spellbinder/Inquisitor (2-2)'); + +-- Change SmartAI for Azure Ley-Whelp +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27636; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27636); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(27636, 0, 0, 0, 0, 0, 100, 2, 0, 0, 2000, 2000, 0, 0, 11, 50705, 64, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Ley-Whelp - In Combat - Cast \'Arcane Bolt\' (Normal Dungeon)'), +(27636, 0, 1, 0, 0, 0, 100, 4, 0, 0, 2000, 2000, 0, 0, 11, 59210, 66, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Ley-Whelp - In Combat - Cast \'Arcane Bolt\' (Heroic Dungeon)'); + +-- Change SmartAI for Azure Spellbinder +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27635; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27635); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(27635, 0, 0, 0, 0, 0, 100, 2, 5000, 7000, 5000, 7000, 0, 0, 11, 50702, 64, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Spellbinder - In Combat - Cast \'Arcane Volley\' (Normal Dungeon)'), +(27635, 0, 1, 0, 0, 0, 100, 4, 5000, 7000, 5000, 7000, 0, 0, 11, 59212, 64, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Spellbinder - In Combat - Cast \'Arcane Volley\' (Heroic Dungeon)'), +(27635, 0, 2, 0, 0, 0, 100, 2, 6000, 9000, 6000, 9000, 0, 0, 11, 38047, 64, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Spellbinder - In Combat - Cast \'Mind Warp\' (Normal Dungeon)'), +(27635, 0, 3, 0, 0, 0, 100, 4, 6000, 9000, 6000, 9000, 0, 0, 11, 50566, 64, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Spellbinder - In Combat - Cast \'Mind Warp\' (Heroic Dungeon)'), +(27635, 0, 4, 0, 0, 0, 100, 6, 9000, 12000, 4000, 8000, 0, 0, 11, 50572, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Spellbinder - In Combat - Cast \'Power Sap\' (Dungeon)'); + +-- Change SmartAI for Azure Inquisitor +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27633; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27633); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(27633, 0, 0, 0, 106, 0, 100, 2, 5000, 7000, 5000, 7000, 5, 30, 11, 51454, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Inquisitor - On Hostile in Range - Cast \'Throw\' (Normal Dungeon)'), +(27633, 0, 1, 0, 106, 0, 100, 4, 5000, 7000, 5000, 7000, 5, 30, 11, 59209, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Inquisitor - On Hostile in Range - Cast \'Throw\' (Heroic Dungeon)'), +(27633, 0, 2, 0, 106, 0, 100, 6, 14000, 20000, 14000, 20000, 0, 10, 11, 50690, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Inquisitor - On Hostile in Range - Cast \'Immobilizing Field\' (Dungeon)'), +(27633, 0, 3, 0, 0, 0, 100, 6, 4000, 7000, 9000, 12000, 0, 0, 11, 50573, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Inquisitor - In Combat - Cast \'Arcane Cleave\' (Dungeon)'); From c0979337e21ed0be2bf8050a804d3c504285d5d4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 Jan 2025 16:51:11 +0000 Subject: [PATCH 41/51] chore(DB): import pending files Referenced commit(s): 6c4db8e667e39355994a0708242a5ae0d2626597 --- .../The_Oculus_Trashes.sql => db_world/2025_01_14_04.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/The_Oculus_Trashes.sql => db_world/2025_01_14_04.sql} (99%) diff --git a/data/sql/updates/pending_db_world/The_Oculus_Trashes.sql b/data/sql/updates/db_world/2025_01_14_04.sql similarity index 99% rename from data/sql/updates/pending_db_world/The_Oculus_Trashes.sql rename to data/sql/updates/db_world/2025_01_14_04.sql index 4f69fd562..11c4203f4 100644 --- a/data/sql/updates/pending_db_world/The_Oculus_Trashes.sql +++ b/data/sql/updates/db_world/2025_01_14_04.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_14_03 -> 2025_01_14_04 -- Add Waypoint. DELETE FROM `waypoint_data` WHERE `id` IN (10041400); From ea63eb6e02b6b3b50ea0d9cbfb30fcd2ee0caf0a Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 14 Jan 2025 17:44:18 -0300 Subject: [PATCH 42/51] fix(DB/SAI): Amani'shi Berserker SAI (#21165) --- .../updates/pending_db_world/rev_1736878480882390600.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1736878480882390600.sql diff --git a/data/sql/updates/pending_db_world/rev_1736878480882390600.sql b/data/sql/updates/pending_db_world/rev_1736878480882390600.sql new file mode 100644 index 000000000..4872d815a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1736878480882390600.sql @@ -0,0 +1,6 @@ +-- +UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256, `AIName` = 'SmartAI' WHERE `entry` = 24374; +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 24374) AND (`source_type` = 0) AND (`id` IN (0, 1)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(24374, 0, 0, 0, 0, 0, 100, 0, 3000, 6000, 12000, 24000, 0, 0, 11, 43673, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani\'shi Berserker - In Combat - Cast \'Mighty Blow\''), +(24374, 0, 1, 0, 2, 0, 100, 1, 0, 20, 1000, 1000, 0, 0, 11, 28747, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani\'shi Berserker - Between 0-20% Health - Cast \'Frenzy\' (No Repeat)'); From 070fbd58b9b52708c6e8ba1621ce53ccdc3f6f38 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 Jan 2025 20:45:17 +0000 Subject: [PATCH 43/51] chore(DB): import pending files Referenced commit(s): ea63eb6e02b6b3b50ea0d9cbfb30fcd2ee0caf0a --- .../rev_1736878480882390600.sql => db_world/2025_01_14_05.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1736878480882390600.sql => db_world/2025_01_14_05.sql} (96%) diff --git a/data/sql/updates/pending_db_world/rev_1736878480882390600.sql b/data/sql/updates/db_world/2025_01_14_05.sql similarity index 96% rename from data/sql/updates/pending_db_world/rev_1736878480882390600.sql rename to data/sql/updates/db_world/2025_01_14_05.sql index 4872d815a..4c2e13f73 100644 --- a/data/sql/updates/pending_db_world/rev_1736878480882390600.sql +++ b/data/sql/updates/db_world/2025_01_14_05.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_14_04 -> 2025_01_14_05 -- UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256, `AIName` = 'SmartAI' WHERE `entry` = 24374; DELETE FROM `smart_scripts` WHERE (`entryorguid` = 24374) AND (`source_type` = 0) AND (`id` IN (0, 1)); From a1cf6a7cebb9bd5855114e267834fe34585d9b2f Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Wed, 15 Jan 2025 02:09:07 +0100 Subject: [PATCH 44/51] fix(Scripts/ZulAman): Zul'Jin reduce procs of Energy Storm Aura (#21169) --- data/sql/updates/pending_db_world/rev_1736879270259477703.sql | 3 +++ src/server/scripts/Spells/spell_generic.cpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 data/sql/updates/pending_db_world/rev_1736879270259477703.sql diff --git a/data/sql/updates/pending_db_world/rev_1736879270259477703.sql b/data/sql/updates/pending_db_world/rev_1736879270259477703.sql new file mode 100644 index 000000000..055affbbb --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1736879270259477703.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id`=43983 AND `ScriptName`='spell_gen_allow_proc_from_spells_with_cost'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES(43983, 'spell_gen_allow_proc_from_spells_with_cost'); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 8ce23ac5f..a790ef65c 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -340,7 +340,8 @@ private: /* 55640 - Lightweave Embroidery 67698 - Item - Coliseum 25 Normal Healer Trinket 67752 - Item - Coliseum 25 Heroic Healer Trinket - 69762 - Unchained Magic */ + 69762 - Unchained Magic + 43983 - Energy Storm */ class spell_gen_allow_proc_from_spells_with_cost : public AuraScript { PrepareAuraScript(spell_gen_allow_proc_from_spells_with_cost); From 65b155e6a429f1e7a9f40a8f7ac5bf04093623a8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 Jan 2025 01:10:08 +0000 Subject: [PATCH 45/51] chore(DB): import pending files Referenced commit(s): a1cf6a7cebb9bd5855114e267834fe34585d9b2f --- .../rev_1736879270259477703.sql => db_world/2025_01_15_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1736879270259477703.sql => db_world/2025_01_15_00.sql} (84%) diff --git a/data/sql/updates/pending_db_world/rev_1736879270259477703.sql b/data/sql/updates/db_world/2025_01_15_00.sql similarity index 84% rename from data/sql/updates/pending_db_world/rev_1736879270259477703.sql rename to data/sql/updates/db_world/2025_01_15_00.sql index 055affbbb..33e056481 100644 --- a/data/sql/updates/pending_db_world/rev_1736879270259477703.sql +++ b/data/sql/updates/db_world/2025_01_15_00.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_14_05 -> 2025_01_15_00 -- DELETE FROM `spell_script_names` WHERE `spell_id`=43983 AND `ScriptName`='spell_gen_allow_proc_from_spells_with_cost'; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES(43983, 'spell_gen_allow_proc_from_spells_with_cost'); From 1db36de3502833faef3d0b6422db84da34c3f3c9 Mon Sep 17 00:00:00 2001 From: Exitare Date: Tue, 14 Jan 2025 18:51:55 -0800 Subject: [PATCH 46/51] fix(DB/Spell): fix item "Blessed Medallion of Karabor" (#20948) Co-authored-by: Grimdhex <176165533+Grimdhex@users.noreply.github.com> --- .../sql/updates/pending_db_world/rev_1734414765273447900.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1734414765273447900.sql diff --git a/data/sql/updates/pending_db_world/rev_1734414765273447900.sql b/data/sql/updates/pending_db_world/rev_1734414765273447900.sql new file mode 100644 index 000000000..65e5e8745 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1734414765273447900.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `spell_target_position` WHERE `ID` = 41234 AND `EffectIndex` = 0; + +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`) +VALUES (41234, 0, 0, -3560.6572, 582.82887, 10.987, 4.768543); From 04ddc1858117252111667627393ae7b7f29a58f6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 Jan 2025 02:52:57 +0000 Subject: [PATCH 47/51] chore(DB): import pending files Referenced commit(s): 1db36de3502833faef3d0b6422db84da34c3f3c9 --- .../rev_1734414765273447900.sql => db_world/2025_01_15_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1734414765273447900.sql => db_world/2025_01_15_01.sql} (85%) diff --git a/data/sql/updates/pending_db_world/rev_1734414765273447900.sql b/data/sql/updates/db_world/2025_01_15_01.sql similarity index 85% rename from data/sql/updates/pending_db_world/rev_1734414765273447900.sql rename to data/sql/updates/db_world/2025_01_15_01.sql index 65e5e8745..4e675e2ac 100644 --- a/data/sql/updates/pending_db_world/rev_1734414765273447900.sql +++ b/data/sql/updates/db_world/2025_01_15_01.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_15_00 -> 2025_01_15_01 -- DELETE FROM `spell_target_position` WHERE `ID` = 41234 AND `EffectIndex` = 0; From d234af1d728d2a24edceafe132adf3574b20a83e Mon Sep 17 00:00:00 2001 From: Rocco Silipo <108557877+Rorschach91@users.noreply.github.com> Date: Wed, 15 Jan 2025 08:42:58 +0100 Subject: [PATCH 48/51] fix(DB/Creature) Some Borean Tundra npcs now have a smartai. (#21171) --- .../pending_db_world/Borean_Tundra_npcs.sql | 285 ++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 data/sql/updates/pending_db_world/Borean_Tundra_npcs.sql diff --git a/data/sql/updates/pending_db_world/Borean_Tundra_npcs.sql b/data/sql/updates/pending_db_world/Borean_Tundra_npcs.sql new file mode 100644 index 000000000..e7a8bb180 --- /dev/null +++ b/data/sql/updates/pending_db_world/Borean_Tundra_npcs.sql @@ -0,0 +1,285 @@ + +-- Nerub'ar Corpse Harvester +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25445; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25445); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25445, 0, 0, 0, 0, 0, 100, 0, 5000, 10000, 15000, 18000, 0, 0, 11, 6917, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Nerub\'ar Corpse Harvester - In Combat - Cast \'Venom Spit\''); + +-- Nerub'ar Web Lord +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25294; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25294); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25294, 0, 0, 0, 0, 0, 100, 0, 4000, 5000, 14000, 16000, 0, 0, 11, 50284, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Nerub\'ar Web Lord - In Combat - Cast \'Blinding Swarm\''); + +-- Unliving Swine +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25600; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25600); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25600, 0, 0, 0, 9, 0, 100, 0, 1000, 2000, 10000, 15000, 0, 3, 11, 50303, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Unliving Swine - Within 0-3 Range - Cast \'Swine Flu\''); + +-- En'Kilah Necrolord +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25609; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25609); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25609, 0, 0, 0, 0, 0, 100, 0, 2000, 3000, 8000, 10000, 0, 0, 11, 50324, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'En\'kilah Necrolord - In Combat - Cast \'Bone Armor\''), +(25609, 0, 1, 0, 0, 0, 100, 0, 4000, 5000, 5000, 8000, 0, 0, 11, 50323, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'En\'kilah Necrolord - In Combat - Cast \'Sharpened Bone\''); + +-- Bloodspore Moth +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25464; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25464); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25464, 0, 0, 0, 0, 0, 100, 0, 5000, 7000, 20000, 25000, 0, 0, 11, 32914, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodspore Moth - In Combat - Cast \'Wing Buffet\''); + +-- Skadir Mariner +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25523; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25523); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25523, 0, 0, 0, 0, 0, 100, 0, 5000, 6000, 15000, 20000, 0, 0, 11, 13730, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Skadir Mariner - In Combat - Cast \'Demoralizing Shout\''), +(25523, 0, 1, 0, 0, 0, 100, 0, 5000, 8000, 25000, 30000, 0, 0, 11, 10966, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Skadir Mariner - In Combat - Cast \'Uppercut\''); + +-- Skadir Runecaster +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25520; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25520); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25520, 0, 0, 0, 0, 0, 100, 0, 3000, 5000, 30000, 30000, 0, 0, 11, 49871, 32, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Skadir Runecaster - In Combat - Cast \'Rune of Retribution\''), +(25520, 0, 1, 0, 0, 0, 100, 0, 5000, 7000, 6000, 8000, 0, 0, 11, 9532, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Skadir Runecaster - In Combat - Cast \'Lightning Bolt\''); + +-- Gamel the Cruel +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26449; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26449); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(26449, 0, 0, 0, 0, 0, 100, 0, 5000, 8000, 8000, 15000, 0, 0, 11, 19643, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gamel the Cruel - In Combat - Cast \'Mortal Strike\''); + +-- Ragnar Drakkarlund +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26451; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26451); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(26451, 0, 0, 0, 0, 0, 100, 0, 6000, 8000, 8000, 12000, 0, 0, 11, 41056, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ragnar Drakkarlund - In Combat - Cast \'Whirlwind\''); + +-- Glacial Ancient +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25709; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25709); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25709, 0, 0, 0, 0, 0, 100, 0, 8000, 10000, 12000, 16000, 0, 0, 11, 50505, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Glacial Ancient - In Combat - Cast \'Frost Breath\''); + +-- Coldarra Scalesworn +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25717; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25717); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25717, 0, 0, 0, 0, 0, 100, 0, 12000, 15000, 12000, 15000, 0, 0, 11, 12748, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coldarra Scalesworn - In Combat - Cast \'Frost Nova\''), +(25717, 0, 1, 0, 0, 0, 100, 0, 12000, 15000, 12000, 15000, 0, 0, 11, 11977, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Coldarra Scalesworn - In Combat - Cast \'Rend\''); + +-- Crypt Crawler +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25227; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25227); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25227, 0, 0, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 0, 0, 11, 31600, 64, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Crypt Crawler - In Combat - Cast \'Crypt Scarabs\''); + +-- Scourged Footman +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25981; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25981); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25981, 0, 0, 0, 0, 0, 100, 0, 4000, 5000, 3000, 8000, 0, 0, 11, 32736, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scourged Footman - In Combat - Cast \'Mortal Strike\''); + +-- Ziggurat Defender +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26202; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26202); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(26202, 0, 0, 1, 0, 0, 100, 0, 4000, 5000, 10000, 15000, 0, 0, 11, 50306, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ziggurat Defender - In Combat - Cast \'Thrash Kick\''); + +-- Clam Master K +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25800; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25800); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25800, 0, 0, 0, 9, 0, 100, 0, 5000, 10000, 10000, 15000, 0, 5, 11, 49711, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Clam Master K - Within 0-5 Range - Cast \'Hooked Net\''), +(25800, 0, 1, 0, 9, 0, 100, 0, 1000, 2000, 2000, 2000, 5, 60, 11, 54431, 64, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Clam Master K - Within 5-60 Range - Cast \'Throw Spear\''); + +-- Nerub'ar Warrior +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25619; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25619); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25619, 0, 0, 0, 9, 0, 100, 0, 1000, 1000, 1000, 1000, 8, 25, 11, 50347, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Nerub\'ar Warrior - Within 8-25 Range - Cast \'Rush\''); + +-- Nerub'ar Tunneler +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25622; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25622); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25622, 0, 0, 0, 0, 0, 100, 0, 12000, 15000, 12000, 15000, 0, 0, 11, 50364, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nerub\'ar Tunneler - In Combat - Cast \'Rock Shield\''); + +-- Claximus +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25209; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25209); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25209, 0, 0, 0, 0, 0, 100, 0, 2000, 3000, 15000, 20000, 0, 0, 11, 50275, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Claximus - In Combat - Cast \'Stabilized Magic\''), +(25209, 0, 1, 0, 0, 0, 100, 0, 2000, 3000, 2000, 10000, 0, 0, 11, 50273, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Claximus - In Combat - Cast \'Arcane Barrage\''); + +-- Kaganishu +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25427; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25427); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25427, 0, 0, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 0, 0, 11, 19816, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaganishu - In Combat - Cast \'Fireball\''), +(25427, 0, 1, 0, 106, 0, 100, 0, 1000, 2000, 35000, 45000, 0, 10, 11, 15744, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kaganishu - On Hostile in Range - Cast \'Blast Wave\''); + +-- Magmoth Crusher +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25434; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25434); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25434, 0, 0, 0, 6, 0, 100, 513, 0, 0, 0, 0, 0, 0, 33, 25505, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Magmoth Crusher - On Just Died - Quest Credit \'null\' (No Repeat)'), +(25434, 0, 1, 0, 0, 0, 100, 0, 8000, 10000, 20000, 25000, 0, 0, 11, 50410, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Magmoth Crusher - In Combat - Cast \'Tusk Strike\''), +(25434, 0, 2, 0, 106, 0, 100, 0, 2000, 2000, 15000, 20000, 10, 100, 11, 50413, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Magmoth Crusher - On Hostile in Range - Cast \'Magnataur Charge\''); + +-- Tundra Crawler +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25454; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25454); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25454, 0, 0, 0, 0, 0, 100, 0, 10000, 12000, 12000, 15000, 0, 0, 11, 50293, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tundra Crawler - In Combat - Cast \'Corrosive Poison\''); + +-- Plagued Magnataur +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25615; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25615); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25615, 0, 0, 0, 0, 0, 100, 0, 3000, 5000, 30000, 30000, 0, 0, 11, 50366, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Plagued Magnataur - In Combat - Cast \'Plague Cloud\''); + +-- Talramas Abomination +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25684; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25684); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25684, 0, 0, 0, 0, 0, 100, 0, 3000, 5000, 30000, 30000, 0, 0, 11, 50366, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Talramas Abomination - In Combat - Cast \'Plague Cloud\''); + +-- Gorloc Gibberer +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25686; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25686); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25686, 0, 0, 0, 0, 0, 100, 0, 2000, 3000, 6000, 12000, 0, 0, 11, 50520, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorloc Gibberer - In Combat - Cast \'Deep Dredge\''); + +-- Gorloc Steam Belcher +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25687; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25687); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25687, 0, 0, 0, 0, 0, 100, 0, 4000, 6000, 8000, 12000, 0, 0, 11, 50538, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorloc Steam Belcher - In Combat - Cast \'Belch Blast\''); + +-- Gorloc Waddler +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25685; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25685); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25685, 0, 0, 0, 0, 0, 100, 0, 3000, 5000, 15000, 20000, 0, 0, 11, 50522, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorloc Waddler - In Combat - Cast \'Gorloc Stomp\''); + +-- Gorloc Mud Splasher +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25699; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25699); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25699, 0, 0, 0, 0, 0, 100, 0, 3000, 5000, 15000, 20000, 0, 0, 11, 50522, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorloc Waddler - In Combat - Cast \'Gorloc Stomp\''); + +-- Gorloc Dredger +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25701; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25701); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25701, 0, 0, 0, 0, 0, 100, 0, 2000, 3000, 6000, 12000, 0, 0, 11, 50520, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gorloc Gibberer - In Combat - Cast \'Deep Dredge\''); + +-- En'kilah Abomination +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25383; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25383); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25383, 0, 0, 0, 0, 0, 100, 0, 4000, 6000, 6000, 12000, 0, 0, 11, 40504, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'En\'kilah Abomination - In Combat - Cast \'Cleave\''), +(25383, 0, 1, 0, 9, 0, 100, 0, 4000, 6000, 4000, 6000, 8, 40, 11, 50335, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'En\'kilah Abomination - Within 8-40 Range - Cast \'Scourge Hook\''); + +-- En'kilah Crypt Fiend +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25386; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25386); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25386, 0, 0, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 0, 0, 11, 31600, 64, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Crypt Crawler - In Combat - Cast \'Crypt Scarabs\''); + +-- En'kilah Ghoul +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25393; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25393); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25393, 0, 0, 0, 0, 0, 100, 0, 4000, 6000, 24000, 26000, 0, 0, 11, 38056, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'En\'kilah Ghoul - In Combat - Cast \'Flesh Rip\''); + +-- Sentry-bot 57-K (modified old smartai) +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25753; + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 25753) AND (`source_type` = 0) AND (`id` IN (0, 4)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25753, 0, 0, 0, 0, 0, 100, 0, 3000, 13000, 13000, 26000, 0, 0, 11, 6668, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sentry-bot 57-K - In Combat - Cast \'Red Firework\''), +(25753, 0, 4, 0, 6, 1, 100, 0, 0, 0, 0, 0, 0, 0, 11, 46443, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sentry-bot 57-K - On Just Died - Cast \'Weakness to Lightning: Kill Credit Direct to Player\' (Phase 1)'); + +-- High Priest Naferset +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26076; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26076); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(26076, 0, 0, 0, 25, 0, 100, 512, 0, 0, 0, 0, 0, 0, 18, 33555200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Priest Naferset - On Reset - Set Flags Immune To Players & Immune To NPC\'s & Not Selectable'), +(26076, 0, 1, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 18, 33555200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Priest Naferset - On Respawn - Set Flags Immune To Players & Immune To NPC\'s & Not Selectable'), +(26076, 0, 2, 3, 1, 0, 100, 512, 2000, 2000, 5000, 5000, 0, 0, 19, 33555200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Priest Naferset - Out of Combat - Remove Flags Immune To Players & Immune To NPC\'s & Not Selectable'), +(26076, 0, 3, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Priest Naferset - Out of Combat - Say Line 0'), +(26076, 0, 4, 0, 0, 0, 100, 0, 3000, 5000, 20000, 25000, 0, 0, 11, 15587, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'High Priest Naferset - In Combat - Cast \'Mind Blast\''), +(26076, 0, 5, 0, 2, 0, 100, 0, 0, 50, 2000, 5000, 0, 0, 11, 11640, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'High Priest Naferset - Between 0-50% Health - Cast \'Renew\''); + +-- Darkfallen Deathblade +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26103; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26103); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(26103, 0, 0, 0, 0, 0, 100, 0, 4000, 5000, 20000, 30000, 0, 0, 11, 50668, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Darkfallen Deathblade - In Combat - Cast \'Death Coil\''), +(26103, 0, 1, 0, 0, 0, 100, 0, 2000, 3000, 8000, 12000, 0, 0, 11, 50349, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Darkfallen Deathblade - In Combat - Cast \'Icy Touch\''); + +-- Heigarr the Horrible +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26266; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26266); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(26266, 0, 0, 0, 0, 0, 100, 0, 4000, 6000, 5000, 20000, 0, 0, 11, 40504, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Heigarr the Horrible - In Combat - Cast \'Cleave\''), +(26266, 0, 1, 0, 0, 0, 100, 0, 15000, 20000, 20000, 25000, 0, 0, 11, 32588, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Heigarr the Horrible - In Combat - Cast \'Concussion Blow\''); + +-- Boiling Spirit +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25419; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25419); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25419, 0, 0, 0, 0, 0, 100, 0, 4000, 6000, 25000, 30000, 0, 0, 11, 50206, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Boiling Spirit - In Combat - Cast \'Scalding Steam\''); + +-- Raging Boiler +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25417; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25417); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25417, 0, 0, 0, 0, 0, 100, 0, 4000, 6000, 25000, 30000, 0, 0, 11, 50207, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Boiling Spirit - In Combat - Cast \'Scalding Steam\''); + +-- Enraged Tempest +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25415; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25415); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25415, 0, 0, 0, 2, 0, 100, 0, 0, 50, 0, 0, 0, 0, 11, 50420, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Enraged Tempest - Between 0-50% Health - Cast \'Enrage\''), +(25415, 0, 1, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 50215, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Enraged Tempest - On Just Died - Cast \'Zephyr\''); From c3f49953667c0e2abdbd536c5e6e9c17fea5bc9c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 Jan 2025 07:44:03 +0000 Subject: [PATCH 49/51] chore(DB): import pending files Referenced commit(s): d234af1d728d2a24edceafe132adf3574b20a83e --- .../Borean_Tundra_npcs.sql => db_world/2025_01_15_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/Borean_Tundra_npcs.sql => db_world/2025_01_15_02.sql} (99%) diff --git a/data/sql/updates/pending_db_world/Borean_Tundra_npcs.sql b/data/sql/updates/db_world/2025_01_15_02.sql similarity index 99% rename from data/sql/updates/pending_db_world/Borean_Tundra_npcs.sql rename to data/sql/updates/db_world/2025_01_15_02.sql index e7a8bb180..da949eca2 100644 --- a/data/sql/updates/pending_db_world/Borean_Tundra_npcs.sql +++ b/data/sql/updates/db_world/2025_01_15_02.sql @@ -1,3 +1,4 @@ +-- DB update 2025_01_15_01 -> 2025_01_15_02 -- Nerub'ar Corpse Harvester UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25445; From 3f1d54b871012ea483da978fe5a78a376be864bb Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Wed, 15 Jan 2025 06:27:48 -0500 Subject: [PATCH 50/51] fix(DB/Spell): Correct map ID for Medallion of Karabor. (#21175) --- data/sql/updates/pending_db_world/karabor-fix.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 data/sql/updates/pending_db_world/karabor-fix.sql diff --git a/data/sql/updates/pending_db_world/karabor-fix.sql b/data/sql/updates/pending_db_world/karabor-fix.sql new file mode 100644 index 000000000..e0deb497d --- /dev/null +++ b/data/sql/updates/pending_db_world/karabor-fix.sql @@ -0,0 +1 @@ +UPDATE `spell_target_position` SET `MapID` = 530 WHERE `ID` = 41234 AND `EffectIndex` = 0; From a37e0c9717d8f6cd891d32a19d8d597f84c40f8b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 Jan 2025 11:28:49 +0000 Subject: [PATCH 51/51] chore(DB): import pending files Referenced commit(s): 3f1d54b871012ea483da978fe5a78a376be864bb --- .../karabor-fix.sql => db_world/2025_01_15_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/karabor-fix.sql => db_world/2025_01_15_03.sql} (67%) diff --git a/data/sql/updates/pending_db_world/karabor-fix.sql b/data/sql/updates/db_world/2025_01_15_03.sql similarity index 67% rename from data/sql/updates/pending_db_world/karabor-fix.sql rename to data/sql/updates/db_world/2025_01_15_03.sql index e0deb497d..9f1a49765 100644 --- a/data/sql/updates/pending_db_world/karabor-fix.sql +++ b/data/sql/updates/db_world/2025_01_15_03.sql @@ -1 +1,2 @@ +-- DB update 2025_01_15_02 -> 2025_01_15_03 UPDATE `spell_target_position` SET `MapID` = 530 WHERE `ID` = 41234 AND `EffectIndex` = 0;