diff options
Diffstat (limited to 'src/emap/npc.c')
-rw-r--r-- | src/emap/npc.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/emap/npc.c b/src/emap/npc.c index 5b6d66a..e5cd6e6 100644 --- a/src/emap/npc.c +++ b/src/emap/npc.c @@ -6,6 +6,10 @@ #include <stdio.h> #include <stdlib.h> #include <strings.h> +#include <time.h> +#ifndef WIN32 + #include <sys/time.h> +#endif #include "common/HPMi.h" #include "common/memmgr.h" @@ -305,3 +309,17 @@ int enpc_unload_pre(struct npc_data** ndPtr, } return 0; } + +// TODO: Talking to a NPC should reset Botter Syndrome tracker +// enpc_click_post +// pc->setreg(sd, script->add_variable("@skillTarget"), bl->id); +int enpc_click_post(int retVal, + struct map_session_data *sd, + struct npc_data *nd __attribute__ ((unused))) { + nullpo_retr(1, sd); + // If you talked to a NPC, set this variable to gettimetick(2) + if (!retVal) + pc->setreg(sd, script->add_variable("@npctalk"), (int)time(NULL)); + return retVal; +} + |