Core/SmartAI: Fixed waypoint pathing not resuming after evade.

This commit is contained in:
Malcrom
2013-12-03 23:41:11 -03:30
parent 81c73c2d53
commit e60fe4c303

View File

@@ -460,7 +460,6 @@ void SmartAI::EnterEvadeMode()
me->LoadCreaturesAddon();
me->SetLootRecipient(NULL);
me->ResetPlayerDamageReq();
GetScript()->ProcessEventsFor(SMART_EVENT_EVADE);//must be after aura clear so we can cast spells from db
SetRun(mRun);
@@ -475,7 +474,10 @@ void SmartAI::EnterEvadeMode()
me->GetMotionMaster()->MoveFollow(target, mFollowDist, mFollowAngle);
}
else
{
mCanCombatMove = true;
me->GetMotionMaster()->MoveTargetedHome();
}
Reset();
}
@@ -588,6 +590,9 @@ int SmartAI::Permissible(const Creature* creature)
void SmartAI::JustReachedHome()
{
GetScript()->ProcessEventsFor(SMART_EVENT_REACHED_HOME);
if (!UpdateVictim() && me->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE && me->GetWaypointPath())
me->ToCreature()->GetMotionMaster()->MovePath(me->GetWaypointPath(), true);
}
void SmartAI::EnterCombat(Unit* enemy)
@@ -787,8 +792,9 @@ void SmartAI::SetCombatMove(bool on)
}
else
{
me->StopMoving();
me->GetMotionMaster()->MovementExpired();
me->GetMotionMaster()->Clear(true);
me->StopMoving();
me->GetMotionMaster()->MoveIdle();
}
}