From b6a9c84aa0f0a006f4de355b77bb9858b7593956 Mon Sep 17 00:00:00 2001 From: QAston Date: Fri, 28 Aug 2009 20:54:58 +0200 Subject: [PATCH] *Update spell_proc_event entry for Bloodsurge. *Bring back charge drop on magnet spell redirection. --HG-- branch : trunk --- sql/FULL/world_spell_full.sql | 6 +++--- sql/updates/5450_world_spell_proc_event.sql | 5 +++++ src/game/SpellAuras.cpp | 2 +- src/game/SpellAuras.h | 2 +- src/game/Unit.cpp | 3 +++ 5 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 sql/updates/5450_world_spell_proc_event.sql diff --git a/sql/FULL/world_spell_full.sql b/sql/FULL/world_spell_full.sql index 56886d8519..aa5bb7610a 100644 --- a/sql/FULL/world_spell_full.sql +++ b/sql/FULL/world_spell_full.sql @@ -1097,9 +1097,9 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell ( 46867, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Wrecking Crew (Rank 1) ( 46910, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 5.5, 0, 0), -- Furious Attacks (Rank 1) ( 46911, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 7.5, 0, 0), -- Furious Attacks (Rank 2) -( 46913, 0x00, 4, 0x00000000, 0x00000400, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Bloodsurge (Rank 1) -( 46914, 0x00, 4, 0x00000000, 0x00000400, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Bloodsurge (Rank 2) -( 46915, 0x00, 4, 0x00000000, 0x00000400, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Bloodsurge (Rank 3) +( 46913, 0x00, 4, 0x00000040, 0x00000404, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Bloodsurge (Rank 1) +( 46914, 0x00, 4, 0x00000040, 0x00000404, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Bloodsurge (Rank 2) +( 46915, 0x00, 4, 0x00000040, 0x00000404, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Bloodsurge (Rank 3) ( 46916, 0x00, 4, 0x00000000, 0x00000400, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Slam! ( 46951, 0x00, 4, 0x00000400, 0x00000040, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Sword and Board (Rank 1) ( 46952, 0x00, 0, 0x00000400, 0x00000040, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Sword and Board (Rank 2) diff --git a/sql/updates/5450_world_spell_proc_event.sql b/sql/updates/5450_world_spell_proc_event.sql new file mode 100644 index 0000000000..73206c7770 --- /dev/null +++ b/sql/updates/5450_world_spell_proc_event.sql @@ -0,0 +1,5 @@ +DELETE FROM `spell_proc_event` WHERE `entry` IN(46913, 46914, 46915); +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +( 46913, 0x00, 4, 0x00000040, 0x00000404, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Bloodsurge (Rank 1) +( 46914, 0x00, 4, 0x00000040, 0x00000404, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Bloodsurge (Rank 2) +( 46915, 0x00, 4, 0x00000040, 0x00000404, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0); -- Bloodsurge (Rank 3) \ No newline at end of file diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index d698553487..2040722c17 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -6988,7 +6988,7 @@ int32 AuraEffect::CalculateCrowdControlAuraAmount(Unit * caster) return damageCap; } -int32 AuraEffect::IsPeriodicTickCrit(Unit const * pCaster) const +bool AuraEffect::IsPeriodicTickCrit(Unit const * pCaster) const { Unit::AuraEffectList const& mPeriodicCritAuras= pCaster->GetAurasByType(SPELL_AURA_ABILITY_PERIODIC_CRIT); for(Unit::AuraEffectList::const_iterator itr = mPeriodicCritAuras.begin(); itr != mPeriodicCritAuras.end(); ++itr) diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index 1c94be8034..4fe680f26f 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -403,7 +403,7 @@ class TRINITY_DLL_SPEC AuraEffect bool m_isPersistent:1; bool m_isApplied:1; private: - int32 IsPeriodicTickCrit(Unit const * pCaster) const; + bool IsPeriodicTickCrit(Unit const * pCaster) const; }; class TRINITY_DLL_SPEC AreaAuraEffect : public AuraEffect diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index a828f634ec..12166cc917 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8847,7 +8847,10 @@ Unit* Unit::SelectMagnetTarget(Unit *victim, SpellEntry const *spellInfo) for(Unit::AuraEffectList::const_iterator itr = magnetAuras.begin(); itr != magnetAuras.end(); ++itr) if(Unit* magnet = (*itr)->GetParentAura()->GetUnitSource()) if(magnet->isAlive()) + { + (*i)->GetParentAura()->DropAuraCharge(); return magnet; + } } // Melee && ranged case else