aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-14 11:47:12 -0500
committermegamage <none@none>2009-05-14 11:47:12 -0500
commit657971629cc454943713c3635a9b3ad346ee88eb (patch)
treeedcc0665b36596aaa3415164821cb89834b88420
parent64bee88f6942f2a0f0e48e98d02f2c9cb963b9b7 (diff)
parent22b082519ee4c2edd33dc1dfdf58366a0a250cca (diff)
*Merge. Sorry for the mess. But a rev was wrongly backouted so we have to make these two backouts.
--HG-- branch : trunk
-rw-r--r--src/game/Unit.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index aacdc9aff52..2c1c50c20ae 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -2767,9 +2767,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
{
WeaponAttackType attType = BASE_ATTACK;
- // 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 (spell->DmgClass == SPELL_DAMAGE_CLASS_RANGED && IsRangedWeaponSpell(spell))
attType = RANGED_ATTACK;
// bonus from skills is 0.04% per skill Diff
@@ -2811,7 +2809,9 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
return SPELL_MISS_NONE;
// Ranged attack cannot be parry/dodge only deflect
- if (attType == RANGED_ATTACK)
+ // 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)
{
// only if in front
if (pVictim->HasInArc(M_PI,this))