diff options
author | n0n4m3 <none@none> | 2009-12-20 17:10:45 +0100 |
---|---|---|
committer | n0n4m3 <none@none> | 2009-12-20 17:10:45 +0100 |
commit | 81db9de678ce079b7c9478fb830855679e16e28d (patch) | |
tree | 9bcdd84e9952b40e9e71ec4741f16fb37888a3f0 | |
parent | b5202f91b22ad899fb3996dd06dadec1cce7e4c3 (diff) |
Fixed Eclipse
--HG--
branch : trunk
-rw-r--r-- | src/game/Unit.cpp | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 2efe4397206..e72a0024f24 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6182,30 +6182,20 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger // Eclipse if (dummySpell->SpellIconID == 2856 && GetTypeId() == TYPEID_PLAYER) { - if (!procSpell) + if (!procSpell || effIndex != 0) return false; - // Only 0 aura can proc - if (effIndex!=0) + + bool isWrathSpell = (procSpell->SpellFamilyFlags[1] & 0x00000001); + + if (!roll_chance_f(dummySpell->procChance * (isWrathSpell ? 0.6f : 1.0f))) return false; - // Wrath crit - if (procSpell->SpellFamilyFlags[0] & 0x1) - { - if (!roll_chance_i(60)) - return false; - ((Player*)this)->AddSpellCooldown(48517,0,time(NULL) + cooldown); - triggered_spell_id = 48518; - target = this; - break; - } - // Starfire crit - if (procSpell->SpellFamilyFlags[0] & 0x4) - { - ((Player*)this)->AddSpellCooldown(48518,0,time(NULL) + cooldown); - triggered_spell_id = 48517; - target = this; - break; - } - return false; + + target = this; + if (target->HasAura(isWrathSpell ? 48517 : 48518)) + return false; + + triggered_spell_id = isWrathSpell ? 48518 : 48517; + break; } // Living Seed else if (dummySpell->SpellIconID == 2860) |