[Hidden Content]
//The Mount Essence must also be altered to get the mount leveled from 0~240*
_MSG_UseItem.cpp :
if (Vol == 16)
{
char temp2[4096];
if (m->DestType || m->DestPos != 14)
{
SendItem(a_iConn, m->SourType, m->SourPos, item);
return;
}
STRUCT_ITEM *dest = &pMob[a_iConn].MOB.Equip[14];
if (dest->sIndex < 2330 || dest->sIndex >= 2390 || dest->stEffect[0].sValue <= 0)
{
SendItem(a_iConn, m->SourType, m->SourPos, item);
return;
}
int mountIndex = (dest->sIndex - 2330) % 30;
int amgIndex = (item->sIndex - 2390) % 30;
if (mountIndex == 28)
mountIndex = 21;
if (mountIndex == 27)
mountIndex = 10;
if (mountIndex != amgIndex)
{
SendClientMsg(a_iConn, g_pMessageStringTable[_NN_Mount_Not_Match]);
SendItem(a_iConn, m->SourType, m->SourPos, item);
return;
}
dest->stEffect[0].sValue = 20000;
dest->stEffect[2].cEffect = 100;
int level = dest->stEffect[1].cEffect;
if (level >= 250 && dest->sIndex >= 2360 && dest->sIndex < 2390) // ***EDIT THIS HERE*** <---
{
SendClientMsg(a_iConn, g_pMessageStringTable[_NN_Cant_Upgrade_More]);
SendItem(a_iConn, m->SourType, m->SourPos, item);
ProcessAdultMount(a_iConn, 0);
return;
}
if (dest->sIndex >= 2360 && dest->sIndex < 2390)
{
int rate = BASE_GetGrowthRate(dest);
int _rand = rand() % 101;
if (_rand > rate) // Refinação falhou
{
int rand2 = rand() % 100;
if (rand2 < 20 && dest->stEffect[1].cEffect < 70)
{
dest->stEffect[1].cEffect--;
}
if (dest->stEffect[1].cEffect >= 70 && dest->stEffect[1].cEffect % 2 != 0)
{
if (rand2 < 50)
{
dest->stEffect[1].cEffect--;
}
}
if (pMob[a_iConn].MOB.Equip[0].sIndex / 10)
SendEmotion(a_iConn, 15, 0);
else
SendEmotion(a_iConn, 20, 0);
if (amount > 1)
BASE_SetItemAmount(item, amount - 1);
else
memset(item, 0, 8);
sprintf(temp, "%s", g_pMessageStringTable[_NN_Fail_To_Refine]);
SendClientMsg(a_iConn, temp);
SendItem(a_iConn, m->DestType, m->DestPos, dest);
ProcessAdultMount(a_iConn, 0);
return;
}
else
{
printf(temp, "useitem,mount refine success %d+%d (%d,%d,%d)", dest->sIndex, dest->stEffect[1].cValue,
item->stEffect[0].cEffect, item->stEffect[1].cEffect, item->stEffect[2].cEffect);
SendClientMsg(a_iConn, "Mount level has risen!");
SendEmotion(a_iConn, 14, 3);
MyLog(LogType::Itens, pMob[a_iConn].MOB.MobName, temp, 0, pUser[a_iConn].IP);
}
}
//Please Enjoy