summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 2876ea595..a358fd2fb 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2119,6 +2119,17 @@ int npc_selllist_sub(struct map_session_data *sd, struct itemlist *item_list, st
script->cleararray_pc(sd, card_slot, (void*)0);
}
+ for (j = 0; j < MAX_ITEM_OPTIONS; j++) { // Clear Each item option entry
+ key_opt_idx[j] = 0;
+ key_opt_value[j] = 0;
+
+ snprintf(opt_index_str, sizeof(opt_index_str), "@slot_opt_idx%d", j + 1);
+ script->cleararray_pc(sd, opt_index_str, (void*)0);
+
+ snprintf(opt_value_str, sizeof(opt_value_str), "@slot_opt_val%d", j + 1);
+ script->cleararray_pc(sd, opt_value_str, (void*)0);
+ }
+
// save list of to be sold items
for (i = 0; i < VECTOR_LENGTH(*item_list); i++) {
struct itemlist_entry *entry = &VECTOR_INDEX(*item_list, i);