diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-15 10:19:14 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-15 10:19:14 +0000 |
commit | 1a8c1081563174cdea5630ad5bc992405cd86e7d (patch) | |
tree | 104fd20e41fa8de670fe160a4837d86242222b8a | |
parent | 686b4f4173bb6f48226be68e8678248e4019943a (diff) | |
download | hercules-1a8c1081563174cdea5630ad5bc992405cd86e7d.tar.gz hercules-1a8c1081563174cdea5630ad5bc992405cd86e7d.tar.bz2 hercules-1a8c1081563174cdea5630ad5bc992405cd86e7d.tar.xz hercules-1a8c1081563174cdea5630ad5bc992405cd86e7d.zip |
* Players with OPTION_INVISIBLE should not be sent to clients.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6594 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 1 | ||||
-rw-r--r-- | src/map/clif.c | 14 |
2 files changed, 13 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index cec2d8c6d..10f176214 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/05/15
+ * Players with OPTION_INVISIBLE should not be sent to clients. [Lance]
* Remaining fixes for item scripts. [Lance]
* Added NPC event deprecated warnings to ease debugging old scripts. [Lance]
diff --git a/src/map/clif.c b/src/map/clif.c index c8610caf3..d46f52397 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1319,6 +1319,8 @@ int clif_spawn(struct block_list *bl) if (pcdb_checkid(vd->class_))
{ //Player spawn packet.
+ if(((TBL_PC *)bl)->status.option & OPTION_INVISIBLE)
+ return 0;
clif_set0078(bl, vd, buf);
#if PACKETVER > 3
if (WBUFW(buf,0)==0x78) {
@@ -1486,8 +1488,11 @@ int clif_move(struct block_list *bl) { len = clif_set007b(bl,vd,ud,buf);
clif_send(buf,len,bl,AREA_WOS);
- if (disguised(bl))
+ if (disguised(bl)){
+ if(((TBL_PC *)bl)->status.option & OPTION_INVISIBLE)
+ return 0;
clif_setdisguise((TBL_PC*)bl, buf, len, 0);
+ }
//Stupid client that needs this resent every time someone walks :X
if(vd->cloth_color)
@@ -3737,6 +3742,9 @@ void clif_getareachar_char(struct map_session_data* sd,struct block_list *bl) if (!vd || vd->class_ == INVISIBLE_CLASS)
return;
+ if(bl->type == BL_PC && ((TBL_PC *)bl)->status.option & OPTION_INVISIBLE)
+ return;
+
ud = unit_bl2ud(bl);
if (ud && ud->walktimer != -1)
{
@@ -3813,6 +3821,8 @@ int clif_fixpos2(struct block_list* bl) len = clif_set0078(bl,vd,buf);
if (disguised(bl)) {
+ if(((TBL_PC *)bl)->status.option & OPTION_INVISIBLE)
+ return 0;
clif_send(buf,len,bl,AREA_WOS);
clif_setdisguise((TBL_PC*)bl, buf, len, 0);
clif_setdisguise((TBL_PC*)bl, buf, len, 1);
@@ -4116,7 +4126,7 @@ int clif_outsight(struct block_list *bl,va_list ap) { //tsd has lost sight of the bl object.
switch(bl->type){
case BL_PC:
- if (((TBL_PC*)bl)->vd.class_ != INVISIBLE_CLASS)
+ if (((TBL_PC*)bl)->vd.class_ != INVISIBLE_CLASS || !(((TBL_PC*)bl)->status.option & OPTION_INVISIBLE))
clif_clearchar_id(bl->id,0,tsd->fd);
if(sd->chatID){
struct chat_data *cd;
|