From 80e1a5faaccc30e121cb4f97c0be7f640ff59577 Mon Sep 17 00:00:00 2001 From: Rat Date: Sat, 11 Apr 2009 19:31:20 +0200 Subject: *fix melee hit crit and add it to debuglog if disabled --HG-- branch : trunk --- src/game/Unit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3