fix(Scripts/Ahnkahet): Fix Taldaram's Flame Orb despawn effect (#22763)

Co-authored-by: cgrahamseven <chris.graham@protonmail.com>
Co-authored-by: Andrew <47818697+Nyeriah@users.noreply.github.com>
Co-authored-by: sogladev <sogladev@gmail.com>
Co-authored-by: Ludwig <sudlud@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@cgrahamseven
2026-06-13 07:27:21 -05:00
committed by GitHub
parent 8d0a1aaf6f
commit 12f1834d41
@@ -103,6 +103,15 @@ struct npc_taldaram_flamesphere : public NullCreatureAI
}
}
void MovementInform(uint32 type, uint32 id) override
{
if (type == POINT_MOTION_TYPE && id == POINT_ORB)
{
me->DespawnOrUnsummon(1s);
DoCastSelf(SPELL_FLAME_SPHERE_DEATH_EFFECT, true);
}
}
void IsSummonedBy(WorldObject* /*summoner*/) override
{
// Replace sphere instantly if sphere is summoned after prince death
@@ -116,11 +125,6 @@ struct npc_taldaram_flamesphere : public NullCreatureAI
DoCastSelf(SPELL_FLAME_SPHERE_VISUAL);
}
void JustDied(Unit* /*who*/) override
{
DoCastSelf(SPELL_FLAME_SPHERE_DEATH_EFFECT);
}
void UpdateAI(uint32 diff) override
{
if (moveTimer)
@@ -147,7 +151,7 @@ struct npc_taldaram_flamesphere : public NullCreatureAI
float angle = me->GetAngle(&victimPos) + angleOffset;
float x = me->GetPositionX() + DATA_SPHERE_DISTANCE * cos(angle);
float y = me->GetPositionY() + DATA_SPHERE_DISTANCE * std::sin(angle);
me->GetMotionMaster()->MovePoint(POINT_ORB, x, y, me->GetPositionZ());
me->GetMotionMaster()->MovePoint(POINT_ORB, x, y, me->GetPositionZ(), FORCED_MOVEMENT_WALK);
moveTimer = 0;
}