fix(Scripts/BlackMorass): Adds should walk towards Medivh. (#14945)

This commit is contained in:
UltraNix
2023-02-12 12:27:25 +01:00
committed by GitHub
parent 726bd6a8c1
commit 48ce957597
7 changed files with 290 additions and 287 deletions

View File

@@ -248,14 +248,14 @@ void MotionMaster::MoveRandom(float wanderDistance)
}
}
void MotionMaster::MoveTargetedHome()
void MotionMaster::MoveTargetedHome(bool walk /*= false*/)
{
Clear(false);
if (_owner->GetTypeId() == TYPEID_UNIT && !_owner->ToCreature()->GetCharmerOrOwnerGUID())
{
LOG_DEBUG("movement.motionmaster", "Creature ({}) targeted home", _owner->GetGUID().ToString());
Mutate(new HomeMovementGenerator<Creature>(), MOTION_SLOT_ACTIVE);
Mutate(new HomeMovementGenerator<Creature>(walk), MOTION_SLOT_ACTIVE);
}
else if (_owner->GetTypeId() == TYPEID_UNIT && _owner->ToCreature()->GetCharmerOrOwnerGUID())
{