summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index bfde233c5..ed9eb1769 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -10400,6 +10400,14 @@ void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd)
clif_skill_fail(sd,1,USESKILL_FAIL_LEVEL,3);
return;
}
+ if( npc_isnear(&sd->bl) ) {
+ // uncomment for more verbose message.
+ //char output[150];
+ //sprintf(output, msg_txt(662), battle_config.min_npc_vendchat_distance);
+ //clif_displaymessage(sd->fd, output);
+ clif_skill_fail(sd,1,USESKILL_FAIL_THERE_ARE_NPC_AROUND,0);
+ return;
+ }
if( len <= 0 )
return; // invalid input
@@ -11890,6 +11898,9 @@ void clif_parse_OpenVending(int fd, struct map_session_data* sd)
const char* message = (char*)RFIFOP(fd,4);
bool flag = (bool)RFIFOB(fd,84);
const uint8* data = (uint8*)RFIFOP(fd,85);
+
+ if( !flag )
+ sd->state.prevend = 0;
if( sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOROOM )
return;
@@ -11902,21 +11913,12 @@ void clif_parse_OpenVending(int fd, struct map_session_data* sd)
return;
}
- if( vending_checknearnpc(&sd->bl) ) {
- char output[150];
- sprintf(output, msg_txt(662), battle_config.min_npc_vending_distance);
- clif_displaymessage(sd->fd, output);
- clif_skill_fail(sd, MC_VENDING, USESKILL_FAIL_LEVEL, 0);
- return;
- }
-
if( message[0] == '\0' ) // invalid input
return;
- vending_openvending(sd, message, flag, data, len/8);
+ vending_openvending(sd, message, data, len/8);
}
-
/// Guild creation request (CZ_REQ_MAKE_GUILD).
/// 0165 <char id>.L <guild name>.24B
void clif_parse_CreateGuild(int fd,struct map_session_data *sd)