mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
Movement packets cleanup.
This commit is contained in:
parent
60f8b3874d
commit
b85417df73
16 changed files with 436 additions and 485 deletions
|
|
@ -2890,7 +2890,7 @@ void Spell::update(uint32 difftime)
|
|||
// check if the player caster has moved before the spell finished
|
||||
if ((m_caster->GetTypeId() == TYPEID_PLAYER && m_timer != 0) &&
|
||||
(m_castPositionX != m_caster->GetPositionX() || m_castPositionY != m_caster->GetPositionY() || m_castPositionZ != m_caster->GetPositionZ()) &&
|
||||
(m_spellInfo->Effect[0] != SPELL_EFFECT_STUCK || !((Player*)m_caster)->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING)))
|
||||
(m_spellInfo->Effect[0] != SPELL_EFFECT_STUCK || !((Player*)m_caster)->m_movementInfo.HasMovementFlag(MOVEFLAG_FALLING)))
|
||||
{
|
||||
// always cancel for channeled spells
|
||||
if( m_spellState == SPELL_STATE_CASTING )
|
||||
|
|
@ -2922,7 +2922,7 @@ void Spell::update(uint32 difftime)
|
|||
if( m_caster->GetTypeId() == TYPEID_PLAYER )
|
||||
{
|
||||
// check if player has jumped before the channeling finished
|
||||
if(((Player*)m_caster)->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_JUMPING))
|
||||
if(((Player*)m_caster)->m_movementInfo.HasMovementFlag(MOVEFLAG_JUMPING))
|
||||
cancel();
|
||||
|
||||
// check for incapacitating player states
|
||||
|
|
@ -4026,7 +4026,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
if( m_caster->GetTypeId() == TYPEID_PLAYER && ((Player*)m_caster)->isMoving() )
|
||||
{
|
||||
// skip stuck spell to allow use it in falling case and apply spell limitations at movement
|
||||
if( (!((Player*)m_caster)->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING) || m_spellInfo->Effect[0] != SPELL_EFFECT_STUCK) &&
|
||||
if( (!((Player*)m_caster)->m_movementInfo.HasMovementFlag(MOVEFLAG_FALLING) || m_spellInfo->Effect[0] != SPELL_EFFECT_STUCK) &&
|
||||
(IsAutoRepeat() || (m_spellInfo->AuraInterruptFlags & AURA_INTERRUPT_FLAG_NOT_SEATED) != 0) )
|
||||
return SPELL_FAILED_MOVING;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue