summaryrefslogtreecommitdiff
path: root/src/map/intif.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-23 13:09:50 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-23 13:09:50 +0000
commit94281a398ef3a288a23cebb9f2d9a5227c570996 (patch)
treeb55207b5a40b9c019d150772ddbb1ffc6661f80c /src/map/intif.c
parent59b08db5fcebd6e3d94f5353602fc685dbf9e3f5 (diff)
downloadhercules-94281a398ef3a288a23cebb9f2d9a5227c570996.tar.gz
hercules-94281a398ef3a288a23cebb9f2d9a5227c570996.tar.bz2
hercules-94281a398ef3a288a23cebb9f2d9a5227c570996.tar.xz
hercules-94281a398ef3a288a23cebb9f2d9a5227c570996.zip
- Mercenary Packets (Server to Client). Still need a little more info.
- Packet for Mercenary Menu. - Some other progress as creation but need more code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13116 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/intif.c')
-rw-r--r--src/map/intif.c40
1 files changed, 39 insertions, 1 deletions
diff --git a/src/map/intif.c b/src/map/intif.c
index 896c30626..7288ec8f8 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -38,7 +38,7 @@ static const int packet_len_table[]={
9, 9,-1,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,11,11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3860 Quests [Kevin]
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3870 Mercenaries [Zephyrus]
11,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3880
-1,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator]
};
@@ -1864,6 +1864,41 @@ static void intif_parse_Auction_message(int fd)
#endif
+/*==========================================
+ * Mercenary's System
+ *------------------------------------------*/
+int intif_mercenary_create(struct s_mercenary *merc)
+{
+ int size = sizeof(struct s_mercenary) + 4;
+
+ if( CheckForCharServer() )
+ return 0;
+
+ WFIFOHEAD(inter_fd,size);
+ WFIFOW(inter_fd,0) = 0x3070;
+ WFIFOW(inter_fd,2) = size;
+ memcpy(WFIFOP(inter_fd,4), merc, sizeof(struct s_mercenary));
+ WFIFOSET(inter_fd,size);
+ return 0;
+}
+
+int intif_parse_mercenary_create(int fd)
+{
+ int len = RFIFOW(fd,2) - 5;
+ if( sizeof(struct s_mercenary) != len )
+ {
+ if( battle_config.etc_log )
+ ShowError("intif: create mercenary data size error %d != %d\n", sizeof(struct s_homunculus), len);
+ return 0;
+ }
+
+ merc_data_received((struct s_mercenary*)RFIFOP(fd,9), RFIFOB(fd,8));
+ return 0;
+}
+
+
+
+
//-----------------------------------------------------------------
// inter serverからの通信
// エラーがあれば0(false)を返すこと
@@ -1952,6 +1987,9 @@ int intif_parse(int fd)
case 0x3854: intif_parse_Auction_message(fd); break;
case 0x3855: intif_parse_Auction_bid(fd); break;
#endif
+// Mercenary System
+ case 0x3870: intif_parse_mercenary_create(fd); break;
+
case 0x3880: intif_parse_CreatePet(fd); break;
case 0x3881: intif_parse_RecvPetData(fd); break;
case 0x3882: intif_parse_SavePetOk(fd); break;