diff options
author | Trazom62 <none@none> | 2010-04-11 13:05:22 +0200 |
---|---|---|
committer | Trazom62 <none@none> | 2010-04-11 13:05:22 +0200 |
commit | 0f9c36e01e924b43e7f208a2f2e444a2e4875019 (patch) | |
tree | fa995f460017dd279d2f4eafa6c3463279067475 /src | |
parent | 42bf7753a3834a39cf0fbcf462f23b49d34d99d7 (diff) |
Fix Prey on the Weak. Thanks PrinceCreed.
Fixes issue #1003.
Fixes issue #230.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SpellAuraEffects.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/game/SpellAuraEffects.cpp b/src/game/SpellAuraEffects.cpp index 66a4197c6db..6a70fd58ad0 100644 --- a/src/game/SpellAuraEffects.cpp +++ b/src/game/SpellAuraEffects.cpp @@ -1765,6 +1765,21 @@ void AuraEffect::PeriodicDummyTick(Unit * target, Unit * caster) const } } break; + + case 51685: // Prey on the Weak + case 51686: + case 51687: + case 51688: + case 51689: + if (target->getVictim() && (target->GetHealth() * 100 / target->GetMaxHealth() > target->getVictim()->GetHealth() * 100 / target->getVictim()->GetMaxHealth())) { + if (!target->HasAura(58670)) { + int32 basepoints = GetSpellProto()->EffectBasePoints[0]; + target->CastCustomSpell(target, 58670, &basepoints, 0, 0, true); + } + } + else + target->RemoveAurasDueToSpell(58670); + break; case 58600: // No fly Zone - Dalaran if (GetTickNumber() == 10) { |