summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-17 09:08:16 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-17 09:08:16 +0000
commit78b019c4a30140c9a3b3ea585e53ddec7c2ce221 (patch)
treea8e7c50be72a689a6f07b162c3414e78f9b116a1 /src/map/clif.c
parent2c5ef4009772b5472f4268ec93544ebfa87798f1 (diff)
downloadhercules-78b019c4a30140c9a3b3ea585e53ddec7c2ce221.tar.gz
hercules-78b019c4a30140c9a3b3ea585e53ddec7c2ce221.tar.bz2
hercules-78b019c4a30140c9a3b3ea585e53ddec7c2ce221.tar.xz
hercules-78b019c4a30140c9a3b3ea585e53ddec7c2ce221.zip
* Clearing the dummy npc after fooling the client.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6128 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c64
1 files changed, 42 insertions, 22 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index c32274ff9..a295e68a9 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1734,15 +1734,23 @@ 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;
- WFIFOL(fd,4)=npcid;
- strcpy((char*)WFIFOP(fd,8),mes);
- WFIFOSET(fd,WFIFOW(fd,2));
+
+ 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));
+ }
return 0;
}
@@ -1755,15 +1763,21 @@ int clif_scriptinput(struct map_session_data *sd, int npcid) {
int fd;
nullpo_retr(0, sd);
+ fd=sd->fd;
- if(map_id2bl(npcid)->m < 0)
+ if(map_id2bl(npcid)->m < 0){
send_fake_npc(sd, npcid);
-
- fd=sd->fd;
- 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]);
+ 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]);
+ }
return 0;
}
@@ -1776,15 +1790,21 @@ int clif_scriptinputstr(struct map_session_data *sd, int npcid) {
int fd;
nullpo_retr(0, sd);
+ fd=sd->fd;
- if(map_id2bl(npcid)->m < 0)
+ if(map_id2bl(npcid)->m < 0){
send_fake_npc(sd, npcid);
-
- fd=sd->fd;
- 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]);
+ 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]);
+ }
return 0;
}