Ok, I've been digging around the core for a bit with the aim of capping the ratings to a particular percentage to allow players to "slug it out" and I'm fairly lost with the code.
Taking dodge, which is a major concern at the moment:
void Player::UpdateDodgePercentage()
{
// Dodge from agility
float value = GetDodgeFromAgility();
// Modify value from defense skill
value += (int32(GetDefenseSkillValue()) - int32(GetMaxSkillValueForLevel())) * 0.04f;
// Dodge from SPELL_AURA_MOD_DODGE_PERCENT aura
value += GetTotalAuraModifier(SPELL_AURA_MOD_DODGE_PERCENT);
// Dodge from rating
value += GetRatingBonusValue(CR_DODGE);
value = value < 0.0f ? 0.0f : value;
SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, value);
}
That's what I found for dodge. Now what I want is to have the "final percentage" go no higher than say "75%".
Now I see that this class is there to update dodge percentage, but I can't figure what conditions to force on it to make sure it gets capped.
I'd like to have the same functionality implemented into Parry and Block as well. Any help with this would be appreciated.
Also, one final question, how do you keep attack speed from not going any lower than a particular level, say 0.5 as minimum?
Thanks, and sorry if I posted in the wrong board.
Wolf.