diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-08 18:56:27 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-08 18:56:27 +0000 |
commit | 2c5d67942caecebe8a902331fcae7686880e9c26 (patch) | |
tree | c351e5f2ca931670a8e72a7e085ad16c56be20db /src | |
parent | d2a78fd705e06077e9e7e2afb6fc3df99576096c (diff) | |
download | hercules-2c5d67942caecebe8a902331fcae7686880e9c26.tar.gz hercules-2c5d67942caecebe8a902331fcae7686880e9c26.tar.bz2 hercules-2c5d67942caecebe8a902331fcae7686880e9c26.tar.xz hercules-2c5d67942caecebe8a902331fcae7686880e9c26.zip |
- Cleaned clif_pvpset to not send the packet to nearby characters when the source is GM-hidden. May help fix the crash on PvP with gm-hidden characters.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7053 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 14 | ||||
-rw-r--r-- | src/map/pc.c | 6 |
2 files changed, 7 insertions, 13 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 99a3a7a45..7f06c1e20 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5121,25 +5121,21 @@ int clif_pvpset(struct map_session_data *sd,int pvprank,int pvpnum,int type) WFIFOHEAD(sd->fd,packet_len_table[0x19a]);
WFIFOW(sd->fd,0) = 0x19a;
WFIFOL(sd->fd,2) = sd->bl.id;
- if(pvprank<=0)
- pc_calc_pvprank(sd);
WFIFOL(sd->fd,6) = pvprank;
WFIFOL(sd->fd,10) = pvpnum;
WFIFOSET(sd->fd,packet_len_table[0x19a]);
} else {
unsigned char buf[32];
-
WBUFW(buf,0) = 0x19a;
WBUFL(buf,2) = sd->bl.id;
- if(sd->sc.option&0x46)
- // WTF? a -1 to an unsigned value...
- WBUFL(buf,6) = 0xFFFFFFFF;
+ if(sd->sc.option&(OPTION_HIDE|OPTION_CLOAK))
+ WBUFL(buf,6) = ULONG_MAX; //On client displays as --
else
- if(pvprank<=0)
- pc_calc_pvprank(sd);
WBUFL(buf,6) = pvprank;
WBUFL(buf,10) = pvpnum;
- if(!type)
+ if(sd->sc.option&OPTION_INVISIBLE)
+ clif_send(buf,packet_len_table[0x19a],&sd->bl,SELF);
+ else if(!type)
clif_send(buf,packet_len_table[0x19a],&sd->bl,AREA);
else
clif_send(buf,packet_len_table[0x19a],&sd->bl,ALL_SAMEMAP);
diff --git a/src/map/pc.c b/src/map/pc.c index d2db1d0cd..ff6a435cb 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6398,10 +6398,8 @@ int pc_calc_pvprank_sub(struct block_list *bl,va_list ap) {
struct map_session_data *sd1,*sd2=NULL;
- nullpo_retr(0, bl);
- nullpo_retr(0, ap);
- nullpo_retr(0, sd1=(struct map_session_data *)bl);
- nullpo_retr(0, sd2=va_arg(ap,struct map_session_data *));
+ sd1=(struct map_session_data *)bl;
+ sd2=va_arg(ap,struct map_session_data *);
if( sd1->pvp_point > sd2->pvp_point )
sd2->pvp_rank++;
|