Jump to content

[9619] 4 spells related to 4 horsemen event (Naxxramas)


Guest przemratajczak

Recommended Posts

MaNGOS 9610

UDB 388

SD2 1653

4 horsemen marks

http://www.wowhead.com/?spell=28832

http://www.wowhead.com/?spell=28833

http://www.wowhead.com/?spell=28834

http://www.wowhead.com/?spell=28835

has to trigger damage aura with dmg related to amount of stacks present on aura target. I wrote code below, but when 2nd and next stacks apply server does not pass through Aura::HandleAuraDummy (it is executed only once, at initial stack apply). Don't know where to relocate this code to make it working :/

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index f887f6b..b0425c7 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -2390,6 +2390,33 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
                        if (Unit* caster = GetCaster())
                            caster->CastSpell(caster, 13138, true, NULL, this);
                        return;
+                    case 28832:                             // Mark of Korth'azz
+                    case 28833:                             // Mark of Blaumeux
+                    case 28834:                             // Mark of Rivendare
+                    case 28835:                             // Mark of Zeliek
+                    {
+                         Aura* aur = m_target->GetAura(GetId(), EFFECT_INDEX_0);
+                         if (!aur)
+                             return;
+
+                         uint8 stacks = aur->GetStackAmount();
+                         int32 damage = 0;
+
+                         if (stacks == 1)
+                            damage = 500;
+                         else if (stacks == 2)
+                            damage = 1500;
+                         else if (stacks == 3)
+                            damage = 4000;
+                         else if (stacks == 4)
+                            damage = 12500;
+                         else if (stacks > 4)
+                            damage = 20000 + 1000 * (stacks - 5);
+
+                         if (Unit* caster = GetCaster())
+                              caster->CastCustomSpell(m_target, 28836, &damage, NULL, NULL, true, NULL, this, caster->GetGUID());
+                         return;
+                    }
                    case 39850:                             // Rocket Blast
                        if (roll_chance_i(20))              // backfire stun
                            m_target->CastSpell(m_target, 51581, true, NULL, this);

EDIT:

Arrai pointed that problem is related to

       if (amount!=m_modifier.m_amount)
       {
           ApplyModifier(false, true);
           m_modifier.m_amount = amount;
           ApplyModifier(true, true);
       }

Link to comment
Share on other sites

  • 5 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