- Timestamp:
- 11/19/08 13:48:54 (17 years ago)
- Location:
- trunk/src/game
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Spell.cpp
r229 r231 2143 2143 m_selfContainer = &(m_caster->m_currentSpells[GetCurrentContainer()]); 2144 2144 SendSpellStart(); 2145 m_caster->addUnitState(UNIT_STAT_CASTING); 2145 2146 } 2146 2147 } … … 2667 2668 return; 2668 2669 2670 if(m_spellState == SPELL_STATE_FINISHED) 2671 return; 2672 2673 m_spellState = SPELL_STATE_FINISHED; 2674 2669 2675 if(IsChanneledSpell(m_spellInfo)) 2670 2676 m_caster->UpdateInterruptMask(); 2671 2677 2672 if(m_spellState == SPELL_STATE_FINISHED) 2673 return; 2674 2675 m_spellState = SPELL_STATE_FINISHED; 2678 if(!m_caster->IsNonMeleeSpellCasted(false, false, true)) 2679 m_caster->clearUnitState(UNIT_STAT_CASTING); 2676 2680 2677 2681 //remove spell mods … … 2708 2712 } 2709 2713 2710 if (IsMeleeAttackResetSpell())2714 /*if (IsMeleeAttackResetSpell()) 2711 2715 { 2712 2716 m_caster->resetAttackTimer(BASE_ATTACK); 2713 2717 if(m_caster->haveOffhandWeapon()) 2714 2718 m_caster->resetAttackTimer(OFF_ATTACK); 2715 } 2719 }*/ 2716 2720 2717 2721 /*if (IsRangedAttackResetSpell()) -
trunk/src/game/Unit.cpp
r229 r231 284 284 } 285 285 286 if(uint32 base_att = getAttackTimer(BASE_ATTACK)) 287 setAttackTimer(BASE_ATTACK, (p_time >= base_att ? 0 : base_att - p_time) ); 288 if(uint32 ranged_att = getAttackTimer(RANGED_ATTACK)) 289 setAttackTimer(RANGED_ATTACK, (p_time >= ranged_att ? 0 : ranged_att - p_time) ); 290 if(uint32 off_att = getAttackTimer(OFF_ATTACK)) 291 setAttackTimer(OFF_ATTACK, (p_time >= off_att ? 0 : off_att - p_time) ); 286 if(!hasUnitState(UNIT_STAT_CASTING)) 287 { 288 if(uint32 base_att = getAttackTimer(BASE_ATTACK)) 289 setAttackTimer(BASE_ATTACK, (p_time >= base_att ? 0 : base_att - p_time) ); 290 if(uint32 ranged_att = getAttackTimer(RANGED_ATTACK)) 291 setAttackTimer(RANGED_ATTACK, (p_time >= ranged_att ? 0 : ranged_att - p_time) ); 292 if(uint32 off_att = getAttackTimer(OFF_ATTACK)) 293 setAttackTimer(OFF_ATTACK, (p_time >= off_att ? 0 : off_att - p_time) ); 294 } 292 295 293 296 // update abilities available only for fraction of time -
trunk/src/game/Unit.h
r229 r231 364 364 UNIT_STAT_ISOLATED = 0x2000, // area auras do not affect other players 365 365 UNIT_STAT_ATTACK_PLAYER = 0x4000, 366 UNIT_STAT_CASTING = 0x8000, 366 367 UNIT_STAT_ALL_STATE = 0xffff //(UNIT_STAT_STOPPED | UNIT_STAT_MOVING | UNIT_STAT_IN_COMBAT | UNIT_STAT_IN_FLIGHT) 367 368 };