summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-04 09:47:39 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-04 09:47:39 +0000
commit1903717ee1d6f3d7834b8ed807cf40f52364129b (patch)
treede3cc9d212599372553df970b0653aba01df29c3 /src/map/clif.c
parent41d79204a9a27ca396b0e9f158b19860aa878f9a (diff)
downloadhercules-1903717ee1d6f3d7834b8ed807cf40f52364129b.tar.gz
hercules-1903717ee1d6f3d7834b8ed807cf40f52364129b.tar.bz2
hercules-1903717ee1d6f3d7834b8ed807cf40f52364129b.tar.xz
hercules-1903717ee1d6f3d7834b8ed807cf40f52364129b.zip
- Fixed clif_sendfakenpc not being updated for PACKETVER 9
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12008 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 4d5533be8..49492d8d7 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1563,16 +1563,22 @@ int clif_scriptclose(struct map_session_data *sd, int npcid)
*------------------------------------------*/
void clif_sendfakenpc(struct map_session_data *sd, int npcid)
{
+ unsigned char *buf;
int fd = sd->fd;
WFIFOHEAD(fd, packet_len(0x78));
sd->state.using_fake_npc = 1;
- memset(WFIFOP(fd,0), 0, packet_len(0x78));
- WFIFOW(fd,0)=0x78;
- WFIFOL(fd,2)=npcid;
- WFIFOW(fd,14)=111;
- WFIFOPOS(fd,46,sd->bl.x,sd->bl.y,sd->ud.dir);
- WFIFOB(fd,49)=5;
- WFIFOB(fd,50)=5;
+ buf = WFIFOP(fd,0);
+ memset(WBUFP(fd,0), 0, packet_len(0x78));
+ WBUFW(buf,0)=0x78;
+#if PACKETVER >=9
+ WBUFB(buf,2) = 0; //Unknown bit
+ buf = WFIFOP(fd,1);
+#endif
+ WBUFL(buf,2)=npcid;
+ WBUFW(buf,14)=111;
+ WBUFPOS(buf,46,sd->bl.x,sd->bl.y,sd->ud.dir);
+ WBUFB(buf,49)=5;
+ WBUFB(buf,50)=5;
WFIFOSET(fd, packet_len(0x78));
return;
}