diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-12-04 18:47:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-12-04 18:47:48 +0300 |
commit | da6300af9e1529fa2f98cb7481b8a89e17627aa5 (patch) | |
tree | be0733a09d5e7a4eb560e8ea7a8a4b0a88743a0a /src/map/pc.c | |
parent | 1e2f24a2fcb13b8a2fe06f4cc829670303760929 (diff) | |
parent | a38909503d98e8fe823c9f59bb94af8675563828 (diff) | |
download | hercules-da6300af9e1529fa2f98cb7481b8a89e17627aa5.tar.gz hercules-da6300af9e1529fa2f98cb7481b8a89e17627aa5.tar.bz2 hercules-da6300af9e1529fa2f98cb7481b8a89e17627aa5.tar.xz hercules-da6300af9e1529fa2f98cb7481b8a89e17627aa5.zip |
Merge pull request #910 from dastgir/idle
Added a function to update idle time
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 43adf331b..b0a8ca62f 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -11426,6 +11426,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_) @@ -11802,4 +11809,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; } |