mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Scripts/Scarlet Enclave: Death Comes From On High
(cherry picked from commit afc25d22ef)
This commit is contained in:
@@ -381,17 +381,19 @@ class npc_eye_of_acherus : public CreatureScript
|
||||
{
|
||||
me->SetDisplayFromModel(0);
|
||||
if (Player* owner = me->GetCharmerOrOwner()->ToPlayer())
|
||||
{
|
||||
me->GetCharmInfo()->InitPossessCreateSpells();
|
||||
owner->SendAutoRepeatCancel(me);
|
||||
}
|
||||
|
||||
DoCastSelf(SPELL_EYE_VISUAL);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetDisableGravity(true);
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
|
||||
Movement::MoveSplineInit init(me);
|
||||
init.MoveTo(EyeOFAcherusFallPoint.GetPositionX(), EyeOFAcherusFallPoint.GetPositionY(), EyeOFAcherusFallPoint.GetPositionZ(), false);
|
||||
init.SetFall();
|
||||
me->GetMotionMaster()->LaunchMoveSpline(std::move(init), POINT_EYE_FALL, MOTION_PRIORITY_NORMAL, POINT_MOTION_TYPE);
|
||||
|
||||
_events.ScheduleEvent(EVENT_MOVE_START, 7s);
|
||||
}
|
||||
|
||||
void OnCharmed(bool /*apply*/) override { }
|
||||
@@ -406,9 +408,9 @@ class npc_eye_of_acherus : public CreatureScript
|
||||
{
|
||||
case EVENT_MOVE_START:
|
||||
{
|
||||
DoCast(me, SPELL_EYE_FLIGHT_BOOST);
|
||||
|
||||
DoCastSelf(SPELL_EYE_FLIGHT_BOOST);
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
|
||||
if (Player* owner = me->GetCharmerOrOwner()->ToPlayer())
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_MOVE_TYPE; ++i)
|
||||
@@ -428,7 +430,6 @@ class npc_eye_of_acherus : public CreatureScript
|
||||
{
|
||||
if (movementType == WAYPOINT_MOTION_TYPE && pointId == POINT_EYE_MOVE_END - 1)
|
||||
{
|
||||
me->SetSheath(SHEATH_STATE_MELEE);
|
||||
me->RemoveAllAuras();
|
||||
|
||||
if (Player* owner = me->GetCharmerOrOwner()->ToPlayer())
|
||||
@@ -440,14 +441,7 @@ class npc_eye_of_acherus : public CreatureScript
|
||||
Talk(TALK_CONTROL, owner);
|
||||
}
|
||||
me->SetDisableGravity(false);
|
||||
DoCast(me, SPELL_EYE_FLIGHT);
|
||||
}
|
||||
|
||||
if (movementType == POINT_MOTION_TYPE && pointId == POINT_EYE_FALL)
|
||||
{
|
||||
me->SetDisableGravity(true);
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
_events.ScheduleEvent(EVENT_MOVE_START, 5000);
|
||||
DoCastSelf(SPELL_EYE_FLIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user