mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Scripts/OnyxiaLair:
- Potential null pointer crash fix - Reset react state properly on wipes during air phase
This commit is contained in:
@@ -153,7 +153,7 @@ public:
|
||||
SetCombatMovement(true);
|
||||
|
||||
_Reset();
|
||||
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
instance->SetData(DATA_ONYXIA_PHASE, Phase);
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
@@ -162,12 +162,10 @@ public:
|
||||
{
|
||||
_EnterCombat();
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
events.ScheduleEvent(EVENT_FLAME_BREATH, urand(10000, 20000));
|
||||
events.ScheduleEvent(EVENT_TAIL_SWEEP, urand(15000, 20000));
|
||||
events.ScheduleEvent(EVENT_CLEAVE, urand(2000, 5000));
|
||||
events.ScheduleEvent(EVENT_WING_BUFFET, urand(10000, 20000));
|
||||
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
|
||||
@@ -331,9 +329,10 @@ public:
|
||||
{
|
||||
if (HealthBelowPct(65))
|
||||
{
|
||||
if (Unit* target = me->GetVictim())
|
||||
tankGUID = target->GetGUID();
|
||||
SetCombatMovement(false);
|
||||
Phase = PHASE_BREATH;
|
||||
tankGUID = me->GetVictim()->GetGUID();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AttackStop();
|
||||
me->GetMotionMaster()->MovePoint(10, Phase2Location);
|
||||
|
||||
Reference in New Issue
Block a user