summaryrefslogtreecommitdiff
path: root/src/game/Entities/Unit/Unit.cpp
diff options
context:
space:
mode:
authorsucofog <4pdcvicente@gmail.com>2017-11-14 22:50:25 +0100
committersucofog <4pdcvicente@gmail.com>2017-11-14 22:50:25 +0100
commit3b73e99ec8c511707cb096e2607a18f1ef95b8fe (patch)
tree7b85a379832ca68ba3d2a0d18e6e16e8caa7a179 /src/game/Entities/Unit/Unit.cpp
parent1ea009e255dc371e5d0d3b98a0b33867a0927cb8 (diff)
parente772b08c6808bae29db96ed2f51ee5b34d768da4 (diff)
Merge branch 'master' of https://github.com/azerothcore/azerothcore-wotlk
Diffstat (limited to 'src/game/Entities/Unit/Unit.cpp')
-rw-r--r--src/game/Entities/Unit/Unit.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game/Entities/Unit/Unit.cpp b/src/game/Entities/Unit/Unit.cpp
index 5166c71504..07b6b93b3a 100644
--- a/src/game/Entities/Unit/Unit.cpp
+++ b/src/game/Entities/Unit/Unit.cpp
@@ -3395,6 +3395,15 @@ int32 Unit::GetCurrentSpellCastTime(uint32 spell_id) const
return 0;
}
+bool Unit::CanMoveDuringChannel() const
+{
+ if (Spell* spell = m_currentSpells[CURRENT_CHANNELED_SPELL])
+ if (spell->getState() != SPELL_STATE_FINISHED)
+ return spell->GetSpellInfo()->HasAttribute(SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING) && spell->IsChannelActive();
+
+ return false;
+}
+
bool Unit::isInFrontInMap(Unit const* target, float distance, float arc) const
{
return IsWithinDistInMap(target, distance) && HasInArc(arc, target);