summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmistry <Equinox1991@gmail.com>2015-07-05 06:56:51 +0800
committerEmistry <Equinox1991@gmail.com>2015-07-05 06:56:51 +0800
commit3fbd2b3b3b8277ded2b8139139e62e32c3db3145 (patch)
tree4ccadfbaac2b2ce87413ca56d27d7f4345a7731b /src
parentd90ac66c877b6843f90cd88e0e9577a1a19f74d8 (diff)
downloadhercules-3fbd2b3b3b8277ded2b8139139e62e32c3db3145.tar.gz
hercules-3fbd2b3b3b8277ded2b8139139e62e32c3db3145.tar.bz2
hercules-3fbd2b3b3b8277ded2b8139139e62e32c3db3145.tar.xz
hercules-3fbd2b3b3b8277ded2b8139139e62e32c3db3145.zip
Fixed issue #560
@sold[] return named item values.
Diffstat (limited to 'src')
-rw-r--r--src/map/npc.c23
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