Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float Player::GetDodgeChance()
- {
- uint32 pClass = (uint32)getClass();
- float chance;
- // Base dodge chance
- chance = baseDodge[pClass];
- // Dodge from agility
- chance += float( GetStat(STAT_AGILITY) / dodgeRatio[getLevel()-1][pClass] );
- // Dodge from dodge rating
- chance += CalcRating( PLAYER_RATING_MODIFIER_DODGE );
- // Dodge from spells
- chance += GetDodgeFromSpell();
- return max( chance, 0.0f ); // Make sure we don't have a negative chance
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement