summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-04-28 15:46:26 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-04-28 15:46:26 +0000
commit6a4e61e18f15172c80b60c46133862a36b576bb0 (patch)
tree4b755325699091a1405606cc290a399fc1d744dd /src/map/clif.c
parentf4538cb0aa956ec56ddcfef5dd47ec02114e3655 (diff)
downloadhercules-6a4e61e18f15172c80b60c46133862a36b576bb0.tar.gz
hercules-6a4e61e18f15172c80b60c46133862a36b576bb0.tar.bz2
hercules-6a4e61e18f15172c80b60c46133862a36b576bb0.tar.xz
hercules-6a4e61e18f15172c80b60c46133862a36b576bb0.zip
* 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
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c19
1 files changed, 14 insertions, 5 deletions
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;i<MAX_GUILDEXPULSION;i++){
struct guild_expulsion *e=&g->expulsion[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;
}