Jump to content

[fix][5962] Leech Spells Dmg Bonus


Auntie Mangos

Recommended Posts

Restoring patch http://getmangos.eu/community/viewtopic.php?id=21657 not breaking spells

Tested partially

Index: Unit.cpp
===================================================================
--- Unit.cpp                (revision 5923)
+++ Unit.cpp                (working copy)
@@ -6917,7 +6917,6 @@
                // Distribute Damage over multiple effects, reduce by AoE
                CastingTime = GetCastingTimeForBonus( spellProto, damagetype, CastingTime );         

-                /* FIXME: need replace hardocded spell modifiers by common leech effects/auras code
                // 50% for damage and healing spells for leech spells from damage bonus and 0% from healing

                for(int j = 0; j < 3; ++j)
@@ -6929,8 +6928,7 @@
                                                break;
                                }
                }
-                */
-
+                
                switch(spellProto->SpellFamilyName)
                {
                                case SPELLFAMILY_MAGE:
@@ -6994,26 +6992,11 @@
                                                {
                                                                CastingTime = 4025;
                                                }
-                                                // Death Coil - 21.4% of Shadow Damage
-                                                else if((spellProto->SpellFamilyFlags & 0x80000LL) && spellProto->SpellIconID == 88)
-                                                {
-                                                                CastingTime = 749;
-                                                } 
                                                // Curse of Agony - 120% of Shadow Damage
                                                else if((spellProto->SpellFamilyFlags & 0x0000000400LL) && spellProto->SpellIconID == 544)
                                                {
                                                                DotFactor = 1.2f;
                                                }
-                                                // Siphon Life - 100% of Shadow Damage
-                                                else if((spellProto->SpellFamilyFlags & 0x0100000000LL) && spellProto->SpellIconID == 152)
-                                                {
-                                                                DotFactor = 1.0f; 
-                                                }
-                                                // Drain Life 
-                                                else if((spellProto->SpellFamilyFlags & 0x8LL) && spellProto->SpellIconID == 546)
-                                                {
-                                                                CastingTime = 2500; 
-                                                }
                                                // Drain Mana - 0% of Shadow Damage
                                                else if((spellProto->SpellFamilyFlags & 0x10LL) && spellProto->SpellIconID == 548)
                                                {
@@ -7117,11 +7100,6 @@
                                                {
                                                                CastingTime = 350;
                                                }
-                                                // Devouring Plague - 80%
-                                                else if ((spellProto->SpellFamilyFlags & 0x2000000000LL) && spellProto->SpellIconID == 9) 
-                                                {
-                                                                DotFactor = 0.8f;
-                                                }
                                                break;
                                case SPELLFAMILY_DRUID:
                                                // Hurricane triggered spell
@@ -7422,7 +7400,6 @@
                // distribute healing to all effects, reduce AoE damage
                CastingTime = GetCastingTimeForBonus( spellProto, damagetype, CastingTime );         

-                /*
                // 0% bonus for damage and healing spells for leech spells from healing bonus
                for(int j = 0; j < 3; ++j)
                {
@@ -7433,8 +7410,7 @@
                                                break;
                                }
                }
-                */
-
+                
                // Exception
                switch (spellProto->SpellFamilyName)
                {

[updated]

+fix Siphon Life and Devouring Plague

[added]

Other spells in this exception list has no auras Health Leech or Periodic Leech

Link to comment
Share on other sites

  • 38 years later...

Ok, I test spells with removed custom code and have (with debug check):

1) spell 27223 and related applied now "-5% of total per any additional effect" so result bonus less original code where just 50% reduction set. Not sure for 100% is this correct, but i think yes. And then more correct in new code.

2) spell 30911 and related no changes in final value (DotFactor 1->2 CastingTime 100% -> 50%)

3) spell 27220 and related in old code have 2500 cast time, but in generic code Castem time set to 1500, after 50% reduction this is 750, so 1/3 from old code bonus size. But it not listed as exceptions so notmal code must generate correct value. If it not generate then this is not patch problem.

4) spell 2944 and related no changes in final value (DotFactor 0.8->1.6 CastingTime 100% -> 50%)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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