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.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index fba5ffecc..f8b5119eb 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11111,11 +11111,16 @@ void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd)
int npc_id = RFIFOL(fd,2);
uint8 select = RFIFOB(fd,6);
- if( (select > sd->npc_menu && select != 0xff) || select == 0 )
- {
- TBL_NPC* nd = map_id2nd(npc_id);
- ShowWarning("Invalid menu selection on npc %d:'%s' - got %d, valid range is [%d..%d] (player AID:%d, CID:%d, name:'%s')!\n", npc_id, (nd)?nd->name:"invalid npc id", select, 1, sd->npc_menu, sd->bl.id, sd->status.char_id, sd->status.name);
- clif_GM_kick(NULL,sd);
+ if( (select > sd->npc_menu && select != 0xff) || select == 0 ) {
+#ifdef SECURE_NPCTIMEOUT
+ if( sd->npc_idle_timer != INVALID_TIMER ) {
+#endif
+ TBL_NPC* nd = map_id2nd(npc_id);
+ ShowWarning("Invalid menu selection on npc %d:'%s' - got %d, valid range is [%d..%d] (player AID:%d, CID:%d, name:'%s')!\n", npc_id, (nd)?nd->name:"invalid npc id", select, 1, sd->npc_menu, sd->bl.id, sd->status.char_id, sd->status.name);
+ clif_GM_kick(NULL,sd);
+#ifdef SECURE_NPCTIMEOUT
+ }
+#endif
return;
}