diff options
-rw-r--r-- | src/map/npc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 6ba088a80..e15fd7e72 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2861,6 +2861,9 @@ static int npc_selllist(struct map_session_data *sd, struct itemlist *item_list) return npc->selllist_sub(sd, item_list, nd->master_nd); } + if (z + sd->status.zeny > MAX_ZENY && nd->master_nd == NULL) + return 1; + // delete items for (i = 0; i < VECTOR_LENGTH(*item_list); i++) { struct itemlist_entry *entry = &VECTOR_INDEX(*item_list, i); @@ -2879,9 +2882,6 @@ static int npc_selllist(struct map_session_data *sd, struct itemlist *item_list) } - if (z + sd->status.zeny > MAX_ZENY && nd->master_nd == NULL) - return 1; - if (z > MAX_ZENY) z = MAX_ZENY; |