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

@@ -3189,6 +3189,8 @@ int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk)
return (cell.landprotector);
case CELL_CHKNOVENDING:
return (cell.novending);
case CELL_CHKNOBUYINGSTORE:
return (cell.nobuyingstore);
case CELL_CHKNOCHAT:
return (cell.nochat);
case CELL_CHKMAELSTROM:
@@ -3250,6 +3252,7 @@ void map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag)
case CELL_NOCHAT: mapdata->cell[j].nochat = flag; break;
case CELL_MAELSTROM: mapdata->cell[j].maelstrom = flag; break;
case CELL_ICEWALL: mapdata->cell[j].icewall = flag; break;
case CELL_NOBUYINGSTORE: mapdata->cell[j].nobuyingstore = flag; break;
default:
ShowWarning("map_setcell: invalid cell type '%d'\n", (int)cell);
break;