diff options
author | QAston <none@none> | 2009-05-11 23:46:45 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-05-11 23:46:45 +0200 |
commit | 51b5f2aa640d08d547e3b6de4831f9bb02e870fd (patch) | |
tree | b8cf57947ed23fc4bb4ff4d1257e5769b0cd9a68 /src/game/SpellMgr.cpp | |
parent | 95504364e04b33345d7c7251383eb719ab64bf8c (diff) |
*Allow Hots to proc-this should fix talents like 33776 effect from hots.
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellMgr.cpp')
-rw-r--r-- | src/game/SpellMgr.cpp | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 3a22efd71d6..55c45209583 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1213,6 +1213,41 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const * spellP if((procFlags & EventProcFlag) == 0) return false; + /* Check Periodic Auras + + * Both hots and dots can trigger if spell has no PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL + nor PROC_FLAG_SUCCESSFUL_NEGATIVE_SPELL_HIT + + *Only Hots can trigger if spell has PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL + + *Only dots can trigger if spell has both positivity flags or PROC_FLAG_SUCCESSFUL_NEGATIVE_SPELL_HIT + + */ + + if (EventProcFlag & PROC_FLAG_ON_DO_PERIODIC) + { + if (procFlags & PROC_FLAG_SUCCESSFUL_NEGATIVE_SPELL_HIT) + { + if (!(procExtra & PROC_EX_INTERNAL_DOT)) + return false; + } + else if (procFlags & PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL + && !(procExtra & PROC_EX_INTERNAL_HOT)) + return false; + } + + if (EventProcFlag & PROC_FLAG_ON_TAKE_PERIODIC) + { + if (procFlags & PROC_FLAG_TAKEN_NEGATIVE_SPELL_HIT) + { + if (!(procExtra & PROC_EX_INTERNAL_DOT)) + return false; + } + else if (procFlags & PROC_FLAG_TAKEN_POSITIVE_SPELL + && !(procExtra & PROC_EX_INTERNAL_HOT)) + return false; + } + // Always trigger for this if (EventProcFlag & (PROC_FLAG_KILLED | PROC_FLAG_KILL_AND_GET_XP)) return true; @@ -1337,7 +1372,7 @@ void SpellMgr::LoadSpellEnchantProcData() uint32 count = 0; // 0 1 2 3 - QueryResult *result = WorldDatabase.Query("SELECT entry, customChance, PPMChance, procEx"); + QueryResult *result = WorldDatabase.Query("SELECT entry, customChance, PPMChance, procEx FROM spell_enchant_proc_data"); if( !result ) { |