diff options
| author | sucofog <4pdcvicente@gmail.com> | 2017-11-14 22:50:25 +0100 |
|---|---|---|
| committer | sucofog <4pdcvicente@gmail.com> | 2017-11-14 22:50:25 +0100 |
| commit | 3b73e99ec8c511707cb096e2607a18f1ef95b8fe (patch) | |
| tree | 7b85a379832ca68ba3d2a0d18e6e16e8caa7a179 /src/game/Entities/Unit/Unit.cpp | |
| parent | 1ea009e255dc371e5d0d3b98a0b33867a0927cb8 (diff) | |
| parent | e772b08c6808bae29db96ed2f51ee5b34d768da4 (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.cpp | 9 |
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); |
