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:
@@ -906,13 +906,32 @@ bool skill_isNotOk(uint16 skill_id, struct map_session_data *sd)
|
||||
}
|
||||
break;
|
||||
case MC_VENDING:
|
||||
if (map_getmapflag(sd->bl.m, MF_NOVENDING)) {
|
||||
clif_displaymessage(sd->fd, msg_txt(sd, 276)); // "You can't open a shop on this map"
|
||||
clif_skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0);
|
||||
return true;
|
||||
}
|
||||
if (map_getcell(sd->bl.m, sd->bl.x, sd->bl.y, CELL_CHKNOVENDING)) {
|
||||
clif_displaymessage(sd->fd, msg_txt(sd, 204)); // "You can't open a shop on this cell."
|
||||
clif_skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0);
|
||||
return true;
|
||||
}
|
||||
if (npc_isnear(&sd->bl)) {
|
||||
// uncomment to send msg_txt.
|
||||
//char output[150];
|
||||
//sprintf(output, msg_txt(662), battle_config.min_npc_vendchat_distance);
|
||||
//clif_displaymessage(sd->fd, output);
|
||||
clif_skill_fail(sd, skill_id, USESKILL_FAIL_THERE_ARE_NPC_AROUND, 0);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case ALL_BUYING_STORE:
|
||||
if( map_getmapflag(sd->bl.m, MF_NOVENDING) ) {
|
||||
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"
|
||||
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
|
||||
return true;
|
||||
}
|
||||
if( map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNOVENDING) ) {
|
||||
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."
|
||||
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
|
||||
return true;
|
||||
@@ -925,6 +944,7 @@ bool skill_isNotOk(uint16 skill_id, struct map_session_data *sd)
|
||||
clif_skill_fail(sd,skill_id,USESKILL_FAIL_THERE_ARE_NPC_AROUND,0);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case MC_IDENTIFY:
|
||||
return false; // always allowed
|
||||
case WZ_ICEWALL:
|
||||
|
||||
Reference in New Issue
Block a user