|
@@ -195,6 +195,11 @@ void buyingstore_open(struct map_session_data* sd, int account_id)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if( sd->bl.m != pl_sd->bl.m || !check_distance_bl(&sd->bl, &pl_sd->bl, AREA_SIZE) )
|
|
|
+ {// out of view range
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
// success
|
|
|
clif_buyingstore_itemlist(sd, pl_sd);
|
|
|
}
|
|
@@ -231,6 +236,12 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if( sd->bl.m != pl_sd->bl.m || !check_distance_bl(&sd->bl, &pl_sd->bl, AREA_SIZE) )
|
|
|
+ {// out of view range
|
|
|
+ clif_buyingstore_trade_failed_seller(sd, BUYINGSTORE_TRADE_SELLER_FAILED, 0);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
if( pl_sd->status.zeny < pl_sd->buyingstore.zenylimit )
|
|
|
{// buyer lost zeny in the mean time? fix the limit
|
|
|
pl_sd->buyingstore.zenylimit = pl_sd->status.zeny;
|