Actually, the chance you are talking about is in char_resist.cpp. Stun resistance has just 90% of success. This is not a bug, but if you want Stun fixed 100%, you'd also change this:
bool CHARACTER::IsImmune(DWORD dwImmuneFlag)
{
if (IS_SET(m_pointsInstant.dwImmuneFlag, dwImmuneFlag))
{
int immune_pct = 90;
int percent = number(1, 100);
if (percent <= immune_pct) // 90% Immune
{
if (test_server && IsPC())
ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_SUCCESS> (%s)", GetName());
return true;
}
else
{
if (test_server && IsPC())
ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_FAIL> (%s)", GetName());
return false;
}
}
if (test_server && IsPC())
ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_FAIL> (%s) NO_IMMUNE_FLAG", GetName());
return false;
}
to this:
bool CHARACTER::IsImmune(DWORD dwImmuneFlag)
{
if (IS_SET(m_pointsInstant.dwImmuneFlag, dwImmuneFlag))
{
if (test_server && IsPC())
ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_SUCCESS> (%s)", GetName());
return true;
}
if (test_server && IsPC())
ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_FAIL> (%s) NO_IMMUNE_FLAG", GetName());
return false;
}