diff options
-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;
}
|