Permalink
Browse files

Core/Movement: Changed casting check in TargetedMovementGenerator to …

…be able to freely manipulate cast+move interaction in scripts
  • Loading branch information...
1 parent 397d844 commit 4b81de9d3a3578a7e6b9dad79cec709dc9fa0c83 @Shauren Shauren committed Apr 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
View
2 src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
@@ -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
- if (owner.IsNonMeleeSpellCasted(false, false, true))
+ if (owner.HasUnitState(UNIT_STATE_CASTING))
{
if (!owner.IsStopped())
owner.StopMoving();

7 comments on commit 4b81de9

@lukaasm

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
TrinityCore member

fix #5403?

@Warpten
TrinityCore member

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

@Vincent-Michael
TrinityCore member

Kologarn eye beam works fine :)

@Xanvial

did it fix #5726?

@2010phenix

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

@Shauren
TrinityCore member

@Xanvial: yes it should

Please sign in to comment.