From 368efae9829a3ef7f4cb2bbda2d5388f3d6936d2 Mon Sep 17 00:00:00 2001 From: Lance Date: Tue, 28 Mar 2006 09:54:27 +0000 Subject: * Modified clif_getareachar_pc to hide hidden GMs from normal players (players with GM level > 0 still able to view) by NOT sending the coordinates. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5782 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) (limited to 'src/map') diff --git a/src/map/clif.c b/src/map/clif.c index 47640aa18..7722c70ca 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -4188,31 +4188,34 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds nullpo_retv(sd); nullpo_retv(dstsd); - if(dstsd->ud.walktimer != -1){ -#if PACKETVER < 4 - WFIFOHEAD(sd->fd, packet_len_table[0x7b]); -#else - WFIFOHEAD(sd->fd, packet_len_table[0x1da]); -#endif - len = clif_set007b(dstsd,WFIFOP(sd->fd,0)); - WFIFOSET(sd->fd,len); - if(dstsd->disguise) { - WFIFOHEAD(sd->fd,packet_len_table[0x7b]); - len = clif_dis007b(dstsd,WFIFOP(sd->fd,0)); + // Hidden GMs will not be revealed by bots :) [Lance] + if((!dstsd->status.option&OPTION_INVISIBLE || !pc_isGM(dstsd)) || pc_isGM(sd)){ + if(dstsd->ud.walktimer != -1){ + #if PACKETVER < 4 + WFIFOHEAD(sd->fd, packet_len_table[0x7b]); + #else + WFIFOHEAD(sd->fd, packet_len_table[0x1da]); + #endif + len = clif_set007b(dstsd,WFIFOP(sd->fd,0)); WFIFOSET(sd->fd,len); - } - } else { + if(dstsd->disguise) { + WFIFOHEAD(sd->fd,packet_len_table[0x7b]); + len = clif_dis007b(dstsd,WFIFOP(sd->fd,0)); + WFIFOSET(sd->fd,len); + } + } else { #if PACKETVER < 4 - WFIFOHEAD(sd->fd,packet_len_table[0x78]); + WFIFOHEAD(sd->fd,packet_len_table[0x78]); #else - WFIFOHEAD(sd->fd,packet_len_table[0x1d8]); + WFIFOHEAD(sd->fd,packet_len_table[0x1d8]); #endif - len = clif_set0078(dstsd,WFIFOP(sd->fd,0)); - WFIFOSET(sd->fd,len); - if(dstsd->disguise) { - WFIFOHEAD(sd->fd,packet_len_table[0x7b]); - len = clif_dis0078(dstsd,WFIFOP(sd->fd,0)); + len = clif_set0078(dstsd,WFIFOP(sd->fd,0)); WFIFOSET(sd->fd,len); + if(dstsd->disguise) { + WFIFOHEAD(sd->fd,packet_len_table[0x7b]); + len = clif_dis0078(dstsd,WFIFOP(sd->fd,0)); + WFIFOSET(sd->fd,len); + } } } -- cgit v1.2.3-70-g09d2