Jump to content

[9155][patch/dev] Paladin's Judgements & Seals


Guest KAPATEJIb

Recommended Posts

I updated patch. Hope KAPATEJIb doesn't mind ( db part is in the first post )

compatible revision 8994

added proc conditions for periodic damage Holy Vengenace and Blood Corruption

added Hammer of the Righteous as condition to Seal of Command multitarget proc

added scaling damage with stack amount to periodic damage of Seal of Corruption / Vengeace

minor modifications to multiplication in formulas (float * float and int * int instead of float * int )

Here is link ( forum diff doesn't like those brackets ][ for some reason )

http://pastebin.com/m5a19897e

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index f7ce356..d2679bf 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -2576,6 +2576,20 @@ void Spell::cast(bool skipCheck)

    FillTargetMap();

+    // let not attack nearby enemies when Seal of Command is not triggered by single target attack
+    if (m_spellInfo->Id == 20424)
+	{
+		bool aoeAttack = false;
+		if( m_caster->FindCurrentSpellBySpellId(53385) )	// Divine Storm
+			aoeAttack = true;
+		if( m_caster->FindCurrentSpellBySpellId(53595) )	// Hammer of the Righteous
+			aoeAttack = true;
+        
+		if( aoeAttack )
+            for (int numTargets = m_UniqueTargetInfo.size(); numTargets > 1; numTargets--)
+                m_UniqueTargetInfo.pop_back();
+	}
+
    if(m_spellState == SPELL_STATE_FINISHED)                // stop cast if spell marked as finish somewhere in FillTargetMap
    {
        SetExecutedCurrently(false);
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 186d538..2ae265a 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -4782,6 +4782,22 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
                }
                break;
            }
+            case SPELLFAMILY_PALADIN:
+            {
+                // Holy Vengeance / Blood Corruption
+                if ( m_spellProto->SpellIconID == 2292 && m_spellProto->SpellVisual[0] == 7902 )
+                {
+                    if (caster->GetTypeId() != TYPEID_PLAYER)
+                        return;
+                    // AP * 0.025 + SPH * 0.013 bonus per tick
+                    float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
+                    int32 holy = ((Player*)caster)->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) +
+                                 ((Player*)caster)->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellProto), GetTarget());
+					m_modifier.m_amount += int32(GetStackAmount()) * (int32(ap * 0.025f) + int32(holy * 13 / 1000));
+                    return;
+                }
+                break;
+            }
            default:
                break;
        }
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 35a478b..64f160e 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -641,8 +641,16 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
            }
            case SPELLFAMILY_PALADIN:
            {
+                // Judgement of Righteousness - receive benefit from Spell Damage and Attack power
+                if (m_spellInfo->Id == 20187)
+                {
+                    float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
+                    int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
+                                 m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget);
+                    damage += int32(ap * 0.2f) + int32(holy * 32 / 100);
+                }
                // Judgement of Vengeance/Corruption ${1+0.22*$SPH+0.14*$AP} + 10% for each application of Holy Vengeance/Blood Corruption on the target
-                if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x800000000)) && m_spellInfo->SpellIconID==2292)
+                else if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x800000000)) && m_spellInfo->SpellIconID==2292)
                {
                    uint32 debuf_id;
                    switch(m_spellInfo->Id)
@@ -1836,14 +1844,6 @@ void Spell::EffectDummy(uint32 i)

            switch(m_spellInfo->Id)
            {
-                // Judgement of Righteousness (0.2*$AP+0.32*$SPH) holy added in spellDamagBonus
-                case 20187:
-                {
-                    if (!unitTarget)
-                        return;
-                    m_damage+=int32(0.2f*m_caster->GetTotalAttackPowerValue(BASE_ATTACK));
-                    return;
-                }
                case 31789:                                 // Righteous Defense (step 1)
                {
                    if (m_caster->GetTypeId() != TYPEID_PLAYER)
@@ -2664,8 +2664,16 @@ void Spell::EffectHeal( uint32 /*i*/ )

        int32 addhealth = damage;

+        // Seal of Light proc
+        if (m_spellInfo->Id == 20167)
+        {
+            float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
+            int32 holy = caster->SpellBaseHealingBonus(GetSpellSchoolMask(m_spellInfo)) +
+                         caster->SpellBaseHealingBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget);
+            addhealth += int32(ap * 0.15) + int32(holy * 15 / 100);  
+        }
        // Vessel of the Naaru (Vial of the Sunwell trinket)
-        if (m_spellInfo->Id == 45064)
+        else if (m_spellInfo->Id == 45064)
        {
            // Amount of heal - depends from stacked Holy Energy
            int damageAmount = 0;
@@ -4654,12 +4662,13 @@ void Spell::EffectWeaponDmg(uint32 i)
        }
        case SPELLFAMILY_PALADIN:
        {
-            // Seal of Command - receive benefit from Spell Damage and Healing
-            if(m_spellInfo->SpellFamilyFlags & UI64LIT(0x00000002000000))
+            // Judgement of Command - receive benefit from Spell Damage and Attack Power
+            if(m_spellInfo->SpellFamilyFlags & UI64LIT(0x00020000000000))
            {
-                spellBonusNeedWeaponDamagePercentMod = true;// apply weaponDamagePercentMod to spell_bonus (and then to all bonus, fixes and weapon already have applied)
-                spell_bonus += int32(0.23f*m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)));
-                spell_bonus += int32(0.29f*m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget));
+                float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
+                int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
+                             m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget);
+                spell_bonus += int32(ap * 0.08f) + int32(holy * 13 / 100);
            }
            break;
        }
@@ -4805,18 +4814,6 @@ void Spell::EffectWeaponDmg(uint32 i)
        if(m_caster->GetTypeId()==TYPEID_PLAYER)
            ((Player*)m_caster)->AddComboPoints(unitTarget, 1);
    }
-    else if(m_spellInfo->SpellFamilyName==SPELLFAMILY_PALADIN)
-    {
-        // Judgement of Blood/of the Martyr backlash damage (33%)
-        if(m_spellInfo->SpellFamilyFlags & 0x0000000800000000LL && m_spellInfo->SpellIconID==153)
-        {
-            int32 damagePoint  = m_damage * 33 / 100;
-            if(m_spellInfo->Id == 31898)
-                m_caster->CastCustomSpell(m_caster, 32220, &damagePoint, NULL, NULL, true);
-            else
-                m_caster->CastCustomSpell(m_caster, 53725, &damagePoint, NULL, NULL, true);
-        }
-    }

    // take ammo
    if(m_attackType == RANGED_ATTACK && m_caster->GetTypeId() == TYPEID_PLAYER)
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index bc98152..8bbbfdb 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -1649,7 +1649,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
                if ((spellInfo_1->SpellIconID == 1487) && (spellInfo_2->SpellIconID == 1487))
                    return false;

-            }
+                // Seal of Corruption
+                if (spellInfo_1->SpellIconID == 2292 && spellInfo_2->SpellIconID == 2292)
+                    return false;
+			}

            // Blessing of Sanctuary (multi-family check, some from 16 spell icon spells)
            if (spellInfo_2->Id == 67480 && spellInfo_1->Id == 20911)
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 5bcac41..1640625 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -6095,8 +6095,8 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
                {
                    if(effIndex != 0)                       // effect 1,2 used by seal unleashing code
                        return false;
-
-                    triggered_spell_id = 31803;
+					if( ( procFlag & PROC_FLAG_SUCCESSFUL_MELEE_HIT ) || ( procSpell && procSpell->Id == 53595 ) )
+						triggered_spell_id = 31803;

                    // Add 5-stack effect
                    int8 stacks = 0;
@@ -6196,7 +6196,8 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
                    if(effIndex != 0)                       // effect 1,2 used by seal unleashing code
                        return false;

-                    triggered_spell_id = 53742;
+					if( ( procFlag & PROC_FLAG_SUCCESSFUL_MELEE_HIT ) || ( procSpell && procSpell->Id == 53595 ) )
+						triggered_spell_id = 53742;

                    // Add 5-stack effect
                    int8 stacks = 0;
@@ -9003,17 +9004,6 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
            break;
        }
        case SPELL_DAMAGE_CLASS_MELEE:
-        {
-            // Judgement of Command proc always crits on stunned target
-            if(spellProto->SpellFamilyName == SPELLFAMILY_PALADIN)
-            {
-                if(spellProto->SpellFamilyFlags & 0x0000000000800000LL && spellProto->SpellIconID == 561)
-                {
-                    if(pVictim->hasUnitState(UNIT_STAT_STUNNED))
-                        return true;
-                }
-            }
-        }
        case SPELL_DAMAGE_CLASS_RANGED:
        {
            if (pVictim)

Link to comment
Share on other sites

  • 3 weeks 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