summaryrefslogtreecommitdiff
path: root/src/map/intif.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-23 19:08:54 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-23 19:08:54 +0000
commitac96c8dbde939dc367afe734f3452590e154475c (patch)
treead6b2ec838d199f6875ec331727b4a25249e0f9b /src/map/intif.c
parentc45d93d9d873996f99829dfc506c7875ea13d24c (diff)
downloadhercules-ac96c8dbde939dc367afe734f3452590e154475c.tar.gz
hercules-ac96c8dbde939dc367afe734f3452590e154475c.tar.bz2
hercules-ac96c8dbde939dc367afe734f3452590e154475c.tar.xz
hercules-ac96c8dbde939dc367afe734f3452590e154475c.zip
- Completed Mercenary Create, Delete, Save. Tests OK.
- Incremented MAX_SKILL required for a proper load of Mercenary Skills. - Some fixes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13118 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/intif.c')
-rw-r--r--src/map/intif.c47
1 files changed, 46 insertions, 1 deletions
diff --git a/src/map/intif.c b/src/map/intif.c
index 6a46c6d3c..8615317c8 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]
- -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3870 Mercenaries [Zephyrus]
+ -1, 3, 3, 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]
};
@@ -1909,6 +1909,49 @@ int intif_mercenary_request(int merc_id, int char_id)
return 0;
}
+int intif_mercenary_delete(int merc_id)
+{
+ if (CheckForCharServer())
+ return 0;
+
+ WFIFOHEAD(inter_fd,6);
+ WFIFOW(inter_fd,0) = 0x3072;
+ WFIFOL(inter_fd,2) = merc_id;
+ WFIFOSET(inter_fd,6);
+ return 0;
+}
+
+int intif_parse_mercenary_deleted(int fd)
+{
+ if( RFIFOB(fd,2) != 1 )
+ ShowError("Mercenary data delete failure\n");
+
+ return 0;
+}
+
+int intif_mercenary_save(struct s_mercenary *merc)
+{
+ int size = sizeof(struct s_mercenary) + 4;
+
+ if( CheckForCharServer() )
+ return 0;
+
+ WFIFOHEAD(inter_fd,size);
+ WFIFOW(inter_fd,0) = 0x3073;
+ 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_saved(int fd)
+{
+ if( RFIFOB(fd,2) != 1 )
+ ShowError("Mercenary data save failure\n");
+
+ return 0;
+}
+
//-----------------------------------------------------------------
// inter serverからの通信
// エラーがあれば0(false)を返すこと
@@ -1999,6 +2042,8 @@ int intif_parse(int fd)
#endif
// Mercenary System
case 0x3870: intif_parse_mercenary_received(fd); break;
+ case 0x3871: intif_parse_mercenary_deleted(fd); break;
+ case 0x3872: intif_parse_mercenary_saved(fd); break;
case 0x3880: intif_parse_CreatePet(fd); break;
case 0x3881: intif_parse_RecvPetData(fd); break;