* Clearing the dummy npc after fooling the client.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6128 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
Lance 2006-04-17 09:08:16 +00:00
parent 7db6cd3d03
commit 1be152193d
2 changed files with 47 additions and 24 deletions

View File

@ -3,6 +3,9 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/04/17
* Clearing the dummy npc after fooling the client. [Lance]
2006/04/16 2006/04/16
* Fixed the first call to the walk timers having the tick interval halved, * Fixed the first call to the walk timers having the tick interval halved,
which made all walking timers be off by half cell with the actual position which made all walking timers be off by half cell with the actual position

View File

@ -1734,15 +1734,23 @@ int clif_scriptmenu(struct map_session_data *sd, int npcid, char *mes) {
nullpo_retr(0, sd); nullpo_retr(0, sd);
if(map_id2bl(npcid)->m < 0)
send_fake_npc(sd, npcid);
fd=sd->fd; fd=sd->fd;
if(map_id2bl(npcid)->m < 0){
send_fake_npc(sd, npcid);
WFIFOW(fd,0)=0xb7; WFIFOW(fd,0)=0xb7;
WFIFOW(fd,2)=slen; WFIFOW(fd,2)=slen;
WFIFOL(fd,4)=npcid; WFIFOL(fd,4)=npcid;
strcpy((char*)WFIFOP(fd,8),mes); strcpy((char*)WFIFOP(fd,8),mes);
WFIFOSET(fd,WFIFOW(fd,2)); 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; return 0;
} }
@ -1755,15 +1763,21 @@ int clif_scriptinput(struct map_session_data *sd, int npcid) {
int fd; int fd;
nullpo_retr(0, sd); nullpo_retr(0, sd);
if(map_id2bl(npcid)->m < 0)
send_fake_npc(sd, npcid);
fd=sd->fd; fd=sd->fd;
if(map_id2bl(npcid)->m < 0){
send_fake_npc(sd, npcid);
WFIFOHEAD(fd, packet_len_table[0x142]); WFIFOHEAD(fd, packet_len_table[0x142]);
WFIFOW(fd,0)=0x142; WFIFOW(fd,0)=0x142;
WFIFOL(fd,2)=npcid; WFIFOL(fd,2)=npcid;
WFIFOSET(fd,packet_len_table[0x142]); 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; return 0;
} }
@ -1776,15 +1790,21 @@ int clif_scriptinputstr(struct map_session_data *sd, int npcid) {
int fd; int fd;
nullpo_retr(0, sd); nullpo_retr(0, sd);
if(map_id2bl(npcid)->m < 0)
send_fake_npc(sd, npcid);
fd=sd->fd; fd=sd->fd;
if(map_id2bl(npcid)->m < 0){
send_fake_npc(sd, npcid);
WFIFOHEAD(fd, packet_len_table[0x1d4]); WFIFOHEAD(fd, packet_len_table[0x1d4]);
WFIFOW(fd,0)=0x1d4; WFIFOW(fd,0)=0x1d4;
WFIFOL(fd,2)=npcid; WFIFOL(fd,2)=npcid;
WFIFOSET(fd,packet_len_table[0x1d4]); 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; return 0;
} }