Skip to content

Commit 9156f66

Browse files
authored
Core/Spells: cancel player casts on movement (#469)
1 parent e4a44bc commit 9156f66

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/server/game/Spells/Spell.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4157,7 +4157,8 @@ void Spell::update(uint32 difftime)
41574157
// if charmed by creature, trust the AI not to cheat and allow the cast to proceed
41584158
// @todo this is a hack, "creature" movesplines don't differentiate turning/moving right now
41594159
// however, checking what type of movement the spline is for every single spline would be really expensive
4160-
if (!m_caster->ToUnit()->IsControlledByPlayer())
4160+
Unit* unitCaster = m_caster->ToUnit();
4161+
if (!unitCaster->GetCharmerGUID().IsCreature() && (!unitCaster->IsControlledByPlayer() || unitCaster->GetTypeId() == TYPEID_PLAYER))
41614162
cancel();
41624163
}
41634164

0 commit comments

Comments
 (0)