mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[6968] Replace check for spell category removed in 3.0.x with spellid.
Should fix not interrupting wand casting by other spell cast. Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
963c6e5cf7
commit
784cf098b0
4 changed files with 8 additions and 7 deletions
|
|
@ -1904,6 +1904,7 @@ enum CorpseDynFlags
|
||||||
#define SPELL_ID_PASSIVE_RESURRECTION_SICKNESS 15007
|
#define SPELL_ID_PASSIVE_RESURRECTION_SICKNESS 15007
|
||||||
#define SPELL_ID_WEAPON_SWITCH_COOLDOWN_1_5s 6119
|
#define SPELL_ID_WEAPON_SWITCH_COOLDOWN_1_5s 6119
|
||||||
#define SPELL_ID_WEAPON_SWITCH_COOLDOWN_1_0s 6123
|
#define SPELL_ID_WEAPON_SWITCH_COOLDOWN_1_0s 6123
|
||||||
|
#define SPELL_ID_AUTOSHOT 75 // used for checks in other spells interruption
|
||||||
|
|
||||||
enum WeatherType
|
enum WeatherType
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -724,7 +724,7 @@ void Spell::prepareDataForTriggerSystem()
|
||||||
m_procAttacker = PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL;
|
m_procAttacker = PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL;
|
||||||
m_procVictim = PROC_FLAG_TAKEN_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_procAttacker = PROC_FLAG_SUCCESSFUL_RANGED_SPELL_HIT;
|
||||||
m_procVictim = PROC_FLAG_TAKEN_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)
|
// shoot spells used equipped item cooldown values already assigned in GetAttackTime(RANGED_ATTACK)
|
||||||
// prevent 0 cooldowns set by another way
|
// 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);
|
rec = _player->GetAttackTime(RANGED_ATTACK);
|
||||||
|
|
||||||
// Now we have cooldown data (if found any), time to apply mods
|
// Now we have cooldown data (if found any), time to apply mods
|
||||||
|
|
|
||||||
|
|
@ -2786,7 +2786,7 @@ void Unit::_UpdateAutoRepeatSpell()
|
||||||
if ( (GetTypeId() == TYPEID_PLAYER && ((Player*)this)->isMoving()) || IsNonMeleeSpellCasted(false,false,true) )
|
if ( (GetTypeId() == TYPEID_PLAYER && ((Player*)this)->isMoving()) || IsNonMeleeSpellCasted(false,false,true) )
|
||||||
{
|
{
|
||||||
// cancel wand shoot
|
// 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);
|
InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
|
||||||
m_AutoRepeatFirstCast = true;
|
m_AutoRepeatFirstCast = true;
|
||||||
return;
|
return;
|
||||||
|
|
@ -2839,7 +2839,7 @@ void Unit::SetCurrentCastedSpell( Spell * pSpell )
|
||||||
if ( m_currentSpells[CURRENT_AUTOREPEAT_SPELL] )
|
if ( m_currentSpells[CURRENT_AUTOREPEAT_SPELL] )
|
||||||
{
|
{
|
||||||
// break autorepeat if not Auto Shot
|
// 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);
|
InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
|
||||||
m_AutoRepeatFirstCast = true;
|
m_AutoRepeatFirstCast = true;
|
||||||
}
|
}
|
||||||
|
|
@ -2853,14 +2853,14 @@ void Unit::SetCurrentCastedSpell( Spell * pSpell )
|
||||||
|
|
||||||
// it also does break autorepeat if not Auto Shot
|
// it also does break autorepeat if not Auto Shot
|
||||||
if ( m_currentSpells[CURRENT_AUTOREPEAT_SPELL] &&
|
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);
|
InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case CURRENT_AUTOREPEAT_SPELL:
|
case CURRENT_AUTOREPEAT_SPELL:
|
||||||
{
|
{
|
||||||
// only Auto Shoot does not break anything
|
// 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
|
// generic autorepeats break generic non-delayed and channeled non-delayed spells
|
||||||
InterruptSpell(CURRENT_GENERIC_SPELL,false);
|
InterruptSpell(CURRENT_GENERIC_SPELL,false);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "6967"
|
#define REVISION_NR "6968"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue