summaryrefslogtreecommitdiff
path: root/src/map/intif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/intif.c')
-rw-r--r--src/map/intif.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/map/intif.c b/src/map/intif.c
index 54d039347..20d686c11 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -36,7 +36,7 @@ static const int packet_len_table[]={
0, 0, 0, 0, 0, 0, 0, 0, -1,11, 0, 0, 0, 0, 0, 0, //0x3810
39,-1,15,15, 14,19, 7,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3820
10,-1,15, 0, 79,19, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830
- 9, 9,-1,14, 0, 0, 0, 0, -1,74,-1,11, 11,-1, 0, 0, //0x3840
+ -1, 9, 0,14, 0, 0, 0, 0, -1,74,-1,11, 11,-1, 0, 0, //0x3840
-1,-1, 7, 7, 7,11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3850 Auctions [Zephyrus]
-1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3860 Quests [Kevin] [Inkfish]
-1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3870 Mercenaries [Zephyrus]
@@ -720,17 +720,22 @@ int intif_guild_emblem(int guild_id,int len,const char *data)
WFIFOSET(inter_fd,len+12);
return 0;
}
-//現在のギルド城占領ギルドを調べる
-int intif_guild_castle_dataload(int castle_id,int index)
+
+/**
+ * Requests guild castles data from char-server.
+ * @param num Number of castles, size of castle_ids array.
+ * @param castle_ids Pointer to array of castle IDs.
+ */
+int intif_guild_castle_dataload(int num, int *castle_ids)
{
if (CheckForCharServer())
return 0;
- WFIFOHEAD(inter_fd,5);
- WFIFOW(inter_fd,0)=0x3040;
- WFIFOW(inter_fd,2)=castle_id;
- WFIFOB(inter_fd,4)=index;
- WFIFOSET(inter_fd,5);
- return 0;
+ WFIFOHEAD(inter_fd, 4 + num * sizeof(int));
+ WFIFOW(inter_fd, 0) = 0x3040;
+ WFIFOW(inter_fd, 2) = 4 + num * sizeof(int);
+ memcpy(WFIFOP(inter_fd, 4), castle_ids, num * sizeof(int));
+ WFIFOSET(inter_fd, WFIFOW(inter_fd, 2));
+ return 1;
}
//ギルド城占領ギルド変更要求
@@ -1072,7 +1077,6 @@ int intif_parse_GuildInfo(int fd)
guild_recv_noinfo(RFIFOL(fd,4));
return 0;
}
-
if( RFIFOW(fd,2)!=sizeof(struct guild)+4 )
ShowError("intif: guild info : data size error Gid: %d recv size: %d Expected size: %d\n",RFIFOL(fd,4),RFIFOW(fd,2),sizeof(struct guild)+4);
guild_recv_info((struct guild *)RFIFOP(fd,4));
@@ -1203,7 +1207,7 @@ int intif_parse_GuildMessage(int fd)
// ギルド城データ要求返信
int intif_parse_GuildCastleDataLoad(int fd)
{
- return guild_castledataloadack(RFIFOW(fd,2),RFIFOB(fd,4),RFIFOL(fd,5));
+ return guild_castledataloadack(RFIFOW(fd,2), (struct guild_castle *)RFIFOP(fd,4));
}
// ギルド城データ変更通知
int intif_parse_GuildCastleDataSave(int fd)
@@ -1211,12 +1215,6 @@ int intif_parse_GuildCastleDataSave(int fd)
return guild_castledatasaveack(RFIFOW(fd,2),RFIFOB(fd,4),RFIFOL(fd,5));
}
-// ギルド城データ一括受信(初期化時)
-int intif_parse_GuildCastleAllDataLoad(int fd)
-{
- return guild_castlealldataload(RFIFOW(fd,2),(struct guild_castle *)RFIFOP(fd,4));
-}
-
int intif_parse_GuildMasterChanged(int fd)
{
return guild_gm_changed(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
@@ -2040,7 +2038,6 @@ int intif_parse(int fd)
case 0x383f: intif_parse_GuildEmblem(fd); break;
case 0x3840: intif_parse_GuildCastleDataLoad(fd); break;
case 0x3841: intif_parse_GuildCastleDataSave(fd); break;
- case 0x3842: intif_parse_GuildCastleAllDataLoad(fd); break;
case 0x3843: intif_parse_GuildMasterChanged(fd); break;
//Quest system