Prupet
DivineDivine
LEVEL 1
105 XP
Exactly but I already lowered it to 0 but it still continues.So you need to cap it at a lower value. This is your intention?
The settings in the confg are useless.Just looked it up AzerothCore does have a setting in the config to cap ratings. So you can cap players Dodge rating at a lower percentage if you’d like it’s in worldconfig under STATS LIMITS
You can also change the rate of agility converts to dodge like luka said above.
Does it not actually cap your dodge rating? You have to enable it if you didn’t also which is at the top of STATS LIMITS. Has to be set to 1, if it does work and caps your dodge rating and you still have the issue then you might have some other issue.The settings in the confg are useless.
void Player::UpdateDodgePercentage()
{
float diminishing = 0.0f, nondiminishing = 0.0f;
GetDodgeFromAgility(diminishing, nondiminishing);
// Modify value from defense skill (only bonus from defense rating diminishes)
nondiminishing += (int32(GetSkillValue(SKILL_DEFENSE)) - int32(GetMaxSkillValueForLevel())) * 0.04f;
diminishing += (GetRatingBonusValue(CR_DEFENSE_SKILL) * 0.04f);
// Dodge from SPELL_AURA_MOD_DODGE_PERCENT aura
nondiminishing += GetTotalAuraModifier(SPELL_AURA_MOD_DODGE_PERCENT);
// Dodge from rating
diminishing += GetRatingBonusValue(CR_DODGE);
// apply diminishing formula to diminishing dodge chance
float value = CalculateDiminishingReturns(dodge_cap, GetClass(), nondiminishing, diminishing);
if (sWorld->getBoolConfig(CONFIG_STATS_LIMITS_ENABLE))
value = value > sWorld->getFloatConfig(CONFIG_STATS_LIMITS_DODGE) ? sWorld->getFloatConfig(CONFIG_STATS_LIMITS_DODGE) : value;
value = value < 0.0f ? 0.0f : value;
SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, value);
}
void Player::UpdateDodgePercentage()
{
float diminishing = 0.0f, nondiminishing = 0.0f;
// Remove agility scaling
//GetDodgeFromAgility(diminishing, nondiminishing);
// Modify value from defense skill (only bonus from defense rating diminishes)
nondiminishing += (int32(GetSkillValue(SKILL_DEFENSE)) - int32(GetMaxSkillValueForLevel())) * 0.04f;
diminishing += (GetRatingBonusValue(CR_DEFENSE_SKILL) * 0.04f);
// Dodge from SPELL_AURA_MOD_DODGE_PERCENT aura
nondiminishing += GetTotalAuraModifier(SPELL_AURA_MOD_DODGE_PERCENT);
// Dodge from rating
diminishing += GetRatingBonusValue(CR_DODGE);
// apply diminishing formula to diminishing dodge chance
float value = CalculateDiminishingReturns(dodge_cap, GetClass(), nondiminishing, diminishing);
if (sWorld->getBoolConfig(CONFIG_STATS_LIMITS_ENABLE))
value = value > sWorld->getFloatConfig(CONFIG_STATS_LIMITS_DODGE) ? sWorld->getFloatConfig(CONFIG_STATS_LIMITS_DODGE) : value;
value = value < 0.0f ? 0.0f : value;
SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, value);
}
Now I'll try it Luke! You're a genius <3You can modify this piece of code to remove dodge scaling from agility
Code:void Player::UpdateDodgePercentage() { float diminishing = 0.0f, nondiminishing = 0.0f; GetDodgeFromAgility(diminishing, nondiminishing); // Modify value from defense skill (only bonus from defense rating diminishes) nondiminishing += (int32(GetSkillValue(SKILL_DEFENSE)) - int32(GetMaxSkillValueForLevel())) * 0.04f; diminishing += (GetRatingBonusValue(CR_DEFENSE_SKILL) * 0.04f); // Dodge from SPELL_AURA_MOD_DODGE_PERCENT aura nondiminishing += GetTotalAuraModifier(SPELL_AURA_MOD_DODGE_PERCENT); // Dodge from rating diminishing += GetRatingBonusValue(CR_DODGE); // apply diminishing formula to diminishing dodge chance float value = CalculateDiminishingReturns(dodge_cap, GetClass(), nondiminishing, diminishing); if (sWorld->getBoolConfig(CONFIG_STATS_LIMITS_ENABLE)) value = value > sWorld->getFloatConfig(CONFIG_STATS_LIMITS_DODGE) ? sWorld->getFloatConfig(CONFIG_STATS_LIMITS_DODGE) : value; value = value < 0.0f ? 0.0f : value; SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, value); }
Modify it like soCode:void Player::UpdateDodgePercentage() { float diminishing = 0.0f, nondiminishing = 0.0f; // Remove agility scaling //GetDodgeFromAgility(diminishing, nondiminishing); // Modify value from defense skill (only bonus from defense rating diminishes) nondiminishing += (int32(GetSkillValue(SKILL_DEFENSE)) - int32(GetMaxSkillValueForLevel())) * 0.04f; diminishing += (GetRatingBonusValue(CR_DEFENSE_SKILL) * 0.04f); // Dodge from SPELL_AURA_MOD_DODGE_PERCENT aura nondiminishing += GetTotalAuraModifier(SPELL_AURA_MOD_DODGE_PERCENT); // Dodge from rating diminishing += GetRatingBonusValue(CR_DODGE); // apply diminishing formula to diminishing dodge chance float value = CalculateDiminishingReturns(dodge_cap, GetClass(), nondiminishing, diminishing); if (sWorld->getBoolConfig(CONFIG_STATS_LIMITS_ENABLE)) value = value > sWorld->getFloatConfig(CONFIG_STATS_LIMITS_DODGE) ? sWorld->getFloatConfig(CONFIG_STATS_LIMITS_DODGE) : value; value = value < 0.0f ? 0.0f : value; SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, value); }