From 0efc076a6e9769716dd7ff2ee1b05e137a87cb3c Mon Sep 17 00:00:00 2001 From: brianluau Date: Mon, 5 Nov 2012 07:12:44 +0000 Subject: - Fixed OnSellItem not setting all the "@sold_card%d" arrays. (bugreport:6847) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16860 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/npc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/map/npc.c b/src/map/npc.c index 855c6f650..cb40c85c5 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1568,7 +1568,7 @@ static int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* int key_refine = 0; int key_attribute = 0; int key_identify = 0; - int key_card = 0; + int key_card[MAX_SLOTS]; // discard old contents script_cleararray_pc(sd, "@sold_nameid", (void*)0); @@ -1579,6 +1579,7 @@ static int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* for( j = 0; MAX_SLOTS > j; j++ ) {// clear each of the card slot entries + key_card[j] = 0; snprintf(card_slot, sizeof(card_slot), "@sold_card%d", j + 1); script_cleararray_pc(sd, card_slot, (void*)0); } @@ -1600,7 +1601,7 @@ static int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* for( j = 0; MAX_SLOTS > j; 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); + script_setarray_pc(sd, card_slot, i, (void*)(intptr_t)sd->status.inventory[idx].card[j], &key_card[j]); } } } -- cgit v1.2.3-70-g09d2