[6994] Fixing "create all" items crafting and possible other spells unexpected colldowns.

Note: auto-shoot still have problems with spell casting.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
GriffonHeart 2008-12-31 15:04:47 +03:00 committed by VladimirMangos
parent 18fb4db8f2
commit 948d76800d
3 changed files with 12 additions and 8 deletions

View file

@ -341,11 +341,8 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi
m_glyphIndex = 0; m_glyphIndex = 0;
m_triggeredByAuraSpell = NULL; m_triggeredByAuraSpell = NULL;
//Auto Shot & Shoot //Auto Shot & Shoot (wand)
if( m_spellInfo->AttributesEx2 == 0x000020 && !triggered ) m_autoRepeat = IsAutoRepeatRangedSpell(m_spellInfo);
m_autoRepeat = true;
else
m_autoRepeat = false;
m_runesState = 0; m_runesState = 0;
m_powerCost = 0; // setup to correct value in Spell::prepare, don't must be used before. m_powerCost = 0; // setup to correct value in Spell::prepare, don't must be used before.
@ -724,7 +721,8 @@ 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 != SPELL_ID_AUTOSHOT) // Wands // Wands
else if (IsAutoRepeatRangedSpell(m_spellInfo) && m_spellInfo->Id != SPELL_ID_AUTOSHOT)
{ {
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;
@ -2441,7 +2439,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 || m_spellInfo->Id != SPELL_ID_AUTOSHOT)) if (rec <= 0 && catrec <= 0 && (cat == 76 || IsAutoRepeatRangedSpell(m_spellInfo) && 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

View file

@ -414,6 +414,12 @@ inline bool isSpellBreakStealth(SpellEntry const* spellInfo)
return !(spellInfo->AttributesEx & SPELL_ATTR_EX_NOT_BREAK_STEALTH); return !(spellInfo->AttributesEx & SPELL_ATTR_EX_NOT_BREAK_STEALTH);
} }
inline bool IsAutoRepeatRangedSpell(SpellEntry const* spellInfo)
{
return (spellInfo->Attributes & SPELL_ATTR_RANGED) && (spellInfo->AttributesEx2 == 0x000020 /*autorepeat*/);
}
uint8 GetErrorAtShapeshiftedCast (SpellEntry const *spellInfo, uint32 form); uint8 GetErrorAtShapeshiftedCast (SpellEntry const *spellInfo, uint32 form);
inline bool IsChanneledSpell(SpellEntry const* spellInfo) inline bool IsChanneledSpell(SpellEntry const* spellInfo)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "6993" #define REVISION_NR "6994"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__