From a38909503d98e8fe823c9f59bb94af8675563828 Mon Sep 17 00:00:00 2001 From: Dastgir Date: Fri, 4 Dec 2015 20:42:30 +0530 Subject: Added a function to update idle time --- src/map/pc.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index 4d4f41521..906507f87 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -11350,6 +11350,13 @@ int pc_autotrade_final(DBKey key, DBData *data, va_list ap) { return 0; } +void pc_update_idle_time(struct map_session_data* sd, enum e_battle_config_idletime type) +{ + nullpo_retv(sd); + if (battle_config.idletime_criteria&type) + sd->idletime = sockt->last_tick; +} + //Checks if the given class value corresponds to a player class. [Skotlex] //JOB_NOVICE isn't checked for class_ is supposed to be unsigned bool pc_db_checkid(unsigned int class_) @@ -11726,4 +11733,5 @@ void pc_defaults(void) { pc->autotrade_final = pc_autotrade_final; pc->check_job_name = pc_check_job_name; + pc->update_idle_time = pc_update_idle_time; } -- cgit v1.2.3-60-g2f50