diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-24 08:17:38 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-24 08:17:38 +0000 |
commit | 9739d595caaddc8a894b33579b12365e87634959 (patch) | |
tree | 9ca878afd8e0de3ccc8f3e4eb166d4055e5ce7eb /src | |
parent | 1ff686c92633e40c085747350210519bd6448d23 (diff) | |
download | hercules-9739d595caaddc8a894b33579b12365e87634959.tar.gz hercules-9739d595caaddc8a894b33579b12365e87634959.tar.bz2 hercules-9739d595caaddc8a894b33579b12365e87634959.tar.xz hercules-9739d595caaddc8a894b33579b12365e87634959.zip |
Added support for latest official client/server packet changes.
Enable by setting PACKETVER to 9. Note that this breaks older clients.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11792 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 32 | ||||
-rw-r--r-- | src/map/clif.h | 1 |
2 files changed, 32 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index eba49b152..8a485e755 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -831,8 +831,16 @@ static int clif_set_unit_standing(struct block_list* bl, unsigned char* buf) #endif #endif } else { +#if PACKETVER < 9 WBUFW(buf,0) = 0x78; return packet_len(0x78); +#else + // shift payload 1 byte to the right + memmove(WBUFP(buf,1), WBUFP(buf,0), packet_len(0x78)); + WBUFW(buf,0) = 0x78; + WBUFB(buf,2) = 0; // padding? + return packet_len(0x78); +#endif } } @@ -908,10 +916,18 @@ static int clif_set_unit_walking(struct block_list* bl, struct unit_data* ud, un memmove(WBUFP(buf,16), WBUFP(buf,14), 32); WBUFL(buf,12) = (sc)? sc->option : 0; +#if PACKETVER < 9 + WBUFW(buf,0) = 0x22c; + return packet_len(0x22c); +#else + // shift payload 1 byte to the right + memmove(WBUFP(buf,1), WBUFP(buf,0), packet_len(0x22c)); WBUFW(buf,0) = 0x22c; + WBUFB(buf,2) = 0; // padding? return packet_len(0x22c); #endif #endif +#endif } /*========================================== @@ -957,7 +973,15 @@ static int clif_set_unit_spawned(struct block_list* bl, unsigned char* buf) //39B: ??? //40B: ??? +#if PACKETVER < 9 + return packet_len(0x7c); +#else + // shift payload 1 byte to the right + memmove(WBUFP(buf,1), WBUFP(buf,0), packet_len(0x7c)); + WBUFW(buf,0) = 0x7c; + WBUFB(buf,2) = 0; // padding? return packet_len(0x7c); +#endif } } @@ -11653,8 +11677,10 @@ static int packetdb_readdb(void) 0, 0, 0, 0, 55, 17, 3, 37, 46, -1, 23, -1, 3,108, 3, 2, #if PACKETVER < 2 3, 28, 19, 11, 3, -1, 9, 5, 52, 51, 56, 58, 41, 2, 6, 6, -#else // 78-7b 亀島以降 lv99エフェクト用 +#elif PACKETVER < 9 // 78-7b 亀島以降 lv99エフェクト用 3, 28, 19, 11, 3, -1, 9, 5, 54, 53, 58, 60, 41, 2, 6, 6, +#else // change in 0x78 and 0x7c + 3, 28, 19, 11, 3, -1, 9, 5, 55, 53, 58, 60, 42, 2, 6, 6, #endif //#0x0080 7, 3, 2, 2, 2, 5, 16, 12, 10, 7, 29, 2, -1, -1, -1, 0, // 0x8b changed to 2 (was 23) @@ -11693,7 +11719,11 @@ static int packetdb_readdb(void) //#0x0200 26, -1, 26, 10, 18, 26, 11, 34, 14, 36, 10, 0, 0, -1, 32, 10, // 0x20c change to 0 (was 19) 22, 0, 26, 26, 42, 6, 6, 2, 2,282,282, 10, 10, -1, -1, 66, +#if PACKETVER < 9 10, -1, -1, 8, 10, 2,282, 18, 18, 15, 58, 57, 64, 5, 71, 5, +#else // 0x22c changed + 10, -1, -1, 8, 10, 2,282, 18, 18, 15, 58, 57, 65, 5, 71, 5, +#endif 12, 26, 9, 11, -1, -1, 10, 2, 282, 11, 4, 36, -1, -1, 4, 2, //#0x0240 -1, -1, -1, -1, -1, 3, 4, 8, -1, 3, 70, 4, 8, 12, 4, 10, diff --git a/src/map/clif.h b/src/map/clif.h index dedd2745e..ca26a9b67 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -28,6 +28,7 @@ struct guild; // server->client protocol version // v7 - 2005-04-11aSakexe+ - 0x229, 0x22a, 0x22b, 0x22c // v8 - 2007-05-21aSakexe+ - 0x283 +// v9 - 2007-11-06aSakexe+ - 0x78, 0x7c, 0x22c #ifndef PACKETVER #define PACKETVER 8 #endif |