Jump to content

[bug] [7738] Frost Presence


Guest Kalandi

Recommended Posts

http://www.wowhead.com/?spell=48263

How it SHOULD work:

Total health increased by 10%.

Armor contribution from cloth, leather, mail and plate items increased by 80%.

Damage taken reduced by 5%.

What it does:

Increases the armor

Reduces the damage taken

What it does not:

Does not increases the health by 10%

Hope it gets repaired soon

Thank you , Have a nice day !

Link to comment
Share on other sites

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 0ace799..91a0f12 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -2377,6 +2377,12 @@ void Spell::cast(bool skipCheck)
                m_preCastSpell = 57723;                                // Exhaustion
            break;
        }
+        case SPELLFAMILY_DEATHKNIGHT:
+        {
+            if (m_spellInfo->Id == 48263)
+                m_preCastSpell = 61261;
+            break;
+        } 
        default:
            break;
    }
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 65c0a69..a40ed82 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -5597,6 +5597,13 @@ void Aura::CleanupTriggeredSpells()
        return;
    }

+    if (m_spellProto->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && m_spellProto->SpellFamilyFlags & 0x00008000LL && (m_spellProto->AttributesEx2 & 0x10) )
+    {
+        // Frost Presence +10% max. health remove
+        m_target->RemoveAurasDueToSpell(61261);
+        return;
+    }
+
    uint32 tSpellId = m_spellProto->EffectTriggerSpell[GetEffIndex()];
    if(!tSpellId)
        return;
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index edd592c..cb1eba3 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -1443,6 +1443,15 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
            if( spellInfo_1->Id == 2825 && spellInfo_2->SpellIconID == 38 && spellInfo_2->SpellVisual[0] == 0 )
                return false;
            break;
+        case SPELLFAMILY_DEATHKNIGHT:
+            if (spellInfo_2->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT)
+            {
+                //Frost Presence -> +10% max. health or +10% max. health -> Frost Presence
+                if ((spellInfo_2->Id == 48263 && spellInfo_1->Id == 61261) ||
+                    (spellInfo_2->Id == 61261 && spellInfo_1->Id == 48263))
+                    return false;
+            }
+            break; 
        default:
            break;
    }  

written by Astellar

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 65c0a69..0bc2914 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -4452,7 +4452,9 @@ void Aura::HandleAuraModBaseResistancePCT(bool apply, bool Real)
    }
    else
    {
-        for(int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL;x++)
+        if (GetId() == 48263 && apply)
+            m_target->CastSpell(m_target,61261,true,NULL,this);
+        for(int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL;x++)
        {
            if(m_modifier.m_miscvalue & int32(1<<x))
                m_target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), BASE_PCT, float(m_modifier.m_amount), apply);
@@ -5597,6 +5599,13 @@ void Aura::CleanupTriggeredSpells()
        return;
    }

+    if (m_spellProto->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && m_spellProto->SpellFamilyFlags & 0x00008000LL && (m_spellProto->AttributesEx2 & 0x10) )
+    {
+        // Frost Presence +10% max. health remove
+        m_target->RemoveAurasDueToSpell(61261);
+        return;
+    }
+
    uint32 tSpellId = m_spellProto->EffectTriggerSpell[GetEffIndex()];
    if(!tSpellId)
        return;
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index edd592c..cb1eba3 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -1443,6 +1443,15 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
            if( spellInfo_1->Id == 2825 && spellInfo_2->SpellIconID == 38 && spellInfo_2->SpellVisual[0] == 0 )
                return false;
            break;
+        case SPELLFAMILY_DEATHKNIGHT:
+            if (spellInfo_2->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT)
+            {
+                //Frost Presence -> +10% max. health or +10% max. health -> Frost Presence
+                if ((spellInfo_2->Id == 48263 && spellInfo_1->Id == 61261) ||
+                    (spellInfo_2->Id == 61261 && spellInfo_1->Id == 48263))
+                    return false;
+            }
+            break; 
        default:
            break;
    }  

One more variant by Astellar

Link to comment
Share on other sites

I just tested the second variant and works perfectly as I see

As I sayd in previos posts , it will be nice if the Mangos source will be updated so will be no need to apply so many patches every time you compile

Thank you , Have a nice day !

Link to comment
Share on other sites

  • 8 months 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