Hi! I'm not very used to big programming projects, but I consider myself a weekend-programmer
While playing I was using some simulation tools and I found out my druid's dodge chance was really below what it should be. So I decided to investigate but I need more help in getting this right.
Before:
float Player::GetDodgeFromAgility()
{
// Table for base dodge values
float dodge_base[MAX_CLASSES] = {
0.0075f, // Warrior
0.00652f, // Paladin
-0.0545f, // Hunter
-0.0059f, // Rogue
0.03183f, // Priest
0.0114f, // DK
0.0167f, // Shaman
0.034575f, // Mage
0.02011f, // Warlock
0.0f, // ??
-0.0187f // Druid
};
// Crit/agility to dodge/agility coefficient multipliers
float crit_to_dodge[MAX_CLASSES] = {
1.1f, // Warrior
1.0f, // Paladin
1.6f, // Hunter
2.0f, // Rogue
1.0f, // Priest
1.0f, // DK?
1.0f, // Shaman
1.0f, // Mage
1.0f, // Warlock
0.0f, // ??
1.7f // Druid
};
uint32 level = getLevel();
uint32 pclass = getClass();
if (level>GT_MAX_LEVEL) level = GT_MAX_LEVEL;
// Dodge per agility for most classes equal crit per agility (but for some classes need apply some multiplier)
GtChanceToMeleeCritEntry const *dodgeRatio = sGtChanceToMeleeCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1);
if (dodgeRatio==NULL || pclass > MAX_CLASSES)
return 0.0f;
float dodge=dodge_base[pclass-1] + GetStat(STAT_AGILITY) * dodgeRatio->ratio * crit_to_dodge[pclass-1];
return dodge*100.0f;
}
According to http://elitistjerks.com/f31/t29453-combat_ratings_level_80_a/, the druid fix of the code should be: (Gonna look at other parts of the dodge formula later. My client was showing more than 12% discrepancy between my dodge and the expected dodge, so this and Savage Defense not working - there is a patch already going on to fix it - is hurting my tanking a lot)
float Player::GetDodgeFromAgility()
{
// Table for base dodge values
float dodge_base[MAX_CLASSES] = {
0.0075f, // Warrior
0.00652f, // Paladin
-0.0545f, // Hunter
-0.0059f, // Rogue
0.03183f, // Priest
0.0114f, // DK
0.0167f, // Shaman
0.034575f, // Mage
0.02011f, // Warlock
0.0f, // ??
[color="Red"]0.04951f // Druid[/color]
};
// Crit/agility to dodge/agility coefficient multipliers
float crit_to_dodge[MAX_CLASSES] = {
1.1f, // Warrior
1.0f, // Paladin
1.6f, // Hunter
2.0f, // Rogue
1.0f, // Priest
1.0f, // DK?
1.0f, // Shaman
1.0f, // Mage
1.0f, // Warlock
0.0f, // ??
[color="Red"]2.0f // Druid[/color]
};
uint32 level = getLevel();
uint32 pclass = getClass();
if (level>GT_MAX_LEVEL) level = GT_MAX_LEVEL;
// Dodge per agility for most classes equal crit per agility (but for some classes need apply some multiplier)
GtChanceToMeleeCritEntry const *dodgeRatio = sGtChanceToMeleeCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1);
if (dodgeRatio==NULL || pclass > MAX_CLASSES)
return 0.0f;
float dodge=dodge_base[pclass-1] + GetStat(STAT_AGILITY) * dodgeRatio->ratio * crit_to_dodge[pclass-1];
return dodge*100.0f;
}
I used 2 on the multiplier because I need double the agi to get 1% crit(83.33) than I need to get 1% dodge(41.667).
Is this right?
If it is, I'll finish translating the data here and try to determine better how to fix dodge chance.
Also.... where can I check the values to see if the crit ratings are right?
Any help would be dearly appreciated!
Sorry if I am making any stupid mistakes, I'm still kinda newb but I want to help with this great project that has given me so many hours of fun =)