mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[8077] Resolve mixed store and use 2 different flags values types in single field.
* Create new monster move field in Creature class and use it in all cases when expected use MONSTER_MOVE_* flags. * Store and use MOVEMENTFLAG_* values in field in MovementInfo structure of Player class. * Cleanups and fix related code. NOTE: DB in creature_addon store values similar MONSTER_MOVE_* flags, scritps also expected set only this flags.
This commit is contained in:
parent
00fc1d7593
commit
21a6a26386
24 changed files with 215 additions and 201 deletions
|
|
@ -2579,7 +2579,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 || !m_caster->HasUnitMovementFlag(MOVEMENTFLAG_FALLING)))
|
||||
(m_spellInfo->Effect[0] != SPELL_EFFECT_STUCK || !((Player*)m_caster)->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING)))
|
||||
{
|
||||
// always cancel for channeled spells
|
||||
if( m_spellState == SPELL_STATE_CASTING )
|
||||
|
|
@ -2611,7 +2611,7 @@ void Spell::update(uint32 difftime)
|
|||
if( m_caster->GetTypeId() == TYPEID_PLAYER )
|
||||
{
|
||||
// check if player has jumped before the channeling finished
|
||||
if(m_caster->HasUnitMovementFlag(MOVEMENTFLAG_JUMPING))
|
||||
if(((Player*)m_caster)->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_JUMPING))
|
||||
cancel();
|
||||
|
||||
// check for incapacitating player states
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue