mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 05:11:55 +01:00
Scripts/Scarlet Enclave: Death Comes From On High
This commit is contained in:
@@ -377,15 +377,17 @@ class npc_eye_of_acherus : public CreatureScript
|
||||
npc_eye_of_acherusAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid1);
|
||||
if (Player* owner = me->GetCharmerOrOwner()->ToPlayer())
|
||||
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 { }
|
||||
@@ -400,9 +402,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)
|
||||
@@ -422,7 +424,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())
|
||||
@@ -434,14 +435,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