rendered paste bodyint32 Unit::MeleeMissChanceCalc(const Unit *pVictim) const{ if(!pVictim) return 0; // Base misschance 5% int32 misschance = 500; // DualWield - Melee spells and physical dmg spells - 5% , white damage 24% if (haveOffhandWeapon()) { if ((m_currentMeleeSpell) || (m_currentSpell && m_currentSpell->m_spellInfo->School == SPELL_SCHOOL_NORMAL)) misschance = 500; else misschance = 2400; } // PvP : PvE melee misschances per leveldif > 2 int32 chance = pVictim->GetTypeId() == TYPEID_PLAYER ? 500 : 700; int32 leveldif = pVictim->getLevel() - getLevel(); if(leveldif < 0) leveldif = 0; if(leveldif < 3) misschance += leveldif * 100 - m_modHitChance*100; else misschance += (leveldif - 2) * chance - m_modHitChance*100; return misschance > 6000 ? 6000 : misschance;}