From 84552b53dad9ca0e65167956d228082a28b61795 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Wed, 14 Sep 2022 03:20:47 +0200 Subject: [PATCH 01/17] fix(DB/Spells): Added 500ms cooldown to Flurry proc. (#13002) --- .../rev_1662808735373629900.sql | 4 ++++ src/server/game/Entities/Unit/Unit.cpp | 20 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 data/sql/updates/pending_db_world/rev_1662808735373629900.sql diff --git a/data/sql/updates/pending_db_world/rev_1662808735373629900.sql b/data/sql/updates/pending_db_world/rev_1662808735373629900.sql new file mode 100644 index 000000000..dc6ba715d --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1662808735373629900.sql @@ -0,0 +1,4 @@ +-- +UPDATE `spell_proc_event` SET `Cooldown`=0 WHERE `entry`=-16256; +UPDATE `spell_proc_event` SET `Cooldown`=500 WHERE `entry`=-16257; + diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 78c282c29..ce05bb5d6 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -8348,7 +8348,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere // Used in case when access to whole aura is needed // All procs should be handled like this... -bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, SpellInfo const* /*procSpell*/, uint32 /*procFlag*/, uint32 procEx, uint32 /*cooldown*/, bool* handled) +bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, SpellInfo const* /*procSpell*/, uint32 /*procFlag*/, uint32 procEx, uint32 cooldown, bool* handled) { SpellInfo const* dummySpell = triggeredByAura->GetSpellInfo(); @@ -8521,6 +8521,24 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp } break; } + case SPELLFAMILY_SHAMAN: + { + // Flurry + if ((dummySpell->SpellFamilyFlags[1] & 0x00000200) != 0) + { + if (cooldown) + { + if (HasSpellCooldown(dummySpell->Id)) + { + *handled = true; + break; + } + + AddSpellCooldown(dummySpell->Id, 0, cooldown); + } + } + break; + } } return false; } From 54d461398b64540db546f233fe256821cbd82a3b Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 14 Sep 2022 01:22:54 +0000 Subject: [PATCH 02/17] chore(DB): import pending files Referenced commit(s): 84552b53dad9ca0e65167956d228082a28b61795 --- .../rev_1662808735373629900.sql => db_world/2022_09_14_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1662808735373629900.sql => db_world/2022_09_14_00.sql} (75%) diff --git a/data/sql/updates/pending_db_world/rev_1662808735373629900.sql b/data/sql/updates/db_world/2022_09_14_00.sql similarity index 75% rename from data/sql/updates/pending_db_world/rev_1662808735373629900.sql rename to data/sql/updates/db_world/2022_09_14_00.sql index dc6ba715d..a79dc4b8c 100644 --- a/data/sql/updates/pending_db_world/rev_1662808735373629900.sql +++ b/data/sql/updates/db_world/2022_09_14_00.sql @@ -1,3 +1,4 @@ +-- DB update 2022_09_13_03 -> 2022_09_14_00 -- UPDATE `spell_proc_event` SET `Cooldown`=0 WHERE `entry`=-16256; UPDATE `spell_proc_event` SET `Cooldown`=500 WHERE `entry`=-16257; From 8eeea2a3d7db6edf7da14d7872ebb54b93a14453 Mon Sep 17 00:00:00 2001 From: SoglaHash <74299960+SoglaHash@users.noreply.github.com> Date: Wed, 14 Sep 2022 03:27:22 +0200 Subject: [PATCH 03/17] fix(DB/SmartAI): Missing SmartAI to Mark of Detonation (#12967) --- .../updates/pending_db_world/rev_1662307890108962467.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1662307890108962467.sql diff --git a/data/sql/updates/pending_db_world/rev_1662307890108962467.sql b/data/sql/updates/pending_db_world/rev_1662307890108962467.sql new file mode 100644 index 000000000..bf1ba7bb2 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1662307890108962467.sql @@ -0,0 +1,7 @@ +-- +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 12256; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 12256); +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`, `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 +(12256, 0, 0, 1, 8, 0, 100, 512, 19250, 0, 120000, 120000, 0, 33, 12247, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Kill Credit'), +(12256, 0, 1, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 41, 0, 120, 0, 0, 0, 0, 20, 177668, 0, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Despawn Mark of Detonation'); From 9e716faf3fcfd2a4a35948e87b4d8cfb340682be Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 14 Sep 2022 01:29:36 +0000 Subject: [PATCH 04/17] chore(DB): import pending files Referenced commit(s): 8eeea2a3d7db6edf7da14d7872ebb54b93a14453 --- .../rev_1662307890108962467.sql => db_world/2022_09_14_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1662307890108962467.sql => db_world/2022_09_14_01.sql} (95%) diff --git a/data/sql/updates/pending_db_world/rev_1662307890108962467.sql b/data/sql/updates/db_world/2022_09_14_01.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1662307890108962467.sql rename to data/sql/updates/db_world/2022_09_14_01.sql index bf1ba7bb2..5d9cc39f7 100644 --- a/data/sql/updates/pending_db_world/rev_1662307890108962467.sql +++ b/data/sql/updates/db_world/2022_09_14_01.sql @@ -1,3 +1,4 @@ +-- DB update 2022_09_14_00 -> 2022_09_14_01 -- UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 12256; From c0c4ef393e780701184d4de316afc834984a4f7b Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Wed, 14 Sep 2022 03:30:37 +0200 Subject: [PATCH 05/17] fix(Scripts/TempleOfAhnQiraj): Obsidian Eradicator. (#12733) --- .../rev_1660466530277163800.sql | 9 ++ .../TempleOfAhnQiraj/temple_of_ahnqiraj.cpp | 93 +++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1660466530277163800.sql diff --git a/data/sql/updates/pending_db_world/rev_1660466530277163800.sql b/data/sql/updates/pending_db_world/rev_1660466530277163800.sql new file mode 100644 index 000000000..676377815 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1660466530277163800.sql @@ -0,0 +1,9 @@ +-- +UPDATE `creature_template` SET `ScriptName`='npc_obsidian_eradicator', `AiName`='' WHERE `entry`=15262; +DELETE FROM `smart_scripts` WHERE `entryorguid`=15262 AND `source_type`=0; + +DELETE FROM `spell_script_names` WHERE `spell_id`=25671; +INSERT INTO `spell_script_names` VALUES +(25671,'spell_drain_mana'); + +UPDATE `creature_template` SET `unit_flags2`=0 WHERE `entry`=15262; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp index 925a943c7..bdabb840b 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp @@ -15,6 +15,8 @@ * with this program. If not, see . */ +#include "MapReference.h" +#include "Player.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" @@ -38,6 +40,10 @@ enum Spells SPELL_SUMMON_LARGE_OBSIDIAN_CHUNK = 27630, // Server-side + SPELL_SHOCK_BLAST = 26458, + SPELL_DRAIN_MANA = 25671, + SPELL_DRAIN_MANA_VISUAL = 26639, + TALK_ENRAGE = 0 }; @@ -183,8 +189,95 @@ class spell_aggro_drones : public SpellScript } }; +struct npc_obsidian_eradicator : public ScriptedAI +{ + npc_obsidian_eradicator(Creature* creature) : ScriptedAI(creature) + { + } + + void Reset() override + { + _scheduler.CancelAll(); + me->SetPower(POWER_MANA, 0); + _targets.clear(); + } + + void EnterCombat(Unit* /*who*/) override + { + _scheduler.Schedule(3500ms, [this](TaskContext context) + { + if (_targets.empty()) + { + Map::PlayerList const& players = me->GetMap()->GetPlayers(); + for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* player = itr->GetSource()) + { + if (player->IsAlive() && !player->IsGameMaster() && !player->IsSpectator() && player->GetPower(POWER_MANA) > 0) + { + _targets.push_back(player); + } + } + } + + Acore::Containers::RandomResize(_targets, 10); + } + + for (Unit* target : _targets) + { + DoCast(target, SPELL_DRAIN_MANA, true); + } + + if (me->GetPowerPct(POWER_MANA) >= 100.f) + { + DoCastAOE(SPELL_SHOCK_BLAST, true); + } + + context.Repeat(3500ms); + }); + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + { + return; + } + + _scheduler.Update(diff, + std::bind(&ScriptedAI::DoMeleeAttackIfReady, this)); + } + +private: + TaskScheduler _scheduler; + std::list _targets; +}; + +class spell_drain_mana : public SpellScript +{ + PrepareSpellScript(spell_drain_mana); + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Unit* caster = GetCaster()) + { + if (Unit* target = GetHitUnit()) + { + target->CastSpell(caster, SPELL_DRAIN_MANA_VISUAL, true); + } + } + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_drain_mana::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_temple_of_ahnqiraj() { RegisterTempleOfAhnQirajCreatureAI(npc_anubisath_defender); RegisterSpellScript(spell_aggro_drones); + RegisterTempleOfAhnQirajCreatureAI(npc_obsidian_eradicator); + RegisterSpellScript(spell_drain_mana); } From 705ddb048aaaa4f5fcea9535b6c2dd5b6ea98ae8 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 14 Sep 2022 01:32:50 +0000 Subject: [PATCH 06/17] chore(DB): import pending files Referenced commit(s): c0c4ef393e780701184d4de316afc834984a4f7b --- .../rev_1660466530277163800.sql => db_world/2022_09_14_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1660466530277163800.sql => db_world/2022_09_14_02.sql} (89%) diff --git a/data/sql/updates/pending_db_world/rev_1660466530277163800.sql b/data/sql/updates/db_world/2022_09_14_02.sql similarity index 89% rename from data/sql/updates/pending_db_world/rev_1660466530277163800.sql rename to data/sql/updates/db_world/2022_09_14_02.sql index 676377815..40c27604b 100644 --- a/data/sql/updates/pending_db_world/rev_1660466530277163800.sql +++ b/data/sql/updates/db_world/2022_09_14_02.sql @@ -1,3 +1,4 @@ +-- DB update 2022_09_14_01 -> 2022_09_14_02 -- UPDATE `creature_template` SET `ScriptName`='npc_obsidian_eradicator', `AiName`='' WHERE `entry`=15262; DELETE FROM `smart_scripts` WHERE `entryorguid`=15262 AND `source_type`=0; From 2032cb696bccf6e0483b61ff6a9529981c1dcc7b Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 13 Sep 2022 22:34:44 -0300 Subject: [PATCH 07/17] fix(DB/Quests): One Commendation of Undercity quest (war effort) (#13022) --- .../updates/pending_db_world/rev_1662835816011805500.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1662835816011805500.sql diff --git a/data/sql/updates/pending_db_world/rev_1662835816011805500.sql b/data/sql/updates/pending_db_world/rev_1662835816011805500.sql new file mode 100644 index 000000000..ee21ecbfd --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1662835816011805500.sql @@ -0,0 +1,8 @@ +-- +DELETE FROM `creature_queststarter` WHERE `id` = 15738 AND `quest` = 8815; +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(15738, 8815); + +DELETE FROM `creature_questender` WHERE `id` = 15378 AND `quest` = 8832; +INSERT INTO `creature_questender` (`id`, `quest`) VALUES +(15738, 8815); From 0f882ed5f0772293023f2d302df0790f6fa5151e Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 14 Sep 2022 01:36:43 +0000 Subject: [PATCH 08/17] chore(DB): import pending files Referenced commit(s): 2032cb696bccf6e0483b61ff6a9529981c1dcc7b --- .../rev_1662835816011805500.sql => db_world/2022_09_14_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1662835816011805500.sql => db_world/2022_09_14_03.sql} (87%) diff --git a/data/sql/updates/pending_db_world/rev_1662835816011805500.sql b/data/sql/updates/db_world/2022_09_14_03.sql similarity index 87% rename from data/sql/updates/pending_db_world/rev_1662835816011805500.sql rename to data/sql/updates/db_world/2022_09_14_03.sql index ee21ecbfd..b3aa80bfc 100644 --- a/data/sql/updates/pending_db_world/rev_1662835816011805500.sql +++ b/data/sql/updates/db_world/2022_09_14_03.sql @@ -1,3 +1,4 @@ +-- DB update 2022_09_14_02 -> 2022_09_14_03 -- DELETE FROM `creature_queststarter` WHERE `id` = 15738 AND `quest` = 8815; INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES From a1f44f98a42de5ac19ca1cc63f3b091e9b3e9999 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Wed, 14 Sep 2022 03:40:47 +0200 Subject: [PATCH 09/17] =?UTF-8?q?fix(Scripts/Temple=20of=20AhnQiraj):=20Fi?= =?UTF-8?q?xes=20Skeram's=20Summoning=20Images=20mech=E2=80=A6=20(#12966)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...anic. --- .../Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp | 85 ++++++++++++++----- 1 file changed, 65 insertions(+), 20 deletions(-) diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp index e01f1dc05..2b2866550 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp @@ -34,7 +34,8 @@ enum Spells SPELL_EARTH_SHOCK = 26194, SPELL_TRUE_FULFILLMENT = 785, SPELL_INITIALIZE_IMAGE = 3730, - SPELL_SUMMON_IMAGES = 747 + SPELL_SUMMON_IMAGES = 747, + SPELL_BIRTH = 34115 }; enum Events @@ -42,7 +43,9 @@ enum Events EVENT_ARCANE_EXPLOSION = 1, EVENT_FULLFILMENT = 2, EVENT_BLINK = 3, - EVENT_EARTH_SHOCK = 4 + EVENT_EARTH_SHOCK = 4, + EVENT_TELEPORT = 5, + EVENT_INIT_IMAGE = 6 }; uint32 const BlinkSpells[3] = { 4801, 8195, 20449 }; @@ -56,7 +59,9 @@ struct boss_skeram : public BossAI _Reset(); _flag = 0; _hpct = 75.0f; - me->SetVisible(true); + me->SetReactState(REACT_AGGRESSIVE); + me->SetImmuneToAll(false); + me->SetControlled(false, UNIT_STATE_ROOT); } void KilledUnit(Unit* /*victim*/) override @@ -72,6 +77,29 @@ struct boss_skeram : public BossAI } void JustSummoned(Creature* creature) override + { + BossAI::JustSummoned(creature); + + float ImageHealthPct = 0.f; + if (me->GetHealthPct() < 25.0f) + ImageHealthPct = 0.50f; + else if (me->GetHealthPct() < 50.0f) + ImageHealthPct = 0.20f; + else + ImageHealthPct = 0.10f; + + creature->SetMaxHealth(me->GetMaxHealth() * ImageHealthPct); + creature->SetHealth(creature->GetMaxHealth() * (me->GetHealthPct() / 100.0f)); + + creature->CastSpell(creature, SPELL_BIRTH, true); + creature->SetControlled(true, UNIT_STATE_ROOT); + creature->SetReactState(REACT_PASSIVE); + creature->SetImmuneToAll(true); + + _copiesGUIDs.push_back(creature->GetGUID()); + } + + void DoTeleport(Creature* creature) { // Shift the boss and images (Get it? *Shift*?) uint8 rand = 0; @@ -86,24 +114,18 @@ struct boss_skeram : public BossAI while (_flag & (1 << rand)) rand = urand(0, 2); - creature->CastSpell(creature, BlinkSpells[rand]); + + creature->SetReactState(REACT_AGGRESSIVE); + creature->SetImmuneToAll(false); + creature->SetControlled(false, UNIT_STATE_ROOT); + creature->CastSpell(creature, BlinkSpells[rand], true); + _flag |= (1 << rand); if (_flag & (1 << 7)) _flag = 0; - float ImageHealthPct; - - if (me->GetHealthPct() < 25.0f) - ImageHealthPct = 0.50f; - else if (me->GetHealthPct() < 50.0f) - ImageHealthPct = 0.20f; - else - ImageHealthPct = 0.10f; - - creature->SetMaxHealth(me->GetMaxHealth() * ImageHealthPct); - creature->SetHealth(creature->GetMaxHealth() * (me->GetHealthPct() / 100.0f)); - BossAI::JustSummoned(creature); + events.ScheduleEvent(EVENT_INIT_IMAGE, 400ms); } void JustDied(Unit* /*killer*/) override @@ -129,7 +151,10 @@ struct boss_skeram : public BossAI events.ScheduleEvent(EVENT_BLINK, 30s, 45s); events.ScheduleEvent(EVENT_EARTH_SHOCK, 1200ms); - Talk(SAY_AGGRO); + if (!me->IsSummon()) + { + Talk(SAY_AGGRO); + } } void UpdateAI(uint32 diff) override @@ -154,23 +179,42 @@ struct boss_skeram : public BossAI case EVENT_BLINK: DoCast(me, BlinkSpells[urand(0, 2)]); DoResetThreat(); - me->SetVisible(true); events.ScheduleEvent(EVENT_BLINK, 10s, 30s); break; case EVENT_EARTH_SHOCK: DoCastVictim(SPELL_EARTH_SHOCK); events.ScheduleEvent(EVENT_EARTH_SHOCK, 1200ms); break; + case EVENT_TELEPORT: + me->SetReactState(REACT_AGGRESSIVE); + me->SetImmuneToAll(false); + me->SetControlled(false, UNIT_STATE_ROOT); + for (ObjectGuid const& guid : _copiesGUIDs) + { + if (Creature* image = ObjectAccessor::GetCreature(*me, guid)) + { + DoTeleport(image); + } + } + DoResetThreat(); + events.RescheduleEvent(EVENT_BLINK, 10s, 30s); + break; + case EVENT_INIT_IMAGE: + me->CastSpell(me, SPELL_INITIALIZE_IMAGE, true); + break; } } if (!me->IsSummon() && me->GetHealthPct() < _hpct) { + _copiesGUIDs.clear(); DoCast(me, SPELL_SUMMON_IMAGES, true); + me->SetReactState(REACT_PASSIVE); + me->SetImmuneToAll(true); + me->SetControlled(true, UNIT_STATE_ROOT); Talk(SAY_SPLIT); _hpct -= 25.0f; - me->SetVisible(false); - events.RescheduleEvent(EVENT_BLINK, 2s); + events.ScheduleEvent(EVENT_TELEPORT, 2s); } if (Unit* myVictim = me->GetVictim()) @@ -193,6 +237,7 @@ struct boss_skeram : public BossAI private: float _hpct; uint8 _flag; + GuidVector _copiesGUIDs; }; class spell_skeram_arcane_explosion : public SpellScript From ea7f86ae6499914755b188554ae2fd076b8a5526 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Wed, 14 Sep 2022 03:51:40 +0200 Subject: [PATCH 10/17] fix(Core/Spells): Fixed ground destination of Blink. (#13009) Fixes #11721 --- src/server/game/Spells/Spell.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 145955832..585bd4f62 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1592,7 +1592,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici } //} - lastpos.Relocate(destx, desty, destz + 0.5f, pos.GetOrientation()); + lastpos.Relocate(destx, desty, destz, pos.GetOrientation()); dest = SpellDestination(lastpos); } else From 577a0a1f3ee172d4cb7511cff30d5b7092fd6bb4 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Wed, 14 Sep 2022 03:54:05 +0200 Subject: [PATCH 11/17] fix(Core/Spells): Improved Blink in WSG near NE huts. (#13012) --- src/server/game/Spells/Spell.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 585bd4f62..38abbb126 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1549,7 +1549,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici // collision occured if (col || dcol || (overdistance > 0.0f && !map->IsInWater(phasemask, tstX, tstY, ground, collisionHeight)) || (fabs(prevZ - tstZ) > maxtravelDistZ && (tstZ > prevZ))) { - if ((overdistance > 0.0f) && (overdistance < step)) + if ((overdistance > 0.0f) && (overdistance < 1.f)) { destx = prevX + overdistance * cos(pos.GetOrientation()); desty = prevY + overdistance * sin(pos.GetOrientation()); From 59f74753339906fa2c212a864435b18e2f4c3686 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Wed, 14 Sep 2022 04:54:22 +0200 Subject: [PATCH 12/17] =?UTF-8?q?fix(Scripts/Temple=20of=20AhnQiraj):=20Mo?= =?UTF-8?q?ved=20Anubisath=20Warder=20script=20from=20D=E2=80=A6=20(#12951?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …B to C++. --- .../rev_1662201901115078700.sql | 3 + .../TempleOfAhnQiraj/temple_of_ahnqiraj.cpp | 76 +++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1662201901115078700.sql diff --git a/data/sql/updates/pending_db_world/rev_1662201901115078700.sql b/data/sql/updates/pending_db_world/rev_1662201901115078700.sql new file mode 100644 index 000000000..1ffa54b4b --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1662201901115078700.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature_template` SET `AiName`='', `ScriptName`='npc_anubisath_warder' WHERE `entry`=15311; +DELETE FROM `smart_scripts` WHERE `entryorguid`=15311 AND `source_type`=0; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp index bdabb840b..c11802783 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp @@ -38,6 +38,12 @@ enum Spells SPELL_SUMMON_WARRIOR = 17431, SPELL_SUMMON_SWARMGUARD = 17430, + SPELL_FEAR = 26070, + SPELL_ENTAGLING_ROOTS = 26071, + SPELL_SILENCE = 26069, + SPELL_DUST_CLOUD = 26072, + SPELL_FIRE_NOVA = 26073, + SPELL_SUMMON_LARGE_OBSIDIAN_CHUNK = 27630, // Server-side SPELL_SHOCK_BLAST = 26458, @@ -274,10 +280,80 @@ class spell_drain_mana : public SpellScript } }; +struct npc_anubisath_warder : public ScriptedAI +{ + npc_anubisath_warder(Creature* creature) : ScriptedAI(creature) + { + } + + void Reset() override + { + _scheduler.CancelAll(); + } + + void EnterCombat(Unit* /*who*/) override + { + if (urand(0, 1)) + { + _scheduler.Schedule(5s, 5s, [this](TaskContext context) + { + DoCastAOE(SPELL_FEAR, true); + context.Repeat(20s, 20s); + }); + } + else + { + _scheduler.Schedule(5s, 5s, [this](TaskContext context) + { + DoCastAOE(SPELL_ENTAGLING_ROOTS, true); + context.Repeat(20s, 20s); + }); + } + + if (urand(0, 1)) + { + _scheduler.Schedule(4s, 4s, [this](TaskContext context) + { + DoCastAOE(SPELL_SILENCE, true); + context.Repeat(15s, 15s); + }); + } + else + { + _scheduler.Schedule(4s, 4s, [this](TaskContext context) + { + DoCastAOE(SPELL_DUST_CLOUD, true); + context.Repeat(15s, 15s); + }); + } + + _scheduler.Schedule(2s, 2s, [this](TaskContext context) + { + DoCastAOE(SPELL_FIRE_NOVA, true); + context.Repeat(8s, 15s); + }); + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + { + return; + } + + _scheduler.Update(diff, + std::bind(&ScriptedAI::DoMeleeAttackIfReady, this)); + } + +private: + TaskScheduler _scheduler; +}; + void AddSC_temple_of_ahnqiraj() { RegisterTempleOfAhnQirajCreatureAI(npc_anubisath_defender); RegisterSpellScript(spell_aggro_drones); RegisterTempleOfAhnQirajCreatureAI(npc_obsidian_eradicator); RegisterSpellScript(spell_drain_mana); + RegisterTempleOfAhnQirajCreatureAI(npc_anubisath_warder); } From e5efa47f7fc6640e1d03fcd4f261400e99221728 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 14 Sep 2022 02:56:38 +0000 Subject: [PATCH 13/17] chore(DB): import pending files Referenced commit(s): 59f74753339906fa2c212a864435b18e2f4c3686 --- .../rev_1662201901115078700.sql => db_world/2022_09_14_04.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1662201901115078700.sql => db_world/2022_09_14_04.sql} (80%) diff --git a/data/sql/updates/pending_db_world/rev_1662201901115078700.sql b/data/sql/updates/db_world/2022_09_14_04.sql similarity index 80% rename from data/sql/updates/pending_db_world/rev_1662201901115078700.sql rename to data/sql/updates/db_world/2022_09_14_04.sql index 1ffa54b4b..833b8d23d 100644 --- a/data/sql/updates/pending_db_world/rev_1662201901115078700.sql +++ b/data/sql/updates/db_world/2022_09_14_04.sql @@ -1,3 +1,4 @@ +-- DB update 2022_09_14_03 -> 2022_09_14_04 -- UPDATE `creature_template` SET `AiName`='', `ScriptName`='npc_anubisath_warder' WHERE `entry`=15311; DELETE FROM `smart_scripts` WHERE `entryorguid`=15311 AND `source_type`=0; From 216d569e20eb5d8ad10209800d206d7d5373236d Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Wed, 14 Sep 2022 07:00:34 +0200 Subject: [PATCH 14/17] fix(Scripts/TempleOfAhnQiraj): Vekniss Stinger. (#12963) --- .../rev_1662284664882992400.sql | 2 + .../TempleOfAhnQiraj/temple_of_ahnqiraj.cpp | 64 ++++++++++++++++++- 2 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1662284664882992400.sql diff --git a/data/sql/updates/pending_db_world/rev_1662284664882992400.sql b/data/sql/updates/pending_db_world/rev_1662284664882992400.sql new file mode 100644 index 000000000..d6fd44b1a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1662284664882992400.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `ScriptName`='npc_vekniss_stinger' WHERE `entry`=15235; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp index c11802783..e604bd9de 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp @@ -25,16 +25,15 @@ enum Spells { + // Anubisath Defender SPELL_SHADOW_FROST_REFLECT = 19595, SPELL_FIRE_ARCANE_REFLECT = 13022, SPELL_METEOR = 26558, SPELL_PLAGUE = 26556, SPELL_SHADOW_STORM = 26555, SPELL_THUNDERCLAP = 26554, - SPELL_ENRAGE = 14204, SPELL_EXPLODE = 25699, - SPELL_SUMMON_WARRIOR = 17431, SPELL_SUMMON_SWARMGUARD = 17430, @@ -50,7 +49,12 @@ enum Spells SPELL_DRAIN_MANA = 25671, SPELL_DRAIN_MANA_VISUAL = 26639, - TALK_ENRAGE = 0 + TALK_ENRAGE = 0, + + // Vekniss Stinger + SPELL_VEKNISS_CATALYST = 26078, + SPELL_STINGER_CHARGE_NORMAL = 26081, + SPELL_STINGER_CHARGE_BUFFED = 26082, }; struct npc_anubisath_defender : public ScriptedAI @@ -163,6 +167,59 @@ private: bool _enraged; }; +struct npc_vekniss_stinger : public ScriptedAI +{ + npc_vekniss_stinger(Creature* creature) : ScriptedAI(creature) + { + } + + void Reset() override + { + _scheduler.CancelAll(); + } + + void EnterCombat(Unit* who) override + { + DoCast(who ,who->HasAura(SPELL_VEKNISS_CATALYST) ? SPELL_STINGER_CHARGE_BUFFED : SPELL_STINGER_CHARGE_NORMAL, true); + + _scheduler.Schedule(6s, [this](TaskContext context) + { + Unit* target = SelectTarget(SelectTargetMethod::Random, 0, [&](Unit* u) + { + return u && !u->IsPet() && u->IsWithinDist2d(me, 20.f) && u->HasAura(SPELL_VEKNISS_CATALYST); + }); + if (!target) + { + target = SelectTarget(SelectTargetMethod::Random, 0, [&](Unit* u) + { + return u && !u->IsPet() && u->IsWithinDist2d(me, 20.f); + }); + } + + if (target) + { + DoCast(target, target->HasAura(SPELL_VEKNISS_CATALYST) ? SPELL_STINGER_CHARGE_BUFFED : SPELL_STINGER_CHARGE_NORMAL, true); + } + + context.Repeat(6s); + }); + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + { + return; + } + + _scheduler.Update(diff, + std::bind(&ScriptedAI::DoMeleeAttackIfReady, this)); + } + +private: + TaskScheduler _scheduler; +}; + enum NPCs { NPC_VEKNISS_DRONE = 15300 @@ -352,6 +409,7 @@ private: void AddSC_temple_of_ahnqiraj() { RegisterTempleOfAhnQirajCreatureAI(npc_anubisath_defender); + RegisterTempleOfAhnQirajCreatureAI(npc_vekniss_stinger); RegisterSpellScript(spell_aggro_drones); RegisterTempleOfAhnQirajCreatureAI(npc_obsidian_eradicator); RegisterSpellScript(spell_drain_mana); From 04db1914d839060501eacaa13b6fd1e5d274677c Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 14 Sep 2022 05:02:55 +0000 Subject: [PATCH 15/17] chore(DB): import pending files Referenced commit(s): 216d569e20eb5d8ad10209800d206d7d5373236d --- .../rev_1662284664882992400.sql => db_world/2022_09_14_05.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1662284664882992400.sql => db_world/2022_09_14_05.sql} (67%) diff --git a/data/sql/updates/pending_db_world/rev_1662284664882992400.sql b/data/sql/updates/db_world/2022_09_14_05.sql similarity index 67% rename from data/sql/updates/pending_db_world/rev_1662284664882992400.sql rename to data/sql/updates/db_world/2022_09_14_05.sql index d6fd44b1a..b4c3c86ef 100644 --- a/data/sql/updates/pending_db_world/rev_1662284664882992400.sql +++ b/data/sql/updates/db_world/2022_09_14_05.sql @@ -1,2 +1,3 @@ +-- DB update 2022_09_14_04 -> 2022_09_14_05 -- UPDATE `creature_template` SET `ScriptName`='npc_vekniss_stinger' WHERE `entry`=15235; From 9bb6c63d22fc23ee099f79e1709cb1138bfabb2a Mon Sep 17 00:00:00 2001 From: Malcrom Date: Thu, 15 Sep 2022 11:51:15 -0300 Subject: [PATCH 16/17] fix(DB/Pathing): Add missing path to Razorspine (#13025) --- .../pending_db_world/pathing_for_razorspine.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 data/sql/updates/pending_db_world/pathing_for_razorspine.sql diff --git a/data/sql/updates/pending_db_world/pathing_for_razorspine.sql b/data/sql/updates/pending_db_world/pathing_for_razorspine.sql new file mode 100644 index 000000000..9e69a6d60 --- /dev/null +++ b/data/sql/updates/pending_db_world/pathing_for_razorspine.sql @@ -0,0 +1,16 @@ +-- Pathing for Razorspine Entry: 23841 +SET @NPC := 39309; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=-2667.589,`position_y`=-4017.5479,`position_z`=1.7994823 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-2667.589,-4017.5479,1.7994823,NULL,0,0,0,100,0), +(@PATH,2,-2682.1023,-4013.1038,7.623457,NULL,0,0,0,100,0), +(@PATH,3,-2701.14,-4009.6328,17.22806,NULL,0,0,0,100,0), +(@PATH,4,-2722.923,-4008.8137,29.876986,NULL,0,0,0,100,0), +(@PATH,5,-2737.096,-4004.9934,33.11826,NULL,0,0,0,100,0), +(@PATH,6,-2722.923,-4008.8137,29.876986,NULL,0,0,0,100,0), +(@PATH,7,-2701.14,-4009.6328,17.22806,NULL,0,0,0,100,0), +(@PATH,8,-2682.1023,-4013.1038,7.623457,NULL,0,0,0,100,0); From ac4f5738e2e8e3ebb026363befb28ddc0d606431 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Thu, 15 Sep 2022 14:53:51 +0000 Subject: [PATCH 17/17] chore(DB): import pending files Referenced commit(s): 9bb6c63d22fc23ee099f79e1709cb1138bfabb2a --- .../pathing_for_razorspine.sql => db_world/2022_09_15_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/pathing_for_razorspine.sql => db_world/2022_09_15_00.sql} (96%) diff --git a/data/sql/updates/pending_db_world/pathing_for_razorspine.sql b/data/sql/updates/db_world/2022_09_15_00.sql similarity index 96% rename from data/sql/updates/pending_db_world/pathing_for_razorspine.sql rename to data/sql/updates/db_world/2022_09_15_00.sql index 9e69a6d60..df7d98253 100644 --- a/data/sql/updates/pending_db_world/pathing_for_razorspine.sql +++ b/data/sql/updates/db_world/2022_09_15_00.sql @@ -1,3 +1,4 @@ +-- DB update 2022_09_14_05 -> 2022_09_15_00 -- Pathing for Razorspine Entry: 23841 SET @NPC := 39309; SET @PATH := @NPC * 10;