Jump to content

[10478][fix] Shadowmourne Visual Effect


Auntie Mangos

Recommended Posts

What bug does the patch fix? What features does the patch add?

This adds the visual effect of Shadowmourne when it stacks

For which repository revision was the patch created?

9765

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

http://getmangos.eu/community/showthread.php?13582-Shadowmourne-Aura-affect

Who has been writing this patch? Please include either forum user names or email addresses.

Me

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index e13d4de..38d0865 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -5483,8 +5483,17 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
                        return false;

                    Aura *aur = GetAura(71905, EFFECT_INDEX_0);
+                    if (aur && uint32(aur->GetStackAmount()) == 0)
+                        CastSpell(this, 72521, false);       // First Effect
+
+                    if (aur && uint32(aur->GetStackAmount()) == 6)
+                    {
+                        RemoveAurasDueToSpell(72521);       // remove First Effect
+                        CastSpell(this, 72523, false);       // Second Effect
+                    }
                    if (aur && uint32(aur->GetStackAmount() + 1) >= aur->GetSpellProto()->StackAmount)
                    {
+                        RemoveAurasDueToSpell(72523);       // remove Second Effect
                        RemoveAurasDueToSpell(71905);
                        CastSpell(this, 71904, true);       // Chaos Bane
                        return true;

comments:

This is the first time i write something for a spell, before this i've only made custom configs for various stuff, so i would appreciate it if someone more experienced can respond on this :P

Sysgaming (see bug report thread) confirmed this works

Link to comment
Share on other sites

  • 40 years later...

For future reference, it's easier to test if you post a diff.

Simple diff containing your changes.

git diff > my.patch

OR

Create full patch

git commit -a -m "Short commit message"
git format-patch -1 ./

Both methods create a new file in your repository, copy the contents and post that in the forum or paste2.org.

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...
Does not work as intended, when stacks fade the effect still persist.

And it does not trigger on first stack, only on second.

likely fixed the stack amount needed for it to show up, it removes the visual after Chaos Bane is triggered by the max stack amount (or atleast...it DID)

Link to comment
Share on other sites

If you get a stack, and then right click to remove it, you will have visual effect forever, which isn't correct.

try this

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index ae03a34..9989ea0 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -5520,15 +5520,27 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
                        return false;

                    Aura *aur = GetAura(71905, EFFECT_INDEX_0);
-                    if (aur && uint32(aur->GetStackAmount() + 1) >= aur->GetSpellProto()->StackAmount)
+                    if (aur && uint32(aur->GetStackAmount() + 1) == 0)
+                    {
+                        RemoveAurasDueToSpell(72521);       // Remove First Effect
+                        RemoveAurasDueToSpell(72523);
+                    }
+                    else if (aur && uint32(aur->GetStackAmount()) == 0)
+                        CastSpell(this, 72521, false);      // First Effect
+                    else if (aur && uint32(aur->GetStackAmount()) == 5)
+                    {
+                        RemoveAurasDueToSpell(72521);       // Remove First Effect
+                        CastSpell(this, 72523, false);      // Second Effect
+                    }
+                    else if (aur && uint32(aur->GetStackAmount() + 1) >= aur->GetSpellProto()->StackAmount)
                    {
                        RemoveAurasDueToSpell(71905);
+                        RemoveAurasDueToSpell(72523);       // Remove Second Effect
                        CastSpell(this, 71904, true);       // Chaos Bane
                        return true;
                    }
                    else
                        triggered_spell_id = 71905;
-
                    break;
                }

i have no idea (yet) how to check if the stackamount is 0 outside of the spell case -.-

Link to comment
Share on other sites

  • 2 months later...
Is there a Update for the current rev?

try:

From d1aa4dfb671b87ebb12dbb7b4419e2ea30be7ce2 Mon Sep 17 00:00:00 2001
From: Dark <[email protected]>
Date: Fri, 20 Aug 2010 20:09:01 +0200
Subject: [PATCH] Possible fix for ShadowMourne visual effect

Signed-off-by: Dark <[email protected]>
---
src/game/UnitAuraProcHandler.cpp |   17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp
index 4b09458..28b1230 100644
--- a/src/game/UnitAuraProcHandler.cpp
+++ b/src/game/UnitAuraProcHandler.cpp
@@ -960,9 +960,24 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
                        return SPELL_AURA_PROC_FAILED;

                    SpellAuraHolder *aurHolder = GetSpellAuraHolder(71905);
-                    if (aurHolder && uint32(aurHolder->GetStackAmount() + 1) >= aurHolder->GetSpellProto()->StackAmount)
+                    if (aurHolder && uint32(aurHolder->GetStackAmount() + 1) == 0)
+                    {
+                        RemoveAurasDueToSpell(72521);       // Remove First Effect
+                        RemoveAurasDueToSpell(72523);       // Remove Second Effect
+                    }
+                    else if (aurHolder && uint32(aurHolder->GetStackAmount() + 1) == 1)
+                    {
+                        CastSpell(this, 72521, true);      // First Effect
+                    }
+                    else if (aurHolder && uint32(aurHolder->GetStackAmount() + 1) == 6)
+                    {
+                        RemoveAurasDueToSpell(72521);       // Remove First Effect
+                        CastSpell(this, 72523, true);      // Add Second Effect
+                    }
+                    else if (aurHolder && uint32(aurHolder->GetStackAmount() + 1) >= aurHolder->GetSpellProto()->StackAmount)
                    {
                        RemoveAurasDueToSpell(71905);
+                        RemoveAurasDueToSpell(72523);       // Remove Second Effect
                        CastSpell(this, 71904, true);       // Chaos Bane
                        return SPELL_AURA_PROC_OK;
                    }
-- 
1.7.0.2

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