diff options
author | Vicious <Vicious@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-18 03:38:19 +0000 |
---|---|---|
committer | Vicious <Vicious@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-18 03:38:19 +0000 |
commit | 5b981f638f4dc7b3fa0783552dabf3d588f81a72 (patch) | |
tree | 6dbb8a76ca4d7ecc7d7a530cc59456a0e03b1017 /src/map/clif.c | |
parent | 6ed44f7303f11ed2de589fca48b19092c2738409 (diff) | |
download | hercules-5b981f638f4dc7b3fa0783552dabf3d588f81a72.tar.gz hercules-5b981f638f4dc7b3fa0783552dabf3d588f81a72.tar.bz2 hercules-5b981f638f4dc7b3fa0783552dabf3d588f81a72.tar.xz hercules-5b981f638f4dc7b3fa0783552dabf3d588f81a72.zip |
better way to fix invisible npc! :D
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6146 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 62 |
1 files changed, 23 insertions, 39 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 18b09da95..1d2674ebb 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1705,6 +1705,9 @@ int clif_scriptclose(struct map_session_data *sd, int npcid) { WFIFOW(fd,0)=0xb6;
WFIFOL(fd,2)=npcid;
WFIFOSET(fd,packet_len_table[0xb6]);
+
+ if(map_id2bl(npcid)->m < 0)
+ clif_clearchar_id(npcid, 0, fd);
return 0;
}
@@ -1736,22 +1739,15 @@ int clif_scriptmenu(struct map_session_data *sd, int npcid, char *mes) { fd=sd->fd;
- if(map_id2bl(npcid)->m < 0){
+ if(map_id2bl(npcid)->m < 0)
send_fake_npc(sd, npcid);
- WFIFOW(fd,0)=0xb7;
- WFIFOW(fd,2)=slen;
- WFIFOL(fd,4)=npcid;
- strcpy((char*)WFIFOP(fd,8),mes);
- WFIFOSET(fd,WFIFOW(fd,2));
- clif_clearchar_id(npcid, 0, fd);
- } else {
- WFIFOW(fd,0)=0xb7;
- WFIFOW(fd,2)=slen;
- WFIFOL(fd,4)=npcid;
- strcpy((char*)WFIFOP(fd,8),mes);
- WFIFOSET(fd,WFIFOW(fd,2));
- }
+ WFIFOW(fd,0)=0xb7;
+ WFIFOW(fd,2)=slen;
+ WFIFOL(fd,4)=npcid;
+ strcpy((char*)WFIFOP(fd,8),mes);
+ WFIFOSET(fd,WFIFOW(fd,2));
+
return 0;
}
@@ -1765,19 +1761,13 @@ int clif_scriptinput(struct map_session_data *sd, int npcid) { nullpo_retr(0, sd);
fd=sd->fd;
- if(map_id2bl(npcid)->m < 0){
+ if(map_id2bl(npcid)->m < 0)
send_fake_npc(sd, npcid);
- WFIFOHEAD(fd, packet_len_table[0x142]);
- WFIFOW(fd,0)=0x142;
- WFIFOL(fd,2)=npcid;
- WFIFOSET(fd,packet_len_table[0x142]);
- clif_clearchar_id(npcid, 0, fd);
- } else {
- WFIFOHEAD(fd, packet_len_table[0x142]);
- WFIFOW(fd,0)=0x142;
- WFIFOL(fd,2)=npcid;
- WFIFOSET(fd,packet_len_table[0x142]);
- }
+
+ WFIFOHEAD(fd, packet_len_table[0x142]);
+ WFIFOW(fd,0)=0x142;
+ WFIFOL(fd,2)=npcid;
+ WFIFOSET(fd,packet_len_table[0x142]);
return 0;
}
@@ -1792,20 +1782,14 @@ int clif_scriptinputstr(struct map_session_data *sd, int npcid) { nullpo_retr(0, sd);
fd=sd->fd;
- if(map_id2bl(npcid)->m < 0){
+ if(map_id2bl(npcid)->m < 0)
send_fake_npc(sd, npcid);
- WFIFOHEAD(fd, packet_len_table[0x1d4]);
- WFIFOW(fd,0)=0x1d4;
- WFIFOL(fd,2)=npcid;
- WFIFOSET(fd,packet_len_table[0x1d4]);
- clif_clearchar_id(npcid, 0, fd);
- } else {
- WFIFOHEAD(fd, packet_len_table[0x1d4]);
- WFIFOW(fd,0)=0x1d4;
- WFIFOL(fd,2)=npcid;
- WFIFOSET(fd,packet_len_table[0x1d4]);
- }
-
+
+ WFIFOHEAD(fd, packet_len_table[0x1d4]);
+ WFIFOW(fd,0)=0x1d4;
+ WFIFOL(fd,2)=npcid;
+ WFIFOSET(fd,packet_len_table[0x1d4]);
+
return 0;
}
|