From a8cc3b7ba7817c545f006f51bd2ddb9c254955e5 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 13 Jun 2025 18:52:21 -0300 Subject: [PATCH] =?UTF-8?q?fix(Scripts/AhnKahet):=20Fix=20Taldaram=20Spher?= =?UTF-8?q?es=20duration,=20spawn=20position=20=E2=80=A6=20(#22296)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ahnkahet/boss_prince_taldaram.cpp | 33 +++---------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp index c8e970d07..6a24d9e8e 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp @@ -90,7 +90,6 @@ enum Points POINT_ORB, }; -constexpr float DATA_GROUND_POSITION_Z = 11.308135f; constexpr float DATA_SPHERE_DISTANCE = 25.0f; #define DATA_SPHERE_ANGLE_OFFSET float(M_PI) / 2.0f @@ -98,7 +97,6 @@ struct npc_taldaram_flamesphere : public NullCreatureAI { npc_taldaram_flamesphere(Creature *pCreature) : NullCreatureAI(pCreature), instance(pCreature->GetInstanceScript()), - uiDespawnTimer(13000), moveTimer(0) { pCreature->SetReactState(REACT_PASSIVE); @@ -112,14 +110,6 @@ struct npc_taldaram_flamesphere : public NullCreatureAI } } - void MovementInform(uint32 type, uint32 id) override - { - if (type == POINT_MOTION_TYPE && id == POINT_ORB) - { - me->DisappearAndDie(); - } - } - void IsSummonedBy(WorldObject* /*summoner*/) override { // Replace sphere instantly if sphere is summoned after prince death @@ -131,9 +121,6 @@ struct npc_taldaram_flamesphere : public NullCreatureAI DoCastSelf(SPELL_FLAME_SPHERE_SPAWN_EFFECT); DoCastSelf(SPELL_FLAME_SPHERE_VISUAL); - - /// @todo: replace with DespawnOrUnsummon - uiDespawnTimer = 13000; } void JustDied(Unit* /*who*/) override @@ -176,17 +163,6 @@ struct npc_taldaram_flamesphere : public NullCreatureAI moveTimer -= diff; } } - - if (uiDespawnTimer) - { - if (uiDespawnTimer <= diff) - { - me->DisappearAndDie(); - uiDespawnTimer = 0; - } - else - uiDespawnTimer -= diff; - } } void SetVictimPos(Position const& pos) @@ -197,7 +173,6 @@ struct npc_taldaram_flamesphere : public NullCreatureAI private: Position victimPos; InstanceScript* instance; - uint32 uiDespawnTimer; uint32 moveTimer; }; @@ -245,7 +220,7 @@ struct boss_taldaram : public BossAI { if (action == ACTION_REMOVE_PRISON || action == ACTION_REMOVE_PRISON_AT_RESET) { - me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), DATA_GROUND_POSITION_Z, me->GetOrientation()); + me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetMapWaterOrGroundLevel(me->GetPosition()), me->GetOrientation()); instance->HandleGameObject(instance->GetGuidData(DATA_PRINCE_TALDARAM_PLATFORM), true); if (action == ACTION_REMOVE_PRISON) @@ -383,7 +358,7 @@ struct boss_taldaram : public BossAI { case EVENT_PRINCE_BLOODTHIRST: { - DoCastSelf(SPELL_BLOODTHIRST); + DoCastVictim(SPELL_BLOODTHIRST); events.Repeat(10s); break; } @@ -392,7 +367,7 @@ struct boss_taldaram : public BossAI if (Unit* victim = me->GetVictim()) { DoCast(victim, SPELL_CONJURE_FLAME_SPHERE); - victimSperePos = *victim; + victimSperePos = victim->GetPosition(); } if (!events.GetNextEventTime(EVENT_PRINCE_VANISH)) @@ -531,7 +506,7 @@ class spell_prince_taldaram_flame_sphere_summon : public SpellScript void SetDest(SpellDestination& dest) { - dest._position.m_positionZ = DATA_GROUND_POSITION_Z + 5.5f; + dest._position.m_positionZ = GetCaster()->GetPositionZ() + 5.5f; } void Register() override