Skip to content

Commit

Permalink
Revert "Remove respective incapacitate states on movegen finalize"
Browse files Browse the repository at this point in the history
Incorrect usage, these are spell handlers only, this completely breaks CC spells overlapping.
  • Loading branch information
Warlockbugs committed Nov 2, 2017
1 parent dda0a6f commit 85acd4b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions src/game/MotionGenerators/ConfusedMovementGenerator.cpp
Expand Up @@ -106,15 +106,13 @@ template<>
void ConfusedMovementGenerator<Player>::Finalize(Player& unit) const
{
unit.clearUnitState(UNIT_STAT_CONFUSED | UNIT_STAT_CONFUSED_MOVE);
unit.SetConfused(false);
unit.StopMoving(true);
}

template<>
void ConfusedMovementGenerator<Creature>::Finalize(Creature& unit) const
{
unit.clearUnitState(UNIT_STAT_CONFUSED | UNIT_STAT_CONFUSED_MOVE);
unit.SetConfused(false);
}

template void ConfusedMovementGenerator<Player>::Initialize(Player& player);
Expand Down
3 changes: 1 addition & 2 deletions src/game/MotionGenerators/FleeingMovementGenerator.cpp
Expand Up @@ -145,7 +145,6 @@ template<>
void FleeingMovementGenerator<Creature>::Finalize(Creature& owner) const
{
owner.clearUnitState(UNIT_STAT_FLEEING | UNIT_STAT_FLEEING_MOVE);
owner.SetFeared(false);
}

template<class T>
Expand Down Expand Up @@ -197,7 +196,7 @@ template bool FleeingMovementGenerator<Creature>::Update(Creature&, const uint32

void TimedFleeingMovementGenerator::Finalize(Unit& owner)
{
FleeingMovementGenerator<Creature>::Finalize((Creature&)owner);
owner.clearUnitState(UNIT_STAT_FLEEING | UNIT_STAT_FLEEING_MOVE);
if (Unit* victim = owner.getVictim())
{
if (owner.isAlive())
Expand Down

0 comments on commit 85acd4b

Please sign in to comment.