diff options
author | malufett <malufett.eat.my.binaries@gmail.com> | 2013-03-08 22:51:42 +0800 |
---|---|---|
committer | malufett <malufett.eat.my.binaries@gmail.com> | 2013-03-08 22:51:42 +0800 |
commit | bc63ef1225dadcfa2ba20a9b073de801ee177992 (patch) | |
tree | f25e9d9121a75925e65812d1a5f8d395aed59270 /src/map/skill.c | |
parent | de1e1856cd115feb9834ba716d562e175ac15403 (diff) | |
download | hercules-bc63ef1225dadcfa2ba20a9b073de801ee177992.tar.gz hercules-bc63ef1225dadcfa2ba20a9b073de801ee177992.tar.bz2 hercules-bc63ef1225dadcfa2ba20a9b073de801ee177992.tar.xz hercules-bc63ef1225dadcfa2ba20a9b073de801ee177992.zip |
Fixed Bug #7114
-revised/added 'npc_isnear' where it checks if an NPC is nearby when making chat rooms or using vending.
Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index a8b852cc7..fdfdbcee7 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -571,8 +571,16 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd) } break; case MC_VENDING: - case MC_IDENTIFY: case ALL_BUYING_STORE: + 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,skill_id,USESKILL_FAIL_THERE_ARE_NPC_AROUND,0); + return 1; + } + case MC_IDENTIFY: return 0; // always allowed case WZ_ICEWALL: // noicewall flag [Valaris] |