summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-02-01 12:08:02 -0200
committershennetsind <ind@henn.et>2013-02-01 12:08:02 -0200
commit7192b105201499e30a50c061e7ab2005c97d3714 (patch)
treed5e482a4c36b9a9ba77f9ffeba038b235a9f19d0 /src/map/clif.c
parent74ed3ed32f33ad4df945718389d7d74ab0a53794 (diff)
downloadhercules-7192b105201499e30a50c061e7ab2005c97d3714.tar.gz
hercules-7192b105201499e30a50c061e7ab2005c97d3714.tar.bz2
hercules-7192b105201499e30a50c061e7ab2005c97d3714.tar.xz
hercules-7192b105201499e30a50c061e7ab2005c97d3714.zip
Fixed Bug #5343
SECURE_NPCTIMEOUT should be fully functional now, fixed remaining known issues. http://hercules.ws/board/tracker/issue-5343-delete-timer-error/ Signed-off-by: shennetsind <ind@henn.et>
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;
}