Follow up 780b9d3

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
This commit is contained in:
Cydh Ramdh 2014-01-10 17:39:14 +07:00
parent 89896d751a
commit 1f29f50f75

View File

@ -8513,7 +8513,6 @@ void pc_cleareventtimer(struct map_session_data *sd)
static int pc_checkcombo(struct map_session_data *sd, struct item_data *data) { static int pc_checkcombo(struct map_session_data *sd, struct item_data *data) {
uint16 i; uint16 i;
int success = 0; int success = 0;
for( i = 0; i < data->combos_count; i++ ) { for( i = 0; i < data->combos_count; i++ ) {
int16 *combo_idx = NULL, idx, j; int16 *combo_idx = NULL, idx, j;
/* ensure this isn't a duplicate combo */ /* ensure this isn't a duplicate combo */
@ -8527,7 +8526,7 @@ static int pc_checkcombo(struct map_session_data *sd, struct item_data *data) {
} }
CREATE(combo_idx,int16,data->combos[i]->count); CREATE(combo_idx,int16,data->combos[i]->count);
memset(combo_idx,-1,data->combos[i]->count); memset(combo_idx,-1,sizeof(combo_idx));
for( j = 0; j < data->combos[i]->count; j++ ) { for( j = 0; j < data->combos[i]->count; j++ ) {
uint16 id = data->combos[i]->nameid[j], k; uint16 id = data->combos[i]->nameid[j], k;
bool found = false; bool found = false;
@ -8544,7 +8543,7 @@ static int pc_checkcombo(struct map_session_data *sd, struct item_data *data) {
if(!sd->inventory_data[index]) if(!sd->inventory_data[index])
continue; continue;
if(j>0){ if(j>0){
uint16 z; uint8 z;
for (z = 0; z < data->combos[i]->count; z++) for (z = 0; z < data->combos[i]->count; z++)
if(combo_idx[z] == index) //we already have that index recorded if(combo_idx[z] == index) //we already have that index recorded
do_continue=true; do_continue=true;