|
@@ -64,13 +64,12 @@ void vending_purchasereq(struct map_session_data* sd, int aid, int cid, const ui
|
|
struct map_session_data* vsd = map_id2sd(aid);
|
|
struct map_session_data* vsd = map_id2sd(aid);
|
|
|
|
|
|
nullpo_retv(sd);
|
|
nullpo_retv(sd);
|
|
|
|
+ if( vsd == NULL || vsd->vender_id == 0 || vsd->vender_id == sd->bl.id )
|
|
|
|
+ return; // invalid shop
|
|
#if PACKETVER >= 20100105
|
|
#if PACKETVER >= 20100105
|
|
if( vsd->status.char_id != cid )
|
|
if( vsd->status.char_id != cid )
|
|
return; //Char-ID check
|
|
return; //Char-ID check
|
|
#endif
|
|
#endif
|
|
-
|
|
|
|
- if( vsd == NULL || vsd->vender_id == 0 || vsd->vender_id == sd->bl.id )
|
|
|
|
- return; // invalid shop
|
|
|
|
if( sd->bl.m != vsd->bl.m || !check_distance_bl(&sd->bl, &vsd->bl, AREA_SIZE) )
|
|
if( sd->bl.m != vsd->bl.m || !check_distance_bl(&sd->bl, &vsd->bl, AREA_SIZE) )
|
|
return; // shop too far away
|
|
return; // shop too far away
|
|
if( count < 1 || count > MAX_VENDING || count > vsd->vend_num )
|
|
if( count < 1 || count > MAX_VENDING || count > vsd->vend_num )
|