diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 882311934..58ebe242a 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -1904,6 +1904,7 @@ enum CorpseDynFlags #define SPELL_ID_PASSIVE_RESURRECTION_SICKNESS 15007 #define SPELL_ID_WEAPON_SWITCH_COOLDOWN_1_5s 6119 #define SPELL_ID_WEAPON_SWITCH_COOLDOWN_1_0s 6123 +#define SPELL_ID_AUTOSHOT 75 // used for checks in other spells interruption enum WeatherType { diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 325841e03..a658cd91f 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -724,7 +724,7 @@ void Spell::prepareDataForTriggerSystem() m_procAttacker = PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL; m_procVictim = PROC_FLAG_TAKEN_POSITIVE_SPELL; } - else if (m_spellInfo->Id == 5019) // Wands + else if (m_spellInfo->Id != SPELL_ID_AUTOSHOT) // Wands { m_procAttacker = PROC_FLAG_SUCCESSFUL_RANGED_SPELL_HIT; m_procVictim = PROC_FLAG_TAKEN_RANGED_SPELL_HIT; @@ -2445,7 +2445,7 @@ void Spell::SendSpellCooldown() // shoot spells used equipped item cooldown values already assigned in GetAttackTime(RANGED_ATTACK) // prevent 0 cooldowns set by another way - if (rec <= 0 && catrec <= 0 && (cat == 76 || cat == 351)) + if (rec <= 0 && catrec <= 0 && (cat == 76 || m_spellInfo->Id != SPELL_ID_AUTOSHOT)) rec = _player->GetAttackTime(RANGED_ATTACK); // Now we have cooldown data (if found any), time to apply mods diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index a339e1baa..1a88e3245 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -2786,7 +2786,7 @@ void Unit::_UpdateAutoRepeatSpell() if ( (GetTypeId() == TYPEID_PLAYER && ((Player*)this)->isMoving()) || IsNonMeleeSpellCasted(false,false,true) ) { // cancel wand shoot - if(m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Category == 351) + if(m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Id != SPELL_ID_AUTOSHOT) InterruptSpell(CURRENT_AUTOREPEAT_SPELL); m_AutoRepeatFirstCast = true; return; @@ -2839,7 +2839,7 @@ void Unit::SetCurrentCastedSpell( Spell * pSpell ) if ( m_currentSpells[CURRENT_AUTOREPEAT_SPELL] ) { // break autorepeat if not Auto Shot - if (m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Category == 351) + if (m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Id != SPELL_ID_AUTOSHOT) InterruptSpell(CURRENT_AUTOREPEAT_SPELL); m_AutoRepeatFirstCast = true; } @@ -2853,14 +2853,14 @@ void Unit::SetCurrentCastedSpell( Spell * pSpell ) // it also does break autorepeat if not Auto Shot if ( m_currentSpells[CURRENT_AUTOREPEAT_SPELL] && - m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Category == 351 ) + m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Id != SPELL_ID_AUTOSHOT ) InterruptSpell(CURRENT_AUTOREPEAT_SPELL); } break; case CURRENT_AUTOREPEAT_SPELL: { // only Auto Shoot does not break anything - if (pSpell->m_spellInfo->Category == 351) + if (pSpell->m_spellInfo->Id != SPELL_ID_AUTOSHOT) { // generic autorepeats break generic non-delayed and channeled non-delayed spells InterruptSpell(CURRENT_GENERIC_SPELL,false); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 299924ce0..03a261e0b 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "6967" + #define REVISION_NR "6968" #endif // __REVISION_NR_H__