From 6a4e61e18f15172c80b60c46133862a36b576bb0 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Thu, 28 Apr 2011 15:46:26 +0000 Subject: * Updated packet 0x163 (ZC_BAN_LIST) to reflect change in packet layout introduced with 2010-08-03aRagexeRE (bugreport:4881, follow up to r14718). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14804 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index 6e34a70a4..7a2a00332 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7039,6 +7039,11 @@ int clif_guild_expulsion(struct map_session_data *sd,const char *name,const char *------------------------------------------*/ int clif_guild_expulsionlist(struct map_session_data *sd) { +#if PACKETVER < 20100803 + const int offset = NAME_LENGTH+64; +#else + const int offset = NAME_LENGTH+40; +#endif int fd; int i,c; struct guild *g; @@ -7048,18 +7053,22 @@ int clif_guild_expulsionlist(struct map_session_data *sd) return 0; fd = sd->fd; - WFIFOHEAD(fd,4 + MAX_GUILDEXPULSION * 88); + WFIFOHEAD(fd,4 + MAX_GUILDEXPULSION * offset); WFIFOW(fd,0)=0x163; for(i=c=0;iexpulsion[i]; if(e->account_id>0){ - safestrncpy((char*)WFIFOP(fd,4 + c*88),e->name,NAME_LENGTH); - safestrncpy((char*)WFIFOP(fd,4 + c*88+24),"",24); // account name (not used for security reasons) - safestrncpy((char*)WFIFOP(fd,4 + c*88+48),e->mes,40); + safestrncpy((char*)WFIFOP(fd,4 + c*offset),e->name,NAME_LENGTH); +#if PACKETVER < 20100803 + safestrncpy((char*)WFIFOP(fd,4 + c*offset+24),"",24); // account name (not used for security reasons) + safestrncpy((char*)WFIFOP(fd,4 + c*offset+48),e->mes,40); +#else + safestrncpy((char*)WFIFOP(fd,4 + c*offset+24),e->mes,40); +#endif c++; } } - WFIFOW(fd,2) = 4 + c*88; + WFIFOW(fd,2) = 4 + c*offset; WFIFOSET(fd,WFIFOW(fd,2)); return 0; } -- cgit v1.2.3-70-g09d2