aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRat <none@none>2009-04-11 19:31:20 +0200
committerRat <none@none>2009-04-11 19:31:20 +0200
commit80e1a5faaccc30e121cb4f97c0be7f640ff59577 (patch)
treee8dc68559196fd58bc4fc3dc4dffdf7f450d91ab
parent901bf73d758257a83c6eee03f37cfb89cb734d07 (diff)
*fix melee hit crit and add it to debuglog if disabled
--HG-- branch : trunk
-rw-r--r--src/game/Unit.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index e5c6200e7a5..037945b896b 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -2557,7 +2557,9 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack
if (tmp > 0 && roll < (sum += tmp))
{
DEBUG_LOG ("RollMeleeOutcomeAgainst: CRIT <%d, %d)", sum-tmp, sum);
- if(GetTypeId()!=TYPEID_PLAYER && !(((Creature*)this)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRIT))
+ if(GetTypeId() == TYPEID_UNIT && (((Creature*)this)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRIT))
+ DEBUG_LOG ("RollMeleeOutcomeAgainst: CRIT DISABLED)");
+ else
return MELEE_HIT_CRIT;
}