Rebase resync

This commit is contained in:
Antz 2020-02-17 09:19:44 +00:00
parent a0797532e8
commit 1997c1e903
3106 changed files with 11118 additions and 627576 deletions

View file

@ -1,4 +1,4 @@
/*
/**
* This code is part of MaNGOS. Contributor & Copyright details are in AUTHORS/THANKS.
*
* This program is free software; you can redistribute it and/or modify
@ -65,10 +65,11 @@ void RandomMovementGenerator<Creature>::_setRandomLocation(Creature& creature)
template<>
void RandomMovementGenerator<Creature>::Initialize(Creature& creature)
{
if (!creature.isAlive())
creature.addUnitState(UNIT_STAT_ROAMING); // _MOVE set in _setRandomLocation
if (!creature.isAlive() || creature.hasUnitState(UNIT_STAT_NOT_MOVE))
return;
creature.addUnitState(UNIT_STAT_ROAMING | UNIT_STAT_ROAMING_MOVE);
_setRandomLocation(creature);
}
@ -82,14 +83,14 @@ template<>
void RandomMovementGenerator<Creature>::Interrupt(Creature& creature)
{
creature.clearUnitState(UNIT_STAT_ROAMING | UNIT_STAT_ROAMING_MOVE);
creature.SetWalk(false);
creature.SetWalk(!creature.hasUnitState(UNIT_STAT_RUNNING_STATE), false);
}
template<>
void RandomMovementGenerator<Creature>::Finalize(Creature& creature)
{
creature.clearUnitState(UNIT_STAT_ROAMING | UNIT_STAT_ROAMING_MOVE);
creature.SetWalk(false);
creature.SetWalk(!creature.hasUnitState(UNIT_STAT_RUNNING_STATE), false);
}
template<>