Jump to content

[FIX] Blessed Life


Guest Most_Mangos

Recommended Posts

Description of the bug?

we correct spell Blessed Life

For which repository revision was the patch created?

10180+

Is there a thread in the bug report section or at lighthouse?

none

Who has been writing this patch?

--

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 0a3b89a..df72ec7 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -543,7 +543,17 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
            pVictim->SetStandState(UNIT_STAND_STATE_STAND);
    }

-    if(!damage)
+    // Blessed Life
+    if( pVictim->GetTypeId() == TYPEID_PLAYER )
+    {
+        Unit::AuraList const& BlessedLife = pVictim->GetAurasByType(SPELL_AURA_PROC_TRIGGER_SPELL);
+        for(Unit::AuraList::const_iterator i = BlessedLife.begin(); i != BlessedLife.end(); ++i)
+            if((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_PALADIN && (*i)->GetSpellProto()->SpellIconID == 2137)
+                if( urand(0,100) < (*i)->GetSpellProto()->procChance )
+                    damage *= 0.5;
+    }
+
+       if(!damage)
    {
        // Rage from physical damage received .
        if(cleanDamage && cleanDamage->damage && (damageSchoolMask & SPELL_SCHOOL_MASK_NORMAL) && pVictim->GetTypeId() == TYPEID_PLAYER && (pVictim->getPowerType() == POWER_RAGE))

Link to comment
Share on other sites

i think it should be proc-based, although atm we call it after actual damage deal - maybe need to add option for procs on hit but before damage deal and procs after..

also i see it checks for (!damage) after your code with "damage *= " maybe u need to check damage first if it is initialized?

Link to comment
Share on other sites

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