fix(Core/Scripts): Ayamiss crashfix (#12610)
This commit is contained in:
parent
cee21c022a
commit
e6dd5d3e22
1 changed files with 6 additions and 3 deletions
|
|
@ -141,7 +141,7 @@ public:
|
|||
me->GetMotionMaster()->MovePoint(POINT_AIR, AyamissAirPos);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit*, uint32& /*damage*/, DamageEffectType, SpellSchoolMask) override
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
if (_phase == PHASE_AIR && me->GetHealthPct() < 70.0f)
|
||||
{
|
||||
|
|
@ -150,8 +150,11 @@ public:
|
|||
me->ClearUnitState(UNIT_STATE_ROOT);
|
||||
me->SetCanFly(false);
|
||||
me->SetDisableGravity(false);
|
||||
Position VictimPos = me->GetVictim()->GetPosition();
|
||||
me->GetMotionMaster()->MovePoint(POINT_GROUND, VictimPos);
|
||||
if (Unit* victim = me->GetVictim())
|
||||
{
|
||||
Position victimPos = victim->GetPosition();
|
||||
me->GetMotionMaster()->MovePoint(POINT_GROUND, victimPos);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_LASH, urand(5000, 8000));
|
||||
events.CancelEvent(EVENT_POISON_STINGER);
|
||||
DoResetThreat();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue