Can someone help me? If you upgrade, it will say you that you failed, try again, but the stone doesn't dissapear

Code: Select all
void CGame::RequestItemUpgradeHandler(int iClientH, int iItemIndex)
{
int i, iItemX,iItemY, iSoM, iSoX, iSomH, iSoxH, iValue; // v2.172
DWORD dwTemp, dwSWEType;
double dV1, dV2, dV3;
short sItemUpgrade = 2;
if (m_pClientList[iClientH] == NULL) return;
if ((iItemIndex < 0) || (iItemIndex >= DEF_MAXITEMS)) return;
if (m_pClientList[iClientH]->m_pItemList[iItemIndex] == NULL) return;
iValue = (m_pClientList[iClientH]->m_pItemList[iItemIndex]->m_dwAttribute & 0xF0000000) >> 28;
if (iValue >= 15 || iValue < 0 ) {
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_ITEMUPGRADEFAIL, 1, NULL, NULL, NULL);
return;
}
I just want to make it so, that you can upgrade the swords and armors, but stones must dissapear by each time you try to upgrade.
Thanks...