mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[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:
parent
18fb4db8f2
commit
948d76800d
3 changed files with 12 additions and 8 deletions
|
|
@ -341,11 +341,8 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi
|
|||
m_glyphIndex = 0;
|
||||
m_triggeredByAuraSpell = NULL;
|
||||
|
||||
//Auto Shot & Shoot
|
||||
if( m_spellInfo->AttributesEx2 == 0x000020 && !triggered )
|
||||
m_autoRepeat = true;
|
||||
else
|
||||
m_autoRepeat = false;
|
||||
//Auto Shot & Shoot (wand)
|
||||
m_autoRepeat = IsAutoRepeatRangedSpell(m_spellInfo);
|
||||
|
||||
m_runesState = 0;
|
||||
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_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_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)
|
||||
// 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);
|
||||
|
||||
// Now we have cooldown data (if found any), time to apply mods
|
||||
|
|
|
|||
|
|
@ -414,6 +414,12 @@ inline bool isSpellBreakStealth(SpellEntry const* spellInfo)
|
|||
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);
|
||||
|
||||
inline bool IsChanneledSpell(SpellEntry const* spellInfo)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "6993"
|
||||
#define REVISION_NR "6994"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue