Update vending and buyingstore on warp (#6718)

Fixed #6671, vendor & buyer location never been updated if the location is changed
Added MF_NOBUYINGSTORE and CELL_NOBUYINGSTORE to separate from MF_VENDING & CELL_NOVENDING
Added some missing check for buyingstore states
Updated mapflag doc
Added new constants

Co-authored-by: Aleos <aleos89@users.noreply.github.com>
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
This commit is contained in:
Cydh Ramdh
2022-04-01 04:08:35 +07:00
committed by GitHub
parent e4e8063ec3
commit 16ccad42e8
12 changed files with 121 additions and 23 deletions

View File

@@ -18944,6 +18944,15 @@ static void clif_parse_ReqOpenBuyingStore( int fd, struct map_session_data* sd )
return;
}
if (map_getmapflag(sd->bl.m, MF_NOBUYINGSTORE)) {
clif_displaymessage(sd->fd, msg_txt(sd, 276)); // "You can't open a shop on this map"
return;
}
if (map_getcell(sd->bl.m, sd->bl.x, sd->bl.y, CELL_CHKNOBUYINGSTORE)) {
clif_displaymessage(sd->fd, msg_txt(sd, 204)); // "You can't open a shop on this cell."
return;
}
char storename[MESSAGE_SIZE];
safestrncpy( storename, p->storeName, sizeof( storename ) );