diff options
author | brianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-05 07:12:44 +0000 |
---|---|---|
committer | brianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-05 07:12:44 +0000 |
commit | 0efc076a6e9769716dd7ff2ee1b05e137a87cb3c (patch) | |
tree | 4af9addd5a35bc046560a74484507c7a7df6aab0 | |
parent | b1ea9aa1af58386d598cc2c33119750c6aca8228 (diff) | |
download | hercules-0efc076a6e9769716dd7ff2ee1b05e137a87cb3c.tar.gz hercules-0efc076a6e9769716dd7ff2ee1b05e137a87cb3c.tar.bz2 hercules-0efc076a6e9769716dd7ff2ee1b05e137a87cb3c.tar.xz hercules-0efc076a6e9769716dd7ff2ee1b05e137a87cb3c.zip |
- 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
-rw-r--r-- | src/map/npc.c | 5 |
1 files changed, 3 insertions, 2 deletions
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]); } } } |