Jump to content

Recommended Posts

Posted

what about add this in

SpellAuras.cpp void Aura::_AddAura()

allow use single slot only by auras from same caster
if(itr->second->GetCasterGUID()==GetCasterGUID() && itr->second->GetCastItemGUID()==GetCastItemGUID())

and in

Unit.cpp Unit::AddAura(Aura *Aur)

if(i2->second->GetCasterGUID()==Aur->GetCasterGUID() && i2->second->GetCastItemGUID()==Aur->GetCastItemGUID())
{
    // can be only single (this check done at _each_ aura add
    RemoveAura(i2,AURA_REMOVE_BY_STACK);
    break;
}

bool stop = false;
switch(aurSpellInfo->EffectApplyAuraName[Aur->GetEffIndex()])
{
   //ADD HERE SINGLE CASE FOR EVERY ENCHANT TYPE

this could fix buff for proc from different weapons...

but can this cause any trouble with other stack rules?

Posted

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index e6033a3..4782f3a 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -907,7 +907,7 @@ void Aura::_AddAura()
        for(Unit::AuraMap::const_iterator itr = m_target->GetAuras().lower_bound(spair); itr != m_target->GetAuras().upper_bound(spair); ++itr)
        {
            // allow use single slot only by auras from same caster
-            if(itr->second->GetCasterGUID()==GetCasterGUID())
+            if(itr->second->GetCasterGUID()==GetCasterGUID() && itr->second->GetCastItemGUID()==GetCastItemGUID())
            {
                slot = itr->second->GetAuraSlot();
                secondaura = true;
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index e1a46f1..f5d01c2 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -3433,7 +3433,7 @@ bool Unit::AddAura(Aura *Aur)
        {
            for(AuraMap::iterator i2 = m_Auras.lower_bound(spair); i2 != m_Auras.upper_bound(spair); ++i2)
            {
-                if(i2->second->GetCasterGUID()==Aur->GetCasterGUID())
+                if(i2->second->GetCasterGUID()==Aur->GetCasterGUID() && i2->second->GetCastItemGUID()==Aur->GetCastItemGUID())
                {
                    // Aura can stack on self -> Stack it;
                    if(aurSpellInfo->StackAmount)
@@ -3446,8 +3446,26 @@ bool Unit::AddAura(Aura *Aur)
                    RemoveAura(i2,AURA_REMOVE_BY_STACK);
                    break;
                }
-
+                
+                bool bSkipAurName = false;
+                //Special cases based on spellId
+                switch(aurSpellInfo->Id)
+                {
+                    //Mongoose
+                    case 28093:
+                        bSkipAurName = true;
+                        break;
+                    
+                    //more cases here
+                    //case id:
+                    //  break;
+                    //default:
+                    //  break;
+                }
+                
                bool stop = false;
+                //dont break iterator we must search enchant proc from main hand and off hand...just skip this aura
+                if(!bSkipAurName)
                switch(aurName)
                {
                    // DoT/HoT/etc

i dont have 3.x client so i can't test this but a similar patch for 2.4.3(with proc flags) works fine

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