aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellEffects.cpp11
-rw-r--r--src/game/Unit.cpp8
2 files changed, 12 insertions, 7 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 0f04822546b..4f8a25698e3 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1350,24 +1350,29 @@ void Spell::EffectDummy(uint32 i)
if(!unitTarget)
return;
- uint32 rage = m_caster->GetPower(POWER_RAGE);
+ uint32 rage=0;
// Glyph of Execution bonus
if (AuraEffect *aura = m_caster->GetDummyAura(58367))
rage+=aura->GetAmount();
spell_id = 20647;
- bp = damage+int32(rage * m_spellInfo->DmgMultiplier[i] +
- m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f);
// Sudden death cost modifier
if (Aura * aur = m_caster->GetAura(52437))
{
+ rage += m_powerCost;
m_caster->ModifyPower(POWER_RAGE,- m_powerCost);
if (m_caster->GetPower(POWER_RAGE)<100)
m_caster->SetPower(POWER_RAGE,100);
m_caster->RemoveAura(aur);
}
else
+ {
+ rage += m_caster->GetPower(POWER_RAGE);
m_caster->SetPower(POWER_RAGE,0);
+ }
+
+ bp = damage+int32(rage * m_spellInfo->DmgMultiplier[i] +
+ m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f);
break;
}
// Slam
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 259140a74de..66576396dfa 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -2767,7 +2767,9 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
{
WeaponAttackType attType = BASE_ATTACK;
- if (spell->DmgClass == SPELL_DAMAGE_CLASS_RANGED && IsRangedWeaponSpell(spell))
+ // Check damage class instead of attack type to correctly handle judgements
+ // - they are meele, but can't be dodged/parried/deflected because of ranged dmg class
+ if (spell->DmgClass == SPELL_DAMAGE_CLASS_RANGED)
attType = RANGED_ATTACK;
// bonus from skills is 0.04% per skill Diff
@@ -2809,9 +2811,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
return SPELL_MISS_NONE;
// Ranged attack cannot be parry/dodge only deflect
- // Check damage class instead of attack type to correctly handle judgements
- // - they are meele, but can't be dodged/parried/deflected because of ranged dmg class
- if (spell->DmgClass == SPELL_DAMAGE_CLASS_RANGED)
+ if (attType == RANGED_ATTACK)
{
// only if in front
if (pVictim->HasInArc(M_PI,this))