Allow walk when chasing (#23069)

This commit is contained in:
Sorikoff
2019-02-25 08:36:36 +00:00
committed by Giacomo Pozzoni
parent 47e1816bf7
commit c2f2db08aa
6 changed files with 20 additions and 9 deletions

View File

@@ -670,9 +670,8 @@ struct npc_dark_rider_of_acherus : public ScriptedAI
{
case EVENT_START_MOVING:
me->SetTarget(_horseGUID);
me->SetWalk(true);
if (Creature* horse = ObjectAccessor::GetCreature(*me, _horseGUID))
me->GetMotionMaster()->MoveChase(horse);
me->GetMotionMaster()->MoveChase(horse, {}, {}, true);
_events.ScheduleEvent(EVENT_DESPAWN_HORSE, 5s);
break;
case EVENT_DESPAWN_HORSE:

View File

@@ -908,6 +908,15 @@ class boss_thaladred_the_darkener : public CreatureScript
advisorbase_ai::Reset();
}
void AttackStart(Unit* who) override
{
if (!who || _inFakeDeath || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
if (me->Attack(who, true))
me->GetMotionMaster()->MoveChase(who, {}, {}, true);
}
void JustEngagedWith(Unit* who) override
{
Talk(SAY_THALADRED_AGGRO);