Jump to content

[fix]Brambles(Barkskin&Thorns)


Recommended Posts

Posted

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

fixes Brambles - Daze proc for Barkskin & Thorns damage

For which repository revision was the patch created?

9383

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

haven't seen any

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

me

iff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 8f1a34f..79e4fa6 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -1701,6 +1701,23 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
               alreadyDone.insert(*i);
               uint32 damage=(*i)->GetModifier()->m_amount;
               SpellEntry const *i_spellProto = (*i)->GetSpellProto();
+               
+               // Thorns
+               if (i_spellProto->SpellFamilyName == SPELLFAMILY_DRUID && i_spellProto->SpellFamilyFlags & UI64LIT(0x00000100))
+               {
+                   Unit::AuraList const& dummyList = pVictim->GetAurasByType(SPELL_AURA_DUMMY);
+                   for(Unit::AuraList::const_iterator iter = dummyList.begin(); iter != dummyList.end(); ++iter)
+                   {      
+                      // Brambles
+                      if((*iter)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID &&
+                            (*iter)->GetSpellProto()->SpellIconID == 53)
+                      {
+                          damage += uint32(damage * (*iter)->GetModifier()->m_amount / 100);
+                          break;
+                      }  
+                   }
+               }
+
               //Calculate absorb resist ??? no data in opcode for this possibly unable to absorb or resist?
               //uint32 absorb;
               //uint32 resist;

sql:

DELETE FROM `spell_proc_event` WHERE entry = 22812;
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES('22812','0','0','0','0','0','0','3','0','0','0');

  • 3 months later...
Posted

for 9919

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 563c525..4230958 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -1704,6 +1704,23 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
                alreadyDone.insert(*i);
                uint32 damage=(*i)->GetModifier()->m_amount;
                SpellEntry const *i_spellProto = (*i)->GetSpellProto();
+
+                // Thorns
+                if (i_spellProto->SpellFamilyName == SPELLFAMILY_DRUID && i_spellProto->SpellFamilyFlags & UI64LIT(0x00000100))
+                {
+                    Unit::AuraList const& dummyList = pVictim->GetAurasByType(SPELL_AURA_DUMMY);
+                    for(Unit::AuraList::const_iterator iter = dummyList.begin(); iter != dummyList.end(); ++iter)
+                    {
+                        // Brambles
+                        if((*iter)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID &&
+                            (*iter)->GetSpellProto()->SpellIconID == 53)
+                        {
+                            damage += uint32(damage * (*iter)->GetModifier()->m_amount / 100);
+                            break;
+                        }
+                    }
+                }
+
                //Calculate absorb resist ??? no data in opcode for this possibly unable to absorb or resist?
                //uint32 absorb;
                //uint32 resist;

or

http://paste2.org/p/834331

you still can use SQL from first post

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