Jump to content

[fix][7879] Arcane Potency


Guest Tanatos

Recommended Posts

What bug does the patch fix? What features does the patch add?

- This patch would implement the mage talent Arcane Potency.

For which repository revision was the patch created?

- 7319

diff --git a/Unit.cpp b/Unit.cpp
index 97a26d9..6601aed 100644
--- a/Unit.cpp
+++ b/Unit.cpp
@@ -4808,6 +4808,19 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
                triggered_spell_id = 29077;
                break;
            }
+       //Arcane Potency
+           if (dummySpell->SpellIconID == 2120)
+           {
+               if(!procSpell)
+                    return false;
+
+               switch (dummySpell->Id)
+              {
+        case 31571: triggered_spell_id = 57529; break;
+        case 31572: triggered_spell_id = 57531; break;
+        }
+           break;
+           }
            // Hot Streak
            if (dummySpell->SpellIconID == 2999)
            {

@@ -10277,6 +10290,7 @@ bool InitTriggerAuraData()
    isTriggerAura[sPELL_AURA_PRAYER_OF_MENDING] = true;
    isTriggerAura[sPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE] = true;
    isTriggerAura[sPELL_AURA_MOD_DAMAGE_FROM_CASTER] = true;
+   isTriggerAura[sPELL_AURA_MOD_SPELL_CRIT_CHANCE] = true;

    isNonTriggerAura[sPELL_AURA_MOD_POWER_REGEN]=true;
    isNonTriggerAura[sPELL_AURA_REDUCE_PUSHBACK]=true;

@@ -10536,6 +10550,10 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
                if (triggeredByAura->GetCasterGUID() != pTarget->GetGUID())
                    continue;
                break;
+    case SPELL_AURA_MOD_SPELL_CRIT_CHANCE:
+                if (!procSpell)
+                    continue;
+                break;
            default:
                // nothing do, just charges counter
                break;

diff --git a/Spell.cpp b/Spell.cpp
index 9a15b9e..407c3f0 100644
--- a/Spell.cpp
+++ b/Spell.cpp
@@ -699,8 +699,8 @@ void Spell::PrepareDataForTriggerSystem()
    {
        switch (m_spellInfo->SpellFamilyName)
        {
-            case SPELLFAMILY_MAGE:    // Arcane Missles / Blizzard triggers need do it
-                if (m_spellInfo->SpellFamilyFlags & 0x0000000000200080LL) m_canTrigger = true;
+            case SPELLFAMILY_MAGE:    // Arcane Missles / Blizzard triggers / Clearcasting for Arcane Potency need do it
+                if (m_spellInfo->SpellFamilyFlags & 0x0000000000200080LL || m_spellInfo->SpellIconID == 212) m_canTrigger = true;
            break;
            case SPELLFAMILY_WARLOCK: // For Hellfire Effect / Rain of Fire / Seed of Corruption triggers need do it
                if (m_spellInfo->SpellFamilyFlags & 0x0000800000000060LL) m_canTrigger = true;

SQL

-- Arcane Potency
DELETE FROM `spell_proc_event` WHERE `entry` IN (31571, 31572);
INSERT INTO `spell_proc_event` VALUES
(31571, 0x00, 3, 0x00000000, 0x00000022, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0)
, (31572, 0x00, 3, 0x00000000, 0x00000022, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0);

Testing)

The note: Maybe - some bugs from the permission trigger Clearcasting. If those appear - please report.

Link to comment
Share on other sites

  • 2 weeks later...
+          case SPELL_AURA_MOD_SPELL_CRIT_CHANCE:
+                             if (!procSpell)
+                                    continue;
+                             break;

Not needed, as I think.

As well as

+                   if(!procSpell)
+                             return false;

but that's only peanuts^^

This code allow remove buff after next spell cast, used proc trigger system

Thanks all for test. :)

Wait my new patches for other talents and spells ;)

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 1 month later...

Thx for applying patch :)

But I think, that need added very important part of patch.

Arcane Potency must trigger from Clearcasting, but Clearcasting is trigger spell too and in Mangos sources start trigger from trigger spell is forbidden.

Because we must allow trigger from Clearcasting specify, else with proc_event - Cleacasting do not start trigger Arcane Potency

This is fix:

Spell.cpp

void Spell:: PrepareDataForTriggerSystem()

    {
        switch (m_spellInfo->SpellFamilyName)
        {
-            case SPELLFAMILY_MAGE:    // Arcane Missles / Blizzard triggers need do it
-                if (m_spellInfo->SpellFamilyFlags & 0x0000000000200080LL) m_canTrigger = true;
+            case SPELLFAMILY_MAGE:    // Arcane Missles / Blizzard triggers / Clearcasting trigger need do it
+                if (m_spellInfo->SpellFamilyFlags & 0x0000000000200080LL || (m_spellInfo->SpellFamilyFlags & 0x0000000200000000LL && m_spellInfo->SpellFamilyFlags2 & 0x00000008LL)) m_canTrigger = true;
            break;
            case SPELLFAMILY_WARLOCK: // For Hellfire Effect / Rain of Fire / Seed of Corruption triggers need do it
                if (m_spellInfo->SpellFamilyFlags & 0x0000800000000060LL) m_canTrigger = true;

Ps: (m_spellInfo->SpellFamilyFlags & 0x0000000200000000LL && m_spellInfo->SpellFamilyFlags2 & 0x00000008LL) - this is Clearcasting flags, maybe find better way of this check. :)

Link to comment
Share on other sites

  • 3 weeks later...
Thx for applying patch :)

But I think, that need added very important part of patch.

Arcane Potency must trigger from Clearcasting, but Clearcasting is trigger spell too and in Mangos sources start trigger from trigger spell is forbidden.

Because we must allow trigger from Clearcasting specify, else with proc_event - Cleacasting do not start trigger Arcane Potency

This is fix:

Spell.cpp

void Spell:: PrepareDataForTriggerSystem()

    {
        switch (m_spellInfo->SpellFamilyName)
        {
-            case SPELLFAMILY_MAGE:    // Arcane Missles / Blizzard triggers need do it
-                if (m_spellInfo->SpellFamilyFlags & 0x0000000000200080LL) m_canTrigger = true;
+            case SPELLFAMILY_MAGE:    // Arcane Missles / Blizzard triggers / Clearcasting trigger need do it
+                if (m_spellInfo->SpellFamilyFlags & 0x0000000000200080LL || (m_spellInfo->SpellFamilyFlags & 0x0000000200000000LL && m_spellInfo->SpellFamilyFlags2 & 0x00000008LL)) m_canTrigger = true;
            break;
            case SPELLFAMILY_WARLOCK: // For Hellfire Effect / Rain of Fire / Seed of Corruption triggers need do it
                if (m_spellInfo->SpellFamilyFlags & 0x0000800000000060LL) m_canTrigger = true;

Ps: (m_spellInfo->SpellFamilyFlags & 0x0000000200000000LL && m_spellInfo->SpellFamilyFlags2 & 0x00000008LL) - this is Clearcasting flags, maybe find better way of this check. :)

It works perfectly now :)

I'm getting Arcane Potency after my Clearcasts.

Thank You

EDIT: Please accept the second fix too.

Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use