Jump to content

Recommended Posts

Posted

The current system only supports ppm rates for caster auras. As there are also proc trigger auras that are casted on the victim with a wepon dependen proc rate, we need to support that in the core.

Example: http://www.wowhead.com/?spell=20185, http://www.wowhead.com/?spell=20186 (Dummy procs, heal or energize effect)

From 7c902ff7b37919c1dac773381c805b68cd446918 Mon Sep 17 00:00:00 2001
From: pasdVn <[email protected]>
Date: Sun, 7 Jun 2009 18:23:22 +0200
Subject: [PATCH] Fixed ppm handling for victim auras

---
src/game/Unit.cpp |   17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index feeed7a..31ee900 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -11751,10 +11751,19 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura* aura, SpellEntry con
    if(spellProcEvent && spellProcEvent->customChance)
        chance = spellProcEvent->customChance;
    // If PPM exist calculate chance from PPM
-    if(!isVictim && spellProcEvent && spellProcEvent->ppmRate != 0)
-    {
-        uint32 WeaponSpeed = GetAttackTime(attType);
-        chance = GetPPMProcChance(WeaponSpeed, spellProcEvent->ppmRate);
+    if(spellProcEvent && spellProcEvent->ppmRate != 0)
+    {
+        uint32 WeaponSpeed;
+     if(!isVictim)
+     {
+         WeaponSpeed = GetAttackTime(attType);
+         chance = GetPPMProcChance(WeaponSpeed, spellProcEvent->ppmRate);
+     }
+     else
+     {
+         WeaponSpeed = pVictim->GetAttackTime(attType);
+         chance = pVictim->GetPPMProcChance(WeaponSpeed, spellProcEvent->ppmRate);
+     }
    }
    // Apply chance modifer aura
    if(Player* modOwner = GetSpellModOwner())
-- 
1.5.5.1

github: http://github.com/pasdVn/mangos/commit/7c902ff7b37919c1dac773381c805b68cd446918.patch

"Judgement of Light" and "Judgement of Wisdom" nee spell_proc_event enries to use the ppm system:

/*Judgement of Light/ Judgement os Wisdom*/
DELETE FROM spell_proc_event WHERE entry IN (20185, 20186);
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
(20185, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0),
(20186, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0);

  • 1 month later...
  • 4 months 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