Skip to content

Commit

Permalink
Core/Movement: Changed casting check in TargetedMovementGenerator to …
Browse files Browse the repository at this point in the history
…be able to freely manipulate cast+move interaction in scripts
  • Loading branch information
Shauren committed Apr 13, 2012
1 parent 397d844 commit 4b81de9
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -135,7 +135,7 @@ bool TargetedMovementGeneratorMedium<T,D>::Update(T &owner, const uint32 & time_
} }


// prevent movement while casting spells with cast time or channel time // prevent movement while casting spells with cast time or channel time
if (owner.IsNonMeleeSpellCasted(false, false, true)) if (owner.HasUnitState(UNIT_STATE_CASTING))
{ {
if (!owner.IsStopped()) if (!owner.IsStopped())
owner.StopMoving(); owner.StopMoving();
Expand Down

7 comments on commit 4b81de9

@lukaasm
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stopping movement should be done rather only while casting/channeling spell with: SPELL_INTERRUPT_FLAG_MOVEMENT or
CHANNEL_INTERRUPT_FLAG_INTERRUPT (which I think really is movement interrupt for channels :])

adding new state UNIT_STATE_CASTING_NOT_MOVE for casting spells with those interrupt flags shouldn't hurt :p

@Vincent-Michael
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix #5403?

@Warpten
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, should fix that track rotation shit with bitchlion, thanks, gonna check when i get back my comp.

@Vincent-Michael
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kologarn eye beam works fine :)

@Xanvial
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did it fix #5726?

@2010phenix
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warpten - you are make me smile ))
bitchlion
to Shauren us always thanks.

@Shauren
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Xanvial: yes it should

Please sign in to comment.