[Aura/Stacking] Trueshot Aura & Trueshot aura #2246

Closed
EnteringCombat opened this Issue Jul 6, 2011 · 5 comments

Comments

Projects
None yet
6 participants

Steps to reproduce this problem:
-Have 2 Marksmanship Hunters in your raid
-Have 1 of them activating Trueshot Aura
-Have the other hunter activating Trueshot Aura

What is suppost to happen?
There should be one trueshot aura on each hunter.

What do we see instead?
Both hunters have 2 Trueshot Auras, which increases all damage done by 20% upto 120%, or 10% then another 10% upto 121% total damage.

TrinityCore Hash: 6d53821087c8+
Os : Linux
TDB: 335.11.41

Larya commented Jul 7, 2011

Confirmed with all similar effect like rampage, etc...

@ghost ghost added a commit to rebirth-core/Rebirth---WoW that referenced this issue Feb 14, 2012

Shocker Immolate and Unstable Affliction can't stack anymore when casted by s…
…ame caster, thanks Karolis.Rudzevicius, fixes Issue #2246.

--HG--
branch : trunk
9b1c781

@Asido Asido pushed a commit to Asido/TrinityCore that referenced this issue Mar 12, 2012

Shocker Immolate and Unstable Affliction can't stack anymore when casted by s…
…ame caster, thanks Karolis.Rudzevicius, fixes Issue #2246.

--HG--
branch : trunk
3940b0f
Contributor

Star-lion commented Mar 27, 2012

working 0550f1d

Star-lion closed this Mar 27, 2012

TGM commented May 21, 2012

Not working, still bugged in 2f1f204

Contributor

Mik43l commented May 21, 2012

Try this, works fine for me:

INSERT INTO spell_linked_spell VALUES (19506, -19506, 2, 'Trueshot Aura remove Trueshot Aura')
Member

Vincent-Michael commented May 21, 2012

author: tobmaps
try (temp fix):

diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index 6859e45..69695d5 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -579,6 +579,19 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
                         }
                     }
                 }
+                else if (caster) // Prevent exploiting with doubling auras
+                {
+                    // check if not stacking aura already on target and remove not own aura
+                    for (Unit::AuraApplicationMap::iterator iter = itr->first->GetAppliedAuras().begin(); iter != itr->first->GetAppliedAuras().end(); ++iter)
+                    {
+                        Aura const* aura = iter->second->GetBase();
+                        if (aura->GetCasterGUID() != GetCasterGUID() && !CanStackWith(aura))
+                        {
+                            caster->RemoveAurasDueToSpell(aura->GetId(), aura->GetCasterGUID());
+                            break;
+                        }
+                    }
+                }
             }
         }
         if (!addUnit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment