04-08-2021, 01:09 PM
else if (reItem->m_itemProto->getItemNum0() == IETC_UPGRADE_SPECIAL)
{
int prob = GetRandom(1, 100);
if(prob > 0 && prob <= 70)
{
result = ITEM_UPGRADE_RESULT_PLUS;
}
else if(prob > 70 && prob <= 80)
{
int rand = GetRandom(1, 2);
switch(rand)
{
case 1:
result = ITEM_UPGRADE_RESULT_MINUS;
break;
case 2:
result = ITEM_UPGRADE_RESULT_BROKEN;
break;
}
}
else
{
result = ITEM_UPGRADE_RESULT_NOCHANGE;
}
}
70% success rate, 20% nochange, 10% broken/decrease

