Resolved 3.3.5a - Server error 255 problem with Dodge

Prupet

Divine
Divine
Prupet Rep
0
0
0
Rep
0
Prupet Vouches
0
0
0
Vouches
0
Posts
30
Likes
13
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 1 105 XP
Hello @Luka How do I do that?
 

Prupet

Divine
Divine
Prupet Rep
0
0
0
Rep
0
Prupet Vouches
0
0
0
Vouches
0
Posts
30
Likes
13
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 1 105 XP
So you need to cap it at a lower value. This is your intention?
Exactly but I already lowered it to 0 but it still continues.
 

Kearu

Divine
Divine
Rep
1
0
0
Rep
1
Vouches
0
0
0
Vouches
0
Posts
139
Likes
81
2 YEARS
2 YEARS OF SERVICE
LEVEL 3 120 XP
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 worldserver.conf under STATS LIMITS

You can also change the rate of agility converts to dodge like luka said above.
 

Prupet

Divine
Divine
Prupet Rep
0
0
0
Rep
0
Prupet Vouches
0
0
0
Vouches
0
Posts
30
Likes
13
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 1 105 XP
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.
The settings in the confg are useless.
 

Prupet

Divine
Divine
Prupet Rep
0
0
0
Rep
0
Prupet Vouches
0
0
0
Vouches
0
Posts
30
Likes
13
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 1 105 XP
This doesn't work for example
value = value < 0.0f ? 0.0f : value;
SetStatFloatValue(PLAYER_DODGE_PERCENTAGE, value);
 

Kearu

Divine
Divine
Rep
1
0
0
Rep
1
Vouches
0
0
0
Vouches
0
Posts
139
Likes
81
2 YEARS
2 YEARS OF SERVICE
LEVEL 3 120 XP
The settings in the confg are useless.
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.
 

Luka

Member
Luka Rep
4
0
0
Rep
4
Luka Vouches
0
0
0
Vouches
0
Posts
21
Likes
28
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 1 75 XP
You 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 so
Code:
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);
}
 

Instadev

MySQL & C++ Developer
banned
Instadev Rep
4
0
0
Rep
4
Instadev Vouches
0
0
0
Vouches
0
Posts
338
Likes
153
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 2 90 XP
I wouldn't touch the default blizzlike scaling. What's your estimated dodge rating you would like to accomplish? If would he capped it'd be fine by you? Or you want it to be scalable but on a significantly lower rate (which obviously requires adjustment of blizzlike values)?
 

Prupet

Divine
Divine
Prupet Rep
0
0
0
Rep
0
Prupet Vouches
0
0
0
Vouches
0
Posts
30
Likes
13
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 1 105 XP
You 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 so
Code:
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 <3
 

Reloac

Active member
Reloac Rep
2
0
0
Rep
2
Reloac Vouches
0
0
0
Vouches
0
Posts
42
Likes
31
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 1 55 XP

3,389

1,271

9,555

428

Top