diff options
author | epoque11 <epoque11@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-12-13 02:21:13 +0000 |
---|---|---|
committer | epoque11 <epoque11@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-12-13 02:21:13 +0000 |
commit | 0fe7b873ae06352aba2840eacf687d270d64fc2d (patch) | |
tree | 391d8d79f1ee00049a5421a6e2dc473a3d8d062a /src/map/pc.c | |
parent | 1e5059abe076709eed3a5044c6980c6a7615aece (diff) | |
download | hercules-0fe7b873ae06352aba2840eacf687d270d64fc2d.tar.gz hercules-0fe7b873ae06352aba2840eacf687d270d64fc2d.tar.bz2 hercules-0fe7b873ae06352aba2840eacf687d270d64fc2d.tar.xz hercules-0fe7b873ae06352aba2840eacf687d270d64fc2d.zip |
- Fixed hidden GMs being processed in the PVP ranking timer
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15083 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 21588a12d..e6ef6ff83 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7628,6 +7628,11 @@ int pc_calc_pvprank_sub(struct block_list *bl,va_list ap) sd1=(struct map_session_data *)bl; sd2=va_arg(ap,struct map_session_data *); + if( sd1->sc.option&OPTION_INVISIBLE || sd2->sc.option&OPTION_INVISIBLE ) + {// cannot register pvp rank for hidden GMs + return 0; + } + if( sd1->pvp_point > sd2->pvp_point ) sd2->pvp_rank++; return 0; @@ -7643,8 +7648,8 @@ int pc_calc_pvprank(struct map_session_data *sd) old=sd->pvp_rank; sd->pvp_rank=1; map_foreachinmap(pc_calc_pvprank_sub,sd->bl.m,BL_PC,sd); - if(old!=sd->pvp_rank || sd->pvp_lastusers!=m->users) - clif_pvpset(sd,sd->pvp_rank,sd->pvp_lastusers=m->users,0); + if(old!=sd->pvp_rank || sd->pvp_lastusers!=m->users_pvp) + clif_pvpset(sd,sd->pvp_rank,sd->pvp_lastusers=m->users_pvp,0); return sd->pvp_rank; } /*========================================== @@ -7658,6 +7663,12 @@ int pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr_t data) if(sd==NULL) return 0; sd->pvp_timer = INVALID_TIMER; + + if( sd->sc.option&OPTION_INVISIBLE ) + {// do not calculate the pvp rank for a hidden GM + return 0; + } + if( pc_calc_pvprank(sd) > 0 ) sd->pvp_timer = add_timer(gettick()+PVP_CALCRANK_INTERVAL,pc_calc_pvprank_timer,id,data); return 0; |