diff options
Diffstat (limited to 'src/map/vending.c')
-rw-r--r-- | src/map/vending.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/vending.c b/src/map/vending.c index a6ea1d84b..9cc691f70 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -56,14 +56,18 @@ void vending_vendinglistreq(struct map_session_data* sd, int id) /*========================================== * Purchase item(s) from a shop *------------------------------------------*/ -void vending_purchasereq(struct map_session_data* sd, int id, const uint8* data, int count) +void vending_purchasereq(struct map_session_data* sd, int aid, int cid, const uint8* data, int count) { int i, j, cursor, w, new_ = 0, blank, vend_list[MAX_VENDING]; double z; struct s_vending vending[MAX_VENDING]; // against duplicate packets - struct map_session_data* vsd = map_id2sd(id); + struct map_session_data* vsd = map_id2sd(aid); nullpo_retv(sd); +#if PACKETVER >= 20100105 + if( vsd->status.char_id != cid ) + return; //Char-ID check +#endif if( vsd == NULL || vsd->vender_id == 0 || vsd->vender_id == sd->bl.id ) return; // invalid shop |