// Cash shop
//?????????????????????????????????????????????? Normynator
char *data;
int value = -1;
//debug
ShowWarning("Currently at file pc.c line 1409 (account_id=%d, char_id=%d).\n", sd->status.account_id, sd->status.char_id); //INFO
//select credits from db
if (SQL_ERROR == SQL->Query(map->mysql_handle, "SELECT `value` FROM `acc_reg_num_db` WHERE `account_id` = '%d' AND `key` = '#CASHPOINTS'", sd->status.account_id)){
Sql_ShowDebug(map->mysql_handle);
}
while (SQL_SUCCESS == SQL->NextRow(map->mysql_handle)) {
SQL->GetData(map->mysql_handle, 0, &data, NULL); value = atoi(data);
//chrif->authreq(sd,true); //not needed ?
}
SQL->FreeResult(map->mysql_handle);
//debug
ShowWarning("value=%d).\n", value); //Result
//no value cap check because of its red from db on char login
sd->cashPoints = value;//pc_readaccountreg(sd,script->add_str("#CASHPOINTS"));