diff options
author | Matheus Macabu <mkbu95@gmail.com> | 2015-07-08 08:45:01 -0300 |
---|---|---|
committer | Matheus Macabu <mkbu95@gmail.com> | 2015-07-08 08:45:01 -0300 |
commit | 29f4963673b1f793448a083a21be3e6ae4d69c54 (patch) | |
tree | 8722f2e506fc7ba97070a79739f819f0ade4f03d /src/map/npc.c | |
parent | fb82e87c39227921fc3397a8763f0bdb0921a28b (diff) | |
parent | 7b1293c3caf76b5587aa3abe8df57b1083c2175d (diff) | |
download | hercules-29f4963673b1f793448a083a21be3e6ae4d69c54.tar.gz hercules-29f4963673b1f793448a083a21be3e6ae4d69c54.tar.bz2 hercules-29f4963673b1f793448a083a21be3e6ae4d69c54.tar.xz hercules-29f4963673b1f793448a083a21be3e6ae4d69c54.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 8114cacaa..a79062c77 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2057,19 +2057,18 @@ int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* item_li script->setarray_pc(sd, "@sold_nameid", i, (void*)(intptr_t)sd->status.inventory[idx].nameid, &key_nameid); script->setarray_pc(sd, "@sold_quantity", i, (void*)(intptr_t)item_list[i*2+1], &key_amount); - - if (itemdb->isequip(sd->status.inventory[idx].nameid)) { - // process equipment based information into the arrays - script->setarray_pc(sd, "@sold_refine", i, (void*)(intptr_t)sd->status.inventory[idx].refine, &key_refine); - script->setarray_pc(sd, "@sold_attribute", i, (void*)(intptr_t)sd->status.inventory[idx].attribute, &key_attribute); - script->setarray_pc(sd, "@sold_identify", i, (void*)(intptr_t)sd->status.inventory[idx].identify, &key_identify); - - for (j = 0; j < MAX_SLOTS; j++) { - // store each of the cards from the equipment in the array - snprintf(card_slot, sizeof(card_slot), "@sold_card%d", j + 1); - script->setarray_pc(sd, card_slot, i, (void*)(intptr_t)sd->status.inventory[idx].card[j], &key_card[j]); - } + + // process item based information into the arrays + script->setarray_pc(sd, "@sold_refine", i, (void*)(intptr_t)sd->status.inventory[idx].refine, &key_refine); + script->setarray_pc(sd, "@sold_attribute", i, (void*)(intptr_t)sd->status.inventory[idx].attribute, &key_attribute); + script->setarray_pc(sd, "@sold_identify", i, (void*)(intptr_t)sd->status.inventory[idx].identify, &key_identify); + + for (j = 0; j < MAX_SLOTS; j++) { + // store each of the cards/special info from the item in the array + snprintf(card_slot, sizeof(card_slot), "@sold_card%d", j + 1); + script->setarray_pc(sd, card_slot, i, (void*)(intptr_t)sd->status.inventory[idx].card[j], &key_card[j]); } + } // invoke event |