summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-23 05:11:57 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-23 05:11:57 +0000
commit30b5d44d52d1f6715c44e6f266a756a59acb2c59 (patch)
treef99901f1449f5ac653e6450536ef2c2f4ed0b88a /src/map/pc.c
parent99a019db1a619837f3e3bf6820ee525ee1af802a (diff)
downloadhercules-30b5d44d52d1f6715c44e6f266a756a59acb2c59.tar.gz
hercules-30b5d44d52d1f6715c44e6f266a756a59acb2c59.tar.bz2
hercules-30b5d44d52d1f6715c44e6f266a756a59acb2c59.tar.xz
hercules-30b5d44d52d1f6715c44e6f266a756a59acb2c59.zip
Update
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@745 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 4e429f378..ee883d736 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4311,6 +4311,7 @@ int pc_walktoxy(struct map_session_data *sd,int x,int y)
sd->to_x=x;
sd->to_y=y;
+ sd->idletime = time(0);
if(sd->walktimer != -1 && sd->state.change_walk_target==0){
// 現在?いている最中の目的地?更なのでマス目の中心に?た暫ノ
@@ -4643,6 +4644,9 @@ int pc_attack_timer(int tid,unsigned int tick,int id,int data)
sd=map_id2sd(id);
if(sd == NULL)
return 0;
+
+ sd->idletime = time(0);
+
if(sd->attacktimer != tid){
if(battle_config.error_log)
printf("pc_attack_timer %d != %d\n",sd->attacktimer,tid);
@@ -4755,11 +4759,14 @@ int pc_attack(struct map_session_data *sd,int target_id,int type)
struct block_list *bl;
int d;
+
nullpo_retr(0, sd);
bl=map_id2bl(target_id);
if(bl==NULL)
return 1;
+
+ sd->idletime = time(0);
if(bl->type==BL_NPC) { // monster npcs [Valaris]
//npc_click(sd,RFIFOL(sd->fd,2));