Jump to content

[BUG] miss chance for melee damage


Guest Revils

Recommended Posts

Mangos Version: 9105

SD2 Version: 1506

Database Name and Version : UDB 386

How it SHOULD work:

from a well know wiki

If the difference between the mob's Defense Skill and your Weapon Skillis less than or equal to 10, then the formula for calculating your base miss rate against that mob is:

with two-hander: 5% + (Defense Skill - Weapon Skill)*.04%

with dual-wielding: 24% + (Defense Skill - Weapon Skill)*.04%

If the difference between the mob's Defense Skill and your Weapon Skill is greater than 10:

with two-hander: 6% + (Defense Skill - Weapon Skill - 10)*.4%

with dual-wielding: 25% + (Defense Skill - Weapon Skill - 10)*.4%

Applying these formulas gives the following base miss rate for a Level 80 character with a 400 Weapon Skill:

v. Level 80 mob: 5.0% / dual-wield: 24%

v. Level 81 mob: 5.5% / dual-wield: 24.5%

v. Level 82 mob: 6.0% / dual-wield: 25% (level of most heroic bosses)

v. Level 83 mob: 8.0% / dual-wield: 27% (level of raid bosses)

How it DOES work:

the miss chance is calculated differently resulting in a higher value

in other words, for auto-attacks (white damage):

on Unit::MeleeMissChanceCalc()

       if (isNormal || m_currentSpells[CURRENT_MELEE_SPELL])
           misschance = 5.0f;
       else
           misschance = 24.0f;
.
.
  int32 chance = pVictim->GetTypeId() == TYPEID_PLAYER ? 5 : 7;
.
.
   if(leveldif < 3)
       misschance += (leveldif - m_modHitChance);
   else
       misschance += ((leveldif - 2) * chance - m_modHitChance);

against a boss level this will give 5%/24% + 7% = 12%/31% higher than expected 8%/27%

    // Modify miss chance from skill difference ( bonus from skills is 0.04% )
   int32 skillBonus = int32(GetWeaponSkillValue(attType,pVictim)) - int32(pVictim->GetDefenseSkillValue(this));
   misschance -= skillBonus * 0.04f;

this gives an additional 0.6% miss chance

Special attacks (yellow damage) are handled in Unit::MeleeSpellMissChance() and they are calculated in another different way while I would expect the same basic rule quoted from well know wiki

on Unit::MeleeSpellMissChance()

    int32 lchance = pVictim->GetTypeId() == TYPEID_PLAYER ? 5 : 7;
   int32 leveldif = pVictim->getLevelForTarget(this) - getLevelForTarget(pVictim);
   if(leveldif < 3)
       HitChance = 95 - leveldif;
   else
       HitChance = 93 - (leveldif - 2) * lchance;
.
.        
   // Miss = 100 - hit
   float miss_chance= 100.0f - HitChance;
.
.    
   // bonus from skills is 0.04%
   miss_chance -= skillDiff * 0.04f;

Link to comment
Share on other sites

  • 2 months later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use