summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-09-09 20:24:24 -0300
committershennetsind <ind@henn.et>2013-09-09 20:24:24 -0300
commit58e2d279f26e9f9034ca80646a82addaafeb7ef2 (patch)
treeae47727d1192f7c865d3e2b096fb52b2aadc68d5 /src/map/map.c
parentdf1952d3ecaa5708dbe12e6f32137243c6bfdacb (diff)
downloadhercules-58e2d279f26e9f9034ca80646a82addaafeb7ef2.tar.gz
hercules-58e2d279f26e9f9034ca80646a82addaafeb7ef2.tar.bz2
hercules-58e2d279f26e9f9034ca80646a82addaafeb7ef2.tar.xz
hercules-58e2d279f26e9f9034ca80646a82addaafeb7ef2.zip
Fixed Bug #7540
Fixed searchstores crashing when trying to query data of offline vendings (vending db wasn't removing entries upon logout), also changed vending->db index to char id instead of vender id. Special Thanks to hemagx, jTynne. http://hercules.ws/board/tracker/issue-7540-new-map-crash/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/map.c b/src/map/map.c
index d3d7ac65d..cbef8ca95 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1622,6 +1622,10 @@ int map_quit(struct map_session_data *sd) {
}
}
+ if( sd->state.vending ) {
+ idb_remove(vending->db, sd->status.char_id);
+ }
+
party->booking_delete(sd); // Party Booking [Spiria]
pc->makesavestatus(sd);
pc->clean_skilltree(sd);