fixed compilation with ENABLE_* defines disabled

This commit is contained in:
Yehonal
2017-08-20 12:34:06 +02:00
parent 0c50a6027c
commit 620887fe61
9 changed files with 29 additions and 32 deletions

View File

@@ -2285,10 +2285,12 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
// parry & block chances
// check if attack comes from behind, nobody can parry or block if attacker is behind
if (!victim->HasInArc(M_PI, this) && !victim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
if (!victim->HasInArc(M_PI, this) && !victim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outStaticDebug ("RollMeleeOutcomeAgainst: attack came from behind.");
sLog->outStaticDebug("RollMeleeOutcomeAgainst: attack came from behind.");
#endif
}
else
{
// Reduce parry chance by attacker expertise rating
@@ -2393,10 +2395,12 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRIT <%d, %d)", sum-tmp, sum);
#endif
if (GetTypeId() == TYPEID_UNIT && (ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRIT))
if (GetTypeId() == TYPEID_UNIT && (ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRIT))
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRIT DISABLED)");
sLog->outStaticDebug("RollMeleeOutcomeAgainst: CRIT DISABLED)");
#endif
}
else
return MELEE_HIT_CRIT;
}