diff options
author | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-23 05:11:57 +0000 |
---|---|---|
committer | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-23 05:11:57 +0000 |
commit | 30b5d44d52d1f6715c44e6f266a756a59acb2c59 (patch) | |
tree | f99901f1449f5ac653e6450536ef2c2f4ed0b88a | |
parent | 99a019db1a619837f3e3bf6820ee525ee1af802a (diff) | |
download | hercules-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
-rw-r--r-- | Changelog.txt | 7 | ||||
-rw-r--r-- | src/map/map.h | 1 | ||||
-rw-r--r-- | src/map/party.c | 2 | ||||
-rw-r--r-- | src/map/pc.c | 7 |
4 files changed, 15 insertions, 2 deletions
diff --git a/Changelog.txt b/Changelog.txt index bbfea93ec..aba6f5a0b 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,7 +1,10 @@ Date Added 12/22 - * Fixed a bug in resnametable from local directories [MouseJstr] - * Fixed a bug in grfio_read causing memory corruptions [MouseJstr] + * Changed how party exp is passed out to eliminate players + current in a chat window or those who havn't moved or attacked + in 2 minutes [MouseJstr] + * Fixed a bug in resnametable from local directories, + by fixing a bug in grfio_read causing memory corruptions [MouseJstr] * Rearranged how guild messages, gm messages, and party messages are moved back and forth between the inter server and the map server.. eliminating unneeded round trips to eliminate diff --git a/src/map/map.h b/src/map/map.h index 79926903c..1c9565341 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -185,6 +185,7 @@ struct map_session_data { char *npc_stackbuf; char npc_str[256]; unsigned int chatID; + unsigned long idletime; struct{ char name[24]; diff --git a/src/map/party.c b/src/map/party.c index 075209f7e..9443608fb 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -591,6 +591,8 @@ int party_exp_share(struct party *p,int map,int base_exp,int job_exp,int zeny) return 0; for(i=0;i<MAX_PARTY;i++) if((sd=p->member[i].sd)!=NULL && sd->bl.m==map && session[sd->fd] != NULL) { + if (/* pc_issit(sd) || */ (sd->chatID != NULL) || (sd->idletime < (time(0) - 120))) + continue; #ifdef TWILIGHT pc_gainexp(sd,base_exp,job_exp); #else 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)); |