summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-07-29 20:40:27 +0200
committerGitHub <noreply@github.com>2018-07-29 20:40:27 +0200
commita95928b468d7aa1b069899ff023932e82a7b037f (patch)
tree8c7dcfd7a796affec9a5191c81715ac256a59d9e
parentb30f62468a5e923bf5d9533adec064ada1716459 (diff)
parentf4eb94cb46c998a978385a0ff18b6d53e9100f68 (diff)
downloadhercules-a95928b468d7aa1b069899ff023932e82a7b037f.tar.gz
hercules-a95928b468d7aa1b069899ff023932e82a7b037f.tar.bz2
hercules-a95928b468d7aa1b069899ff023932e82a7b037f.tar.xz
hercules-a95928b468d7aa1b069899ff023932e82a7b037f.zip
Merge pull request #2157 from Asheraf/achsell
correct sell item achievement being validated after item is deleted
-rw-r--r--src/map/npc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 3a00b38ea..f80f8443a 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2272,10 +2272,11 @@ static int npc_selllist(struct map_session_data *sd, struct itemlist *item_list)
}
}
- pc->delitem(sd, idx, entry->amount, 0, DELITEM_SOLD, LOG_TYPE_NPC);
-
// Achievements [Smokexyz/Hercules]
achievement->validate_item_sell(sd, sd->status.inventory[idx].nameid, entry->amount);
+
+ pc->delitem(sd, idx, entry->amount, 0, DELITEM_SOLD, LOG_TYPE_NPC);
+
}
if (z + sd->status.zeny > MAX_ZENY && nd->master_nd == NULL)