fix(Scripts/UtgardePinnacle): Fix Skadi gauntlet add movement and reset (#25359)
Co-authored-by: Gustavo <sirikfoll@hotmail.com> Co-authored-by: maximius <19688589+maximius@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -113,8 +113,6 @@ Position const FirstWaveLocations[FIRST_WAVE_SIZE] =
|
||||
{ 481.388f, -507.109f, 104.724f, 3.26377f },
|
||||
};
|
||||
|
||||
Position const SecondaryWavesInitialPoint = { 478.743f, -505.576f, 104.724f };
|
||||
|
||||
enum GraufPoints
|
||||
{
|
||||
POINT_BREACH = 0,
|
||||
@@ -122,11 +120,19 @@ enum GraufPoints
|
||||
POINT_RIGHT = 2,
|
||||
};
|
||||
|
||||
uint32 const PATH_INITIAL = 2689300;
|
||||
uint32 const PATH_RIGHT = 2689301;
|
||||
uint32 const PATH_LEFT = 2689302;
|
||||
enum GraufPaths
|
||||
{
|
||||
PATH_INITIAL = 2689300,
|
||||
PATH_RIGHT = 2689301,
|
||||
PATH_LEFT = 2689302,
|
||||
PATH_BREACH_RIGHT = 2689303,
|
||||
PATH_BREACH_LEFT = 2689304,
|
||||
PATH_GAUNTLET_ADDS = 2669000,
|
||||
};
|
||||
|
||||
float const BreachFacing = 2.670354f;
|
||||
float const BreathFacingRight = 3.124139f;
|
||||
float const BreathFacingLeft = 3.228859f;
|
||||
|
||||
enum Events
|
||||
{
|
||||
@@ -139,6 +145,7 @@ enum Events
|
||||
// Grauf
|
||||
EVENT_GRAUF_START = 10,
|
||||
EVENT_GRAUF_LEAVE_BREACH = 11,
|
||||
EVENT_GRAUF_BREATH_START = 12,
|
||||
EVENT_GRAUF_REMOVE_AURA = 13,
|
||||
};
|
||||
|
||||
@@ -193,7 +200,10 @@ public:
|
||||
case NPC_YMIRJAR_WITCH_DOCTOR:
|
||||
case NPC_YMIRJAR_HARPOONER:
|
||||
if (_firstWaveSummoned)
|
||||
summon->GetMotionMaster()->MovePoint(1, SecondaryWavesInitialPoint);
|
||||
{
|
||||
summon->LoadPath(PATH_GAUNTLET_ADDS);
|
||||
summon->GetMotionMaster()->MoveWaypoint(PATH_GAUNTLET_ADDS, false);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -404,6 +414,7 @@ public:
|
||||
_summons.DespawnAll();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetSpeedRate(MOVE_RUN, 2.5f);
|
||||
_flyingToSide = false;
|
||||
}
|
||||
|
||||
void DoAction(int32 param) override
|
||||
@@ -430,9 +441,19 @@ public:
|
||||
{
|
||||
if (type == ESCORT_MOTION_TYPE && me->movespline->Finalized())
|
||||
{
|
||||
me->SetFacingTo(BreachFacing);
|
||||
Talk(EMOTE_ON_RANGE);
|
||||
_events.ScheduleEvent(EVENT_GRAUF_LEAVE_BREACH, 10s);
|
||||
if (_flyingToSide)
|
||||
{
|
||||
_flyingToSide = false;
|
||||
me->SetFacingTo(_lastSide == POINT_LEFT ? BreathFacingLeft : BreathFacingRight);
|
||||
Talk(EMOTE_DEEP_BREATH);
|
||||
_events.ScheduleEvent(EVENT_GRAUF_BREATH_START, 2s);
|
||||
}
|
||||
else
|
||||
{
|
||||
me->SetFacingTo(BreachFacing);
|
||||
Talk(EMOTE_ON_RANGE);
|
||||
_events.ScheduleEvent(EVENT_GRAUF_LEAVE_BREACH, 10s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,16 +464,20 @@ public:
|
||||
{
|
||||
case EVENT_GRAUF_LEAVE_BREACH:
|
||||
_lastSide = RAND(POINT_LEFT, POINT_RIGHT);
|
||||
me->GetMotionMaster()->MovePath(_lastSide == POINT_LEFT ? PATH_LEFT : PATH_RIGHT, FORCED_MOVEMENT_RUN);
|
||||
|
||||
if (_lastSide == POINT_LEFT)
|
||||
DoCast(me, SPELL_FREEZING_CLOUD_LEFT_PERIODIC);
|
||||
else
|
||||
DoCast(me, SPELL_FREEZING_CLOUD_RIGHT_PERIODIC);
|
||||
|
||||
_flyingToSide = true;
|
||||
me->GetMotionMaster()->MovePath(
|
||||
_lastSide == POINT_LEFT ? PATH_BREACH_LEFT : PATH_BREACH_RIGHT,
|
||||
FORCED_MOVEMENT_RUN);
|
||||
break;
|
||||
case EVENT_GRAUF_BREATH_START:
|
||||
me->GetMotionMaster()->MovePath(
|
||||
_lastSide == POINT_LEFT ? PATH_LEFT : PATH_RIGHT,
|
||||
FORCED_MOVEMENT_RUN);
|
||||
DoCast(me, _lastSide == POINT_LEFT
|
||||
? SPELL_FREEZING_CLOUD_LEFT_PERIODIC
|
||||
: SPELL_FREEZING_CLOUD_RIGHT_PERIODIC);
|
||||
if (Creature* skadi = _instance->GetCreature(DATA_SKADI_THE_RUTHLESS))
|
||||
skadi->AI()->DoAction(ACTION_DRAKE_BREATH);
|
||||
|
||||
_events.ScheduleEvent(EVENT_GRAUF_REMOVE_AURA, 10s);
|
||||
break;
|
||||
case EVENT_GRAUF_REMOVE_AURA:
|
||||
@@ -480,6 +505,7 @@ public:
|
||||
EventMap _events;
|
||||
SummonList _summons;
|
||||
uint8 _lastSide = POINT_LEFT;
|
||||
bool _flyingToSide = false;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user