summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-31 09:21:54 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-31 09:21:54 +0000
commit02362c16be45657f049202126fe48015d5213fad (patch)
treead6516b6adacd0e7fa9e8f8e3fed6cab99e51358
parent6b56a6e25021d63f3af570593e40f6fca767c162 (diff)
downloadhercules-02362c16be45657f049202126fe48015d5213fad.tar.gz
hercules-02362c16be45657f049202126fe48015d5213fad.tar.bz2
hercules-02362c16be45657f049202126fe48015d5213fad.tar.xz
hercules-02362c16be45657f049202126fe48015d5213fad.zip
* Should fix a bug in GM stealth mode (@hide).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5823 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--notice.txt6
-rw-r--r--src/map/clif.c56
3 files changed, 37 insertions, 28 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index d32fbf3bb..cbb4cb1e5 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,9 @@ 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.
+2006/03/31
+ * Should fix a bug in GM stealth mode (@hide). [Lance]
+
2006/03/30
* Updated char name option. [Vicious]
* Added a missing return that fixes crashes on status_change_timer when
diff --git a/notice.txt b/notice.txt
index 45b6375e4..348ae98af 100644
--- a/notice.txt
+++ b/notice.txt
@@ -1,10 +1,8 @@
//Notice\\
-This branch, "Stable", might not be stable due to bugs and whatsoever.
+This branch, "Trunk", might not be stable due to bugs and whatsoever.
It is highly recommended, if you have any dobts on using this svn version,
-it is best if you use an eAthena Official Version or use RC5. calling the
-stable branch stable is an understatement. you have choosen to use it,
-bear with it.
+it is best if you use an eAthena Official Version or use RC5.
on another note, if you found a bug, it is best if you report it on the eAthena
forums as http://eathena.ws/ . If you have made yourself a fix for
diff --git a/src/map/clif.c b/src/map/clif.c
index 38a4ec530..8e09d81d3 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1821,31 +1821,34 @@ int clif_spawnpc(struct map_session_data *sd) {
nullpo_retr(0, sd);
- clif_set0078(sd, buf);
+ // Avoid bots/modified clients to view hidden GMs. [Lance]
+ if(!pc_isGM(sd) || !sd->status.option&OPTION_INVISIBLE){
+ clif_set0078(sd, buf);
#if PACKETVER < 4
- WBUFW(buf, 0) = 0x79;
- WBUFW(buf,51) = clif_setlevel(sd->status.base_level);
- clif_send(buf, packet_len_table[0x79], &sd->bl, AREA_WOS);
+ WBUFW(buf, 0) = 0x79;
+ WBUFW(buf,51) = clif_setlevel(sd->status.base_level);
+ clif_send(buf, packet_len_table[0x79], &sd->bl, AREA_WOS);
#else
- WBUFW(buf, 0) = 0x1d9;
- WBUFW(buf,51) = clif_setlevel(sd->status.base_level);
- clif_send(buf, packet_len_table[0x1d9], &sd->bl, AREA_WOS);
+ WBUFW(buf, 0) = 0x1d9;
+ WBUFW(buf,51) = clif_setlevel(sd->status.base_level);
+ clif_send(buf, packet_len_table[0x1d9], &sd->bl, AREA_WOS);
#endif
- if(sd->disguise > 0) {
- int len;
- memset(buf,0,packet_len_table[0x7c]);
- WBUFW(buf,0)=0x7c;
- WBUFL(buf,2)=-sd->bl.id;
- WBUFW(buf,6)=sd->speed;
- WBUFW(buf,12)=sd->sc.option;
- WBUFW(buf,20)=sd->disguise;
- WBUFPOS(buf,36,sd->bl.x,sd->bl.y);
- clif_send(buf,packet_len_table[0x7c],&sd->bl,AREA);
-
- len = clif_dis0078(sd,buf);
- clif_send(buf,len,&sd->bl,AREA);
+ if(sd->disguise > 0) {
+ int len;
+ memset(buf,0,packet_len_table[0x7c]);
+ WBUFW(buf,0)=0x7c;
+ WBUFL(buf,2)=-sd->bl.id;
+ WBUFW(buf,6)=sd->speed;
+ WBUFW(buf,12)=sd->sc.option;
+ WBUFW(buf,20)=sd->disguise;
+ WBUFPOS(buf,36,sd->bl.x,sd->bl.y);
+ clif_send(buf,packet_len_table[0x7c],&sd->bl,AREA);
+
+ len = clif_dis0078(sd,buf);
+ clif_send(buf,len,&sd->bl,AREA);
+ }
}
if (sd->spiritball > 0)
@@ -4189,7 +4192,7 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds
nullpo_retv(dstsd);
// Hidden GMs will not be revealed by bots :) [Lance]
- if((!dstsd->status.option&OPTION_INVISIBLE || !pc_isGM(dstsd)) || pc_isGM(sd)){
+ if(!pc_isGM(dstsd) || !dstsd->status.option&OPTION_INVISIBLE){
if(dstsd->ud.walktimer != -1){
#if PACKETVER < 4
WFIFOHEAD(sd->fd, packet_len_table[0x7b]);
@@ -4199,7 +4202,7 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds
len = clif_set007b(dstsd,WFIFOP(sd->fd,0));
WFIFOSET(sd->fd,len);
if(dstsd->disguise) {
- WFIFOHEAD(sd->fd,packet_len_table[0x7b]);
+ WFIFOHEAD(sd->fd,packet_len_table[0x7b]);
len = clif_dis007b(dstsd,WFIFOP(sd->fd,0));
WFIFOSET(sd->fd,len);
}
@@ -4212,7 +4215,7 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds
len = clif_set0078(dstsd,WFIFOP(sd->fd,0));
WFIFOSET(sd->fd,len);
if(dstsd->disguise) {
- WFIFOHEAD(sd->fd,packet_len_table[0x7b]);
+ WFIFOHEAD(sd->fd,packet_len_table[0x7b]);
len = clif_dis0078(dstsd,WFIFOP(sd->fd,0));
WFIFOSET(sd->fd,len);
}
@@ -4348,10 +4351,15 @@ int clif_fixpcpos(struct map_session_data *sd)
if(sd->ud.walktimer != -1){
len = clif_set007b(sd,buf);
- clif_send(buf,len,&sd->bl,AREA);
} else {
len = clif_set0078(sd,buf);
+ }
+
+ // Prevent bots/modified clients to view hidden GMs [Lance]
+ if(!pc_isGM(sd) || !sd->status.option&OPTION_INVISIBLE){
clif_send(buf,len,&sd->bl,AREA);
+ } else {
+ clif_send(buf,len,&sd->bl,SELF);
}
return 0;