fix(Core/Quest): Death Comes From On High (#2939)
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1587740947996468714');
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE `entryorguid`=28529 AND `id`=2;
|
||||||
|
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(28529, 0, 2, 0, 1, 0, 100, 0, 0, 0, 1000, 3000, 0, 49, 0, 0, 0, 0, 0, 0, 9, 28511, 1, 25, 1, 0, 0, 0, 0, 'Scarlet Crusader - Out of Combat - Start Attacking');
|
||||||
@@ -29,6 +29,9 @@ enum eyeOfAcherus
|
|||||||
EYE_TEXT_LAUNCH = 0,
|
EYE_TEXT_LAUNCH = 0,
|
||||||
EYE_TEXT_CONTROL = 1,
|
EYE_TEXT_CONTROL = 1,
|
||||||
|
|
||||||
|
EYE_POINT_DESTINATION_1 = 0,
|
||||||
|
EYE_POINT_DESTINATION_2 = 1,
|
||||||
|
|
||||||
SPELL_EYE_OF_ACHERUS_VISUAL = 51892,
|
SPELL_EYE_OF_ACHERUS_VISUAL = 51892,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -51,6 +54,7 @@ public:
|
|||||||
void InitializeAI() override
|
void InitializeAI() override
|
||||||
{
|
{
|
||||||
events.Reset();
|
events.Reset();
|
||||||
|
|
||||||
events.ScheduleEvent(EVENT_REMOVE_CONTROL, 500);
|
events.ScheduleEvent(EVENT_REMOVE_CONTROL, 500);
|
||||||
events.ScheduleEvent(EVENT_SPEAK_1, 4000);
|
events.ScheduleEvent(EVENT_SPEAK_1, 4000);
|
||||||
events.ScheduleEvent(EVENT_LAUNCH, 7000);
|
events.ScheduleEvent(EVENT_LAUNCH, 7000);
|
||||||
@@ -60,8 +64,10 @@ public:
|
|||||||
|
|
||||||
void MovementInform(uint32 type, uint32 point) override
|
void MovementInform(uint32 type, uint32 point) override
|
||||||
{
|
{
|
||||||
if (type == ESCORT_MOTION_TYPE || point !=0)
|
if (type == POINT_MOTION_TYPE && point == EYE_POINT_DESTINATION_2)
|
||||||
|
{
|
||||||
events.ScheduleEvent(EVENT_REGAIN_CONTROL, 1000);
|
events.ScheduleEvent(EVENT_REGAIN_CONTROL, 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetControl(Player* player, bool on)
|
void SetControl(Player* player, bool on)
|
||||||
@@ -85,23 +91,31 @@ public:
|
|||||||
{
|
{
|
||||||
case EVENT_REMOVE_CONTROL:
|
case EVENT_REMOVE_CONTROL:
|
||||||
if (Player* player = me->GetCharmerOrOwnerPlayerOrPlayerItself())
|
if (Player* player = me->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||||
|
{
|
||||||
|
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
|
||||||
SetControl(player, false);
|
SetControl(player, false);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case EVENT_SPEAK_1:
|
case EVENT_SPEAK_1:
|
||||||
Talk(EYE_TEXT_LAUNCH, me->GetCharmerOrOwnerPlayerOrPlayerItself());
|
Talk(EYE_TEXT_LAUNCH, me->GetCharmerOrOwnerPlayerOrPlayerItself());
|
||||||
break;
|
break;
|
||||||
case EVENT_LAUNCH:
|
case EVENT_LAUNCH:
|
||||||
{
|
{
|
||||||
Movement::PointsArray path;
|
me->SetSpeed(MOVE_FLIGHT, 5.0f, true);
|
||||||
path.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
|
||||||
path.push_back(G3D::Vector3(me->GetPositionX()-40.0f, me->GetPositionY(), me->GetPositionZ()+10.0f));
|
const Position EYE_DESTINATION_1 = { me->GetPositionX()-40.0f, me->GetPositionY(), me->GetPositionZ()+10.0f, 0.0f };
|
||||||
path.push_back(G3D::Vector3(1768.0f, -5876.0f, 153.0f));
|
const Position EYE_DESTINATION_2 = { 1768.0f, -5876.0f, 153.0f, 0.0f };
|
||||||
me->GetMotionMaster()->MoveSplinePath(&path);
|
|
||||||
|
me->GetMotionMaster()->MovePoint(EYE_POINT_DESTINATION_1, EYE_DESTINATION_1);
|
||||||
|
me->GetMotionMaster()->MovePoint(EYE_POINT_DESTINATION_2, EYE_DESTINATION_2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EVENT_REGAIN_CONTROL:
|
case EVENT_REGAIN_CONTROL:
|
||||||
if (Player* player = me->GetCharmerOrOwnerPlayerOrPlayerItself())
|
if (Player* player = me->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||||
{
|
{
|
||||||
|
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
|
||||||
|
me->SetSpeed(MOVE_FLIGHT, 3.3f, true);
|
||||||
|
|
||||||
SetControl(player, true);
|
SetControl(player, true);
|
||||||
Talk(EYE_TEXT_CONTROL, player);
|
Talk(EYE_TEXT_CONTROL, player);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user