Core/Movement: Fix issues where creatures cancel spell casts chasing target and Implement SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING
This commit is contained in:
1 parent
dbd1d58f9d
commit
d3dae41ded
5 files changed
+28
-8
No files matched your search
@@ -2962,6 +2962,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);
|
||||
|
||||
Reference in new issue
Block a user