Skip to content

Commit

Permalink
Changing the Glancing Blow chance to 25% (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfastnacht committed Jul 30, 2021
1 parent f8710c4 commit ad34d80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/game/Object/Unit.cpp
Expand Up @@ -3600,7 +3600,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* pVictim, WeaponAttackT
}
}

// Max 40% chance to score a glancing blow against mobs that are higher level (can do only players and pets and not with ranged weapon)
// Max 25% chance to score a glancing blow against mobs that are higher level (can do only players and pets and not with ranged weapon)
if (attType != RANGED_ATTACK &&
(GetTypeId() == TYPEID_PLAYER || ((Creature*)this)->IsPet()) &&
pVictim->GetTypeId() != TYPEID_PLAYER && !((Creature*)pVictim)->IsPet() &&
Expand All @@ -3610,10 +3610,10 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* pVictim, WeaponAttackT
int32 skill = attackerMaxSkillValueForLevel;

tmp = (10 + (victimMaxSkillValueForLevel - skill)) * 100;
tmp = tmp > 4000 ? 4000 : tmp;
tmp = tmp > 2500 ? 2500 : tmp;
if (roll < (sum += tmp))
{
DEBUG_FILTER_LOG(LOG_FILTER_COMBAT, "RollMeleeOutcomeAgainst: GLANCING <%d, %d)", sum - 4000, sum);
DEBUG_FILTER_LOG(LOG_FILTER_COMBAT, "RollMeleeOutcomeAgainst: GLANCING <%d, %d)", sum - 2500, sum);
return MELEE_HIT_GLANCING;
}
}
Expand Down

0 comments on commit ad34d80

Please sign in to comment.