summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index c0304f7b6..c3fa9e347 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1709,6 +1709,19 @@ int clif_scriptclose(struct map_session_data *sd, int npcid) {
return 0;
}
+void send_fake_npc(struct map_session_data *sd, int npcid){
+ int fd = sd->fd;
+ WFIFOW(fd,0)=0x78;
+ WFIFOL(fd,2)=npcid;
+ WFIFOW(fd,12)=OPTION_INVISIBLE;
+ WFIFOW(fd,14)=INVISIBLE_CLASS;
+ WFIFOPOS(fd,46,sd->bl.x,sd->bl.y);
+ WFIFOB(fd,49)=5;
+ WFIFOB(fd,50)=5;
+ WFIFOSET(fd, packet_len_table[0x78]);
+ return;
+}
+
/*==========================================
*
*------------------------------------------
@@ -1720,6 +1733,9 @@ int clif_scriptmenu(struct map_session_data *sd, int npcid, char *mes) {
nullpo_retr(0, sd);
+ if(map_id2bl(npcid)->m < 0)
+ send_fake_npc(sd, npcid);
+
fd=sd->fd;
WFIFOW(fd,0)=0xb7;
WFIFOW(fd,2)=slen;
@@ -1739,6 +1755,9 @@ int clif_scriptinput(struct map_session_data *sd, int npcid) {
nullpo_retr(0, sd);
+ if(map_id2bl(npcid)->m < 0)
+ send_fake_npc(sd, npcid);
+
fd=sd->fd;
WFIFOHEAD(fd, packet_len_table[0x142]);
WFIFOW(fd,0)=0x142;
@@ -1757,6 +1776,9 @@ int clif_scriptinputstr(struct map_session_data *sd, int npcid) {
nullpo_retr(0, sd);
+ if(map_id2bl(npcid)->m < 0)
+ send_fake_npc(sd, npcid);
+
fd=sd->fd;
WFIFOHEAD(fd, packet_len_table[0x1d4]);
WFIFOW(fd,0)=0x1d4;