Jump to content

[fix]Hungering Cold(diseases/Frost Fever)


Recommended Posts

Posted

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

prevents Hungering Cold removing from diseases and lets it cast Frost Fever

For which repository revision was the patch created?

9362

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

haven't seen any

Who has been writing this patch? Please include either forum user names or email addresses.

me

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 6c75c09..7414bbb 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -6279,6 +6279,12 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
                case 49039: spellId1 = 50397; break;        // Lichborne
                case 48263: spellId1 = 61261; break;        // Frost Presence
                case 48265: spellId1 = 49772; break;        // Unholy Presence move speed
+                case 51209:                                    // Hungering Cold (Frost Fever apply)
+                {
+                    if (apply)
+                        spellId1 = 55095;
+                    break;
+                }
                default: return;
            }
            break;
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 46be355..0f62ace 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -7043,6 +7043,15 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
                triggered_spell_id = dummySpell->EffectTriggerSpell[effIndex];
                break;
            }
+            // Hungering Cold
+            if (dummySpell->Id == 51209)
+            {
+                // prevent breaking from diseases
+                if (procSpell && procSpell->Dispel == DISPEL_DISEASE)
+                    return false;
+                else
+                    return true;
+            }
            break;
        }
        default:
@@ -12386,6 +12395,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
            case SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN:
            case SPELL_AURA_MANA_SHIELD:
            case SPELL_AURA_OBS_MOD_MANA:
+            case SPELL_AURA_MOD_STUN:
            case SPELL_AURA_ADD_PCT_MODIFIER:
            case SPELL_AURA_PERIODIC_DUMMY:
            case SPELL_AURA_DUMMY:

  • 7 months later...
Posted

another version from KillerFrca updated to 1053*

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index f31d5a4..b077c07 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -2180,6 +2180,19 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
                }
                break;
            }
+            case SPELLFAMILY_DEATHKNIGHT:
+            {
+                // Hungering Cold - disease apply
+                if(GetId() == 51209)
+                {
+                    Unit *caster = GetCaster();
+                    if(!caster)
+                        return;
+
+                    caster->CastSpell(target, 55095, true);
+                }
+                break;
+            }
        }
    }
    // AT REMOVE
diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp
index 922bfd6..90cade9 100644
--- a/src/game/UnitAuraProcHandler.cpp
+++ b/src/game/UnitAuraProcHandler.cpp
@@ -2711,6 +2711,12 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
                // triggered_spell_id in spell data
                break;
            }
+            // Hungering Cold - not break from diseases
+            if (dummySpell->SpellIconID == 2797)
+            {
+                if (procSpell && procSpell->Dispel == DISPEL_DISEASE)
+                    return SPELL_AURA_PROC_FAILED;
+            }
            break;
        }
        default:

×
×
  • 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