diff options
-rw-r--r-- | src/game/SpellEffects.cpp | 7 | ||||
-rw-r--r-- | src/game/Unit.cpp | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 22291ff78fd..b9ef4c2bf6b 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -402,6 +402,13 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx) damage = (distance > radius) ? 0 : int32(m_spellInfo->EffectBasePoints[0]*((radius - distance)/radius)); break; } + // TODO: add spell specific target requirement hook for spells + // Shadowbolts only affects targets with Shadow Mark (Gothik) + case 27831: + case 55638: + if(!unitTarget->HasAura(27825)) + return; + break; // Cataclysmic Bolt case 38441: { diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 1411b62b8f1..04f2081915e 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6752,7 +6752,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger return false; // heal amount - basepoints0 = triggerAmount*damage/100; + basepoints0 = triggerAmount*(std::min(damage,GetMaxHealth() - GetHealth()))/100; target = this; if(basepoints0) |