summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorDastgir <dastgirpojee@rocketmail.com>2015-12-04 20:42:30 +0530
committerDastgir <dastgirpojee@rocketmail.com>2015-12-04 21:14:10 +0530
commita38909503d98e8fe823c9f59bb94af8675563828 (patch)
treeaabdae0ead911f4a18966d091283787e72ebcf51 /src/map/pc.c
parent6abd0fb8b1bbfe2101cc68503897b0449027fb3d (diff)
downloadhercules-a38909503d98e8fe823c9f59bb94af8675563828.tar.gz
hercules-a38909503d98e8fe823c9f59bb94af8675563828.tar.bz2
hercules-a38909503d98e8fe823c9f59bb94af8675563828.tar.xz
hercules-a38909503d98e8fe823c9f59bb94af8675563828.zip
Added a function to update idle time
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c8
1 files changed, 8 insertions, 0 deletions
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;
}