diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-15 15:22:02 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-15 15:22:02 +0000 |
commit | ee74f4207e43451f6857b327f52f206faca53d0a (patch) | |
tree | 645d8280940072468507c124507e78e4f3e08fa4 /src/map | |
parent | 8a2da0cdd5e7e28a8119442b4b9da816a9985250 (diff) | |
download | hercules-ee74f4207e43451f6857b327f52f206faca53d0a.tar.gz hercules-ee74f4207e43451f6857b327f52f206faca53d0a.tar.bz2 hercules-ee74f4207e43451f6857b327f52f206faca53d0a.tar.xz hercules-ee74f4207e43451f6857b327f52f206faca53d0a.zip |
- Removed Lance's checks in clif.c to prevent sending packets when a player is in OPTION_INVISIBLE mode. Now pc_disguise won't change your viewclass when you diguise while hiding. The disguise should "show up" when you uncloak, instead.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6597 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 14 | ||||
-rw-r--r-- | src/map/pc.c | 6 |
2 files changed, 8 insertions, 12 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 4ea64c473..17da41933 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1311,8 +1311,6 @@ 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) {
@@ -1480,11 +1478,8 @@ 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(((TBL_PC *)bl)->status.option & OPTION_INVISIBLE)
- return 0;
+ if (disguised(bl))
clif_setdisguise((TBL_PC*)bl, buf, len, 0);
- }
//Stupid client that needs this resent every time someone walks :X
if(vd->cloth_color)
@@ -3734,9 +3729,6 @@ 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,8 +3805,6 @@ 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);
@@ -4118,7 +4108,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 || !(((TBL_PC*)bl)->status.option & OPTION_INVISIBLE))
+ if (((TBL_PC*)bl)->vd.class_ != INVISIBLE_CLASS)
clif_clearchar_id(bl->id,0,tsd->fd);
if(sd->chatID){
struct chat_data *cd;
diff --git a/src/map/pc.c b/src/map/pc.c index 42baf4f8e..1a3a88486 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1085,6 +1085,12 @@ int pc_disguise(struct map_session_data *sd, int class_) { if (class_ && (sd->disguise == class_ || pc_isriding(sd)))
return 0;
+ if(sd->sc.option&OPTION_INVISIBLE)
+ { //Character is invisible. Stealth class-change. [Skotlex]
+ sd->disguise = class_; //viewdata is set on uncloaking.
+ return 2;
+ }
+
pc_stop_walking(sd, 0);
clif_clearchar(&sd->bl, 0);
|