summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-09-27 11:28:28 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-09-27 11:28:28 +0000
commit6b97414d3f91999512537eb3878057f381005e58 (patch)
tree1126653edb7b593af22f64331011e2878b2e21ef
parent4b7725cdeff68626a8a9f7f8106a1cd18b850a8e (diff)
downloadhercules-6b97414d3f91999512537eb3878057f381005e58.tar.gz
hercules-6b97414d3f91999512537eb3878057f381005e58.tar.bz2
hercules-6b97414d3f91999512537eb3878057f381005e58.tar.xz
hercules-6b97414d3f91999512537eb3878057f381005e58.zip
Fixed clif_changelook betraying the presence of gm-hidden players (bugreport:2283).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13240 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/clif.c13
2 files changed, 12 insertions, 3 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 0249c11c3..6722a8dc8 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2008/09/27
+ * Fixed clif_changelook betraying the presence of gm-hidden players (bugreport:2283) [ultramage]
2008/09/11
* Rev. 13226 Corrected Lex Divina not showing animation on fail. (bugreport:1740) [L0ne_W0lf]
* Rev. 13225 Corrected Offensive Res using Turn Undead cast time. (bugreport:1704) [L0ne_W0lf]
diff --git a/src/map/clif.c b/src/map/clif.c
index 53398a376..6036cd132 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -2318,12 +2318,15 @@ void clif_changelook(struct block_list *bl,int type,int val)
{
unsigned char buf[16];
struct map_session_data* sd = NULL;
+ struct status_change* sc;
struct view_data* vd;
+ enum send_target target = AREA;
nullpo_retv(bl);
sd = BL_CAST(BL_PC, bl);
+ sc = status_get_sc(bl);
vd = status_get_viewdata(bl);
- //nullpo_ret(vd);
+ //nullpo_ret(vd);
if( vd ) //temp hack to let Warp Portal change appearance
switch(type)
{
@@ -2395,12 +2398,16 @@ void clif_changelook(struct block_list *bl,int type,int val)
break;
}
+ // prevent leaking the presence of GM-hidden objects
+ if( sc->option&OPTION_INVISIBLE )
+ target = SELF;
+
#if PACKETVER < 4
WBUFW(buf,0)=0xc3;
WBUFL(buf,2)=bl->id;
WBUFB(buf,6)=type;
WBUFB(buf,7)=val;
- clif_send(buf,packet_len(0xc3),bl,AREA);
+ clif_send(buf,packet_len(0xc3),bl,target);
#else
WBUFW(buf,0)=0x1d7;
WBUFL(buf,2)=bl->id;
@@ -2413,7 +2420,7 @@ void clif_changelook(struct block_list *bl,int type,int val)
WBUFW(buf,7)=val;
WBUFW(buf,9)=0;
}
- clif_send(buf,packet_len(0x1d7),bl,AREA);
+ clif_send(buf,packet_len(0x1d7),bl,target);
#endif
}