summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-12-20 11:37:28 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-12-20 11:37:28 +0000
commit93853f8a479200c455106a5e2f8fdc2a5f827487 (patch)
tree024c5f3c698894d5a016970d72effee4216aae71 /src/map
parentfd94d382a036d0e489177df31830bb5dab8155d7 (diff)
downloadhercules-93853f8a479200c455106a5e2f8fdc2a5f827487.tar.gz
hercules-93853f8a479200c455106a5e2f8fdc2a5f827487.tar.bz2
hercules-93853f8a479200c455106a5e2f8fdc2a5f827487.tar.xz
hercules-93853f8a479200c455106a5e2f8fdc2a5f827487.zip
Quick-added support for the new whisper packet (bugreport:3942).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14208 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index fe04ada31..f9981d176 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -5009,15 +5009,26 @@ void clif_upgrademessage(int fd, int result, int item_id)
/*==========================================
* Wisp/page is transmitted to the destination player
* R 0097 <len>.w <nick>.24B <message>.?B
+ * R 0097 <len>.w <nick>.24B <???>.L <message>.?B
*------------------------------------------*/
int clif_wis_message(int fd, const char* nick, const char* mes, int mes_len)
{
+#if PACKETVER < 20091104
WFIFOHEAD(fd, mes_len + NAME_LENGTH + 4);
WFIFOW(fd,0) = 0x97;
WFIFOW(fd,2) = mes_len + NAME_LENGTH + 4;
safestrncpy((char*)WFIFOP(fd,4), nick, NAME_LENGTH);
safestrncpy((char*)WFIFOP(fd,28), mes, mes_len);
WFIFOSET(fd,WFIFOW(fd,2));
+#else
+ WFIFOHEAD(fd, mes_len + NAME_LENGTH + 8);
+ WFIFOW(fd,0) = 0x97;
+ WFIFOW(fd,2) = mes_len + NAME_LENGTH + 8;
+ safestrncpy((char*)WFIFOP(fd,4), nick, NAME_LENGTH);
+ WFIFOL(fd,28) = 0; // unknown; if nonzero, also displays text above char
+ safestrncpy((char*)WFIFOP(fd,32), mes, mes_len);
+ WFIFOSET(fd,WFIFOW(fd,2));
+#endif
return 0;
}