Jump to content

[small cleanup][7561] effectWeaponDmg


pasdVn

Recommended Posts

There is a hack that is used only for "Ambush":

From 6068ba20a2d2f32f1abd18ef415ecbd650c29a9c Mon Sep 17 00:00:00 2001
From: pasdVn <[email protected]>
Date: Fri, 27 Feb 2009 15:28:18 +0100
Subject: [PATCH] cleanup

---
src/game/SpellEffects.cpp |   14 ++------------
1 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 9d937a2..865e1f1 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -4288,7 +4288,6 @@ void Spell::EffectWeaponDmg(uint32 i)
    }

    // some spell specific modifiers
-    bool customBonusDamagePercentMod = false;
    bool spellBonusNeedWeaponDamagePercentMod = false;      // if set applied weapon damage percent mode to spell bonus

    float bonusDamagePercentMod  = 1.0f;                    // applied to fixed effect damage bonus if set customBonusDamagePercentMod
@@ -4331,14 +4330,8 @@ void Spell::EffectWeaponDmg(uint32 i)
        }
        case SPELLFAMILY_ROGUE:
        {
-            // Ambush
-            if(m_spellInfo->SpellFamilyFlags & 0x00000200LL)
-            {
-                customBonusDamagePercentMod = true;
-                bonusDamagePercentMod = 2.5f;               // 250%
-            }
            // Mutilate (for each hand)
-            else if(m_spellInfo->SpellFamilyFlags & 0x600000000LL)
+            if(m_spellInfo->SpellFamilyFlags & 0x600000000LL)
            {
                bool found = false;
                // fast check
@@ -4411,10 +4404,7 @@ void Spell::EffectWeaponDmg(uint32 i)
                weaponDamagePercentMod *= float(CalculateDamage(j,unitTarget)) / 100.0f;

                // applied only to prev.effects fixed damage
-                if(customBonusDamagePercentMod)
-                    fixed_bonus = int32(fixed_bonus*bonusDamagePercentMod);
-                else
-                    fixed_bonus = int32(fixed_bonus*weaponDamagePercentMod);
+                fixed_bonus = int32(fixed_bonus*weaponDamagePercentMod);
                break;
            default:
                break;                                      // not weapon damage effect, just skip
-- 
1.6.0.2.1172.ga5ed0

This isn't needed anymore. Maybe that was only a typo in the tooltip before. As you can see here http://wow.allakhazam.com/db/spellhistory.html?wspell=8676, this was changed and fits the generic way (28*2.75 = 77, for rank 1 as example).

Link to comment
Share on other sites

  • 2 weeks later...
  • 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