04-24-2021, 02:23 AM
On 4/8/2021 at 10:09 AM, Desarija said:
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
You can send me this same code 100% sucess update? I no understand how you defined the 10% break rate, sory you can help me?

