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

@@ -65,7 +65,7 @@ void HomeMovementGenerator<Creature>::_setTargetLocation(Creature* owner)
owner->UpdateAllowedPositionZ(x, y, z);
init.MoveTo(x, y, z, DisableMgr::IsPathfindingEnabled(owner->FindMap()), true);
init.SetWalk(false);
init.SetWalk(_walk);
init.Launch();
arrived = false;

View File

@@ -29,7 +29,7 @@ template <>
class HomeMovementGenerator<Creature> : public MovementGeneratorMedium< Creature, HomeMovementGenerator<Creature> >
{
public:
HomeMovementGenerator() : arrived(false), i_recalculateTravel(false) {}
HomeMovementGenerator(bool walk) : arrived(false), i_recalculateTravel(false), _walk(walk) {}
~HomeMovementGenerator() {}
void DoInitialize(Creature*);
@@ -43,5 +43,6 @@ private:
void _setTargetLocation(Creature*);
bool arrived : 1;
bool i_recalculateTravel : 1;
bool _walk;
};
#endif