Skip to content

Commit

Permalink
修复奥杜尔科隆加恩眼棱追人及死后尸体位置
Browse files Browse the repository at this point in the history
  • Loading branch information
dongkui555 committed Jan 15, 2024
1 parent f062e7f commit bf94487
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ class boss_kologarn : public CreatureScript
{
summons.DespawnAll();
me->StopMoving();
me->SetDisableGravity(true);
if (m_pInstance)
m_pInstance->SetData(TYPE_KOLOGARN, DONE);

Expand Down Expand Up @@ -467,7 +468,19 @@ class boss_kologarn : public CreatureScript

if ((eyebeamTarget = SelectTarget(SelectTargetMethod::MinDistance, 0, 0, true)))
{
me->CastSpell(eyebeamTarget, SPELL_FOCUSED_EYEBEAM_SUMMON, false);
if (!eyebeamTarget)
break;

if (Creature* eye = me->SummonCreature(NPC_EYE_LEFT, eyebeamTarget->GetPositionX(), eyebeamTarget->GetPositionY() - 6, eyebeamTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 12000))
{
eye->GetMotionMaster()->MoveFollow(eyebeamTarget, 0.01f, M_PI * 3 / 2, MOTION_SLOT_CONTROLLED);
eye->CastSpell(me, SPELL_FOCUSED_EYEBEAM_LEFT, true);
}
if (Creature* eye2 = me->SummonCreature(NPC_EYE_RIGHT, eyebeamTarget->GetPositionX(), eyebeamTarget->GetPositionY() + 6, eyebeamTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 12000))
{
eye2->GetMotionMaster()->MoveFollow(eyebeamTarget, 0.01f, M_PI / 2, MOTION_SLOT_CONTROLLED);
eye2->CastSpell(me, SPELL_FOCUSED_EYEBEAM_RIGHT, true);
}
}

Talk(EMOTE_EYES);
Expand Down Expand Up @@ -642,12 +655,7 @@ class boss_kologarn_eyebeam : public CreatureScript
void UpdateAI(uint32 diff) override
{
if (justSpawned)
{
me->DespawnOrUnsummon(10000);
if (Creature* cr = ObjectAccessor::GetCreature(*me, m_pInstance->GetGuidData(TYPE_KOLOGARN)))
{
me->CastSpell(cr, me->GetEntry() == NPC_EYE_LEFT ? SPELL_FOCUSED_EYEBEAM_LEFT : SPELL_FOCUSED_EYEBEAM_RIGHT, true);
}
{
me->CastSpell(me, SPELL_FOCUSED_EYEBEAM, true);
justSpawned = false;
}
Expand Down

0 comments on commit bf94487

Please sign in to comment.