From afc81098f290b539a5812cc2a4d4ee076983e7a9 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 30 Nov 2024 12:28:19 -0300 Subject: [PATCH] =?UTF-8?q?fix(Scripts/ZulAman):=20Fix=20Vortex=20not=20fo?= =?UTF-8?q?llowing=20players=20and=20also=20spell=E2=80=A6=20(#20780)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Scripts/ZulAman): Fix Vortex not following players and also spell missing * Update boss_zuljin.cpp --- .../game/Spells/SpellInfoCorrections.cpp | 6 +++++ .../EasternKingdoms/ZulAman/boss_zuljin.cpp | 27 ++++++++++--------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 36015f5cf..5896ee978 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4856,6 +4856,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->AuraInterruptFlags &= ~(AURA_INTERRUPT_FLAG_CHANGE_MAP | AURA_INTERRUPT_FLAG_TELEPORTED); }); + // Summon Cyclone + ApplySpellFix({ 43112 }, [](SpellInfo* spellInfo) + { + spellInfo->RequiresSpellFocus = 0; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index 852b5ae45..19422f9f3 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -314,17 +314,7 @@ struct boss_zuljin : public BossAI { me->SetCombatMovement(false); DoCastSelf(SPELL_ENERGY_STORM, true); // enemy aura - for (uint8 i = 0; i < 4; ++i) - { - if (Creature* vortex = DoSpawnCreature(CREATURE_FEATHER_VORTEX, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0)) - { - vortex->CastSpell(vortex, SPELL_CYCLONE_PASSIVE, true); - vortex->CastSpell(vortex, SPELL_CYCLONE_VISUAL, true); - vortex->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - vortex->SetSpeed(MOVE_RUN, 1.0f); - DoZoneInCombat(vortex); - } - } + DoCastAOE(SPELL_SUMMON_CYCLONE, true); } else { @@ -362,9 +352,18 @@ struct npc_zuljin_vortex : public ScriptedAI { npc_zuljin_vortex(Creature* creature) : ScriptedAI(creature) { } - void Reset() override { } + void Reset() override + { + if (WorldObject* summoner = GetSummoner()) + if (Creature* zuljin = summoner->ToCreature()) + me->SetLevel(zuljin->GetLevel()); - void JustEngagedWith(Unit* /*target*/) override { } + DoCastSelf(SPELL_CYCLONE_PASSIVE, true); + DoCastSelf(SPELL_CYCLONE_VISUAL, true); + me->SetSpeed(MOVE_RUN, 1.0f); + me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + DoZoneInCombat(); + } void SpellHit(Unit* caster, SpellInfo const* spell) override { @@ -374,6 +373,8 @@ struct npc_zuljin_vortex : public ScriptedAI void UpdateAI(uint32 /*diff*/) override { + UpdateVictim(); + //if the vortex reach the target, it change his target to another player if (me->IsWithinMeleeRange(me->GetVictim())) AttackStart(SelectTarget(SelectTargetMethod::Random, 0));