mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[11780] fix the issue that HomeMovementGenerator finalize code wasn't executed in real meaning
This commit is contained in:
parent
50e7fbbf5e
commit
f572279a61
3 changed files with 7 additions and 6 deletions
|
|
@ -50,17 +50,19 @@ void HomeMovementGenerator<Creature>::_setTargetLocation(Creature & owner)
|
|||
init.SetWalk(false);
|
||||
init.Launch();
|
||||
|
||||
arrived = false;
|
||||
owner.clearUnitState(UNIT_STAT_ALL_STATE);
|
||||
}
|
||||
|
||||
bool HomeMovementGenerator<Creature>::Update(Creature &owner, const uint32& time_diff)
|
||||
{
|
||||
return !owner.movespline->Finalized();
|
||||
arrived = owner.movespline->Finalized();
|
||||
return !arrived;
|
||||
}
|
||||
|
||||
void HomeMovementGenerator<Creature>::Finalize(Creature& owner)
|
||||
{
|
||||
if (i_travel_timer == 0)
|
||||
if (arrived)
|
||||
{
|
||||
if (owner.GetTemporaryFactionFlags() & TEMPFACTION_RESTORE_REACH_HOME)
|
||||
owner.ClearTemporaryFaction();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue