Jump to content

[patch in svn][4588] Giving Db A Priority For Items' Proc Chance Settings


Guest AuntieMangos

Recommended Posts

Discussion in Bug reports - http://getmangos.eu/community/viewtopic.php?id=1468.

In current dbc spell proc chance for spell 36111 (linked to item 30090) is not 101 anymore, it's 100% exactly. I prepared a patch to change core to make DB proc data override any dbc settings - imho that shouldn't be a problem for core.

Index: src/game/Player.cpp
===================================================================
--- src/game/Player.cpp        (revision 4587)
+++ src/game/Player.cpp        (working copy)
@@ -6141,16 +6141,15 @@

                float chance = spellInfo->procChance;

-                if(chance > 100)
+                if(spellData.SpellPPMRate)
                {
-                        if(spellData.SpellPPMRate)
-                        {
-                                uint32 WeaponSpeed = GetAttackTime(attType);
-                                chance = GetPPMProcChance(WeaponSpeed, spellData.SpellPPMRate);
-                        }
-                        else
-                                chance = GetWeaponProcChance();
+                        uint32 WeaponSpeed = GetAttackTime(attType);
+                        chance = GetPPMProcChance(WeaponSpeed, spellData.SpellPPMRate);
                }
+                else if(chance > 100)
+                {
+                        chance = GetWeaponProcChance();
+                }

                if (roll_chance_f(chance))
                        this->CastSpell(Target, spellInfo->Id, true, item);

Tested the item with ppmRate of 3 and 9 - chances look good.

Any comment would be appreciated.

Link to comment
Share on other sites

  • 37 years later...
  • 10 months later...
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