From 5a2f0ce29e29d934c200f617fec6dad619fab9a5 Mon Sep 17 00:00:00 2001 From: ccrs Date: Thu, 27 Apr 2017 19:40:23 +0200 Subject: Core/Unit: revert 3ea46e57af After discussion we realized, ariel and me, that Creature and Unit IsMovementPreventedByCasting() have not the same checks (order matters) --- src/server/game/Entities/Unit/Unit.cpp | 3 --- src/server/game/Entities/Unit/Unit.h | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'src/server/game/Entities/Unit') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 0e81d3384b9..fc1aed52609 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3325,9 +3325,6 @@ bool Unit::IsMovementPreventedByCasting() const if (spell->GetSpellInfo()->IsMoveAllowedChannel()) return false; - if (const_cast(this)->IsFocusing(nullptr, true)) - return false; - // prohibit movement for all other spell casts return true; } diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 55dc8040de3..3312e88d3ba 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -1903,9 +1903,7 @@ class TC_GAME_API Unit : public WorldObject int32 GetCurrentSpellCastTime(uint32 spell_id) const; virtual bool IsFocusing(Spell const* /*focusSpell*/ = nullptr, bool /*withDelay*/ = false) { return false; } - - // Check if our current channel spell has attribute SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING - bool IsMovementPreventedByCasting() const; + virtual bool IsMovementPreventedByCasting() const; SpellHistory* GetSpellHistory() { return m_spellHistory; } SpellHistory const* GetSpellHistory() const { return m_spellHistory; } -- cgit v1.2.3