mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-08 02:00:29 +00:00
fix(Core/Scripts): Fix Missile Barrage and Clearcasting proc with Arcane Missiles (#24958)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
-- Fix Missile Barrage / Clearcasting proc interaction with Arcane Missiles
|
||||
-- 1) PROC_ATTR_REQ_SPELLMOD was incorrectly blocking Missile Barrage from
|
||||
-- proccing because the channel spell (42846) is not in m_appliedMods.
|
||||
-- Restrict via SpellFamilyMask to Arcane Missiles (0x800) instead.
|
||||
-- 2) Register Clearcasting script to give Missile Barrage priority
|
||||
UPDATE `spell_proc` SET `AttributesMask` = 0, `SpellFamilyMask0` = 0x800 WHERE `SpellId` = 44401;
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` = 12536 AND `ScriptName` = 'spell_mage_clearcasting';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (12536, 'spell_mage_clearcasting');
|
||||
@@ -10027,9 +10027,10 @@ bool Player::HasSpellModApplied(SpellModifier* mod, Spell* spell)
|
||||
|
||||
void Player::SetSpellModTakingSpell(Spell* spell, bool apply)
|
||||
{
|
||||
if (apply && m_spellModTakingSpell && m_spellModTakingSpell != spell)
|
||||
if (apply && m_spellModTakingSpell != nullptr)
|
||||
return;
|
||||
else if (!apply && m_spellModTakingSpell != spell)
|
||||
|
||||
if (!apply && (!m_spellModTakingSpell || m_spellModTakingSpell != spell))
|
||||
return;
|
||||
|
||||
m_spellModTakingSpell = apply ? spell : nullptr;
|
||||
|
||||
@@ -3911,9 +3911,6 @@ void Spell::_cast(bool skipCheck)
|
||||
// we must send smsg_spell_go packet before m_castItem delete in TakeCastItem()...
|
||||
SendSpellGo();
|
||||
|
||||
if (modOwner)
|
||||
modOwner->SetSpellModTakingSpell(this, true);
|
||||
|
||||
bool resetAttackTimers = IsAutoActionResetSpell() && !m_spellInfo->HasAttribute(SPELL_ATTR2_DO_NOT_RESET_COMBAT_TIMERS);
|
||||
if (resetAttackTimers)
|
||||
{
|
||||
|
||||
@@ -71,7 +71,8 @@ enum MageSpells
|
||||
SPELL_MAGE_CHILLED_R3 = 12486,
|
||||
SPELL_MAGE_MANA_SURGE = 37445,
|
||||
SPELL_MAGE_FROST_NOVA = 122,
|
||||
SPELL_MAGE_LIVING_BOMB_R1 = 44457
|
||||
SPELL_MAGE_LIVING_BOMB_R1 = 44457,
|
||||
SPELL_MAGE_MISSILE_BARRAGE_PROC = 44401
|
||||
};
|
||||
|
||||
enum MageSpellIcons
|
||||
@@ -1504,6 +1505,31 @@ class spell_mage_ice_block : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 12536 - Clearcasting
|
||||
class spell_mage_clearcasting : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_clearcasting);
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
|
||||
if (!spellInfo)
|
||||
return true;
|
||||
|
||||
// Missile Barrage has priority over Clearcasting for Arcane Missiles
|
||||
if (spellInfo->SpellFamilyName == SPELLFAMILY_MAGE && (spellInfo->SpellFamilyFlags[0] & 0x800))
|
||||
if (GetTarget()->HasAura(SPELL_MAGE_MISSILE_BARRAGE_PROC))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_mage_clearcasting::CheckProc);
|
||||
}
|
||||
};
|
||||
|
||||
// 44401 - Missile Barrage (proc buff)
|
||||
class spell_mage_missile_barrage_proc : public AuraScript
|
||||
{
|
||||
@@ -1575,6 +1601,7 @@ void AddSC_mage_spell_scripts()
|
||||
RegisterSpellScript(spell_mage_ice_block);
|
||||
RegisterSpellScript(spell_mage_imp_blizzard);
|
||||
RegisterSpellScript(spell_mage_imp_mana_gems);
|
||||
RegisterSpellScript(spell_mage_clearcasting);
|
||||
RegisterSpellScript(spell_mage_missile_barrage);
|
||||
RegisterSpellScript(spell_mage_missile_barrage_proc);
|
||||
RegisterSpellScript(spell_mage_blast_wave);
|
||||
|
||||
Reference in New Issue
Block a user