summaryrefslogtreecommitdiff
path: root/src/map/intif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-04-13 03:17:10 +0300
committerAndrei Karas <akaras@inbox.ru>2019-04-15 21:27:39 +0300
commit35d1c082365b061d147b23b534f54a3a84904f7b (patch)
tree27d5990ea537d932115e7e2c0ad17cab2eb7a60d /src/map/intif.c
parent563ddcf6da8b1c0b4bedb3417d8950e20b7c5a0d (diff)
downloadhercules-35d1c082365b061d147b23b534f54a3a84904f7b.tar.gz
hercules-35d1c082365b061d147b23b534f54a3a84904f7b.tar.bz2
hercules-35d1c082365b061d147b23b534f54a3a84904f7b.tar.xz
hercules-35d1c082365b061d147b23b534f54a3a84904f7b.zip
Improve get items from rodex
Diffstat (limited to 'src/map/intif.c')
-rw-r--r--src/map/intif.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/map/intif.c b/src/map/intif.c
index da85c96a2..e25f56b63 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -2873,6 +2873,22 @@ static void intif_parse_GetZenyAck(int fd)
rodex->getZenyAck(sd, mail_id, opentype, zeny);
}
+static void intif_parse_GetItemsAck(int fd)
+{
+ int char_id = RFIFOL(fd, 2);
+
+ struct map_session_data *sd = map->charid2sd(char_id);
+ if (sd == NULL) // User is not online anymore
+ return;
+
+ int64 mail_id = RFIFOQ(fd, 6);
+ uint8 opentype = RFIFOB(fd, 14);
+ int count = RFIFOB(fd, 15);
+ struct rodex_item items[RODEX_MAX_ITEM];
+ memcpy(&items[0], RFIFOP(fd, 16), sizeof(struct rodex_item) * RODEX_MAX_ITEM);
+ rodex->getItemsAck(sd, mail_id, opentype, count, &items[0]);
+}
+
//-----------------------------------------------------------------
// Communication from the inter server
// Return a 0 (false) if there were any errors.
@@ -2991,6 +3007,7 @@ static int intif_parse(int fd)
case 0x3897: intif->pRodexSendMail(fd); break;
case 0x3898: intif->pRodexCheckName(fd); break;
case 0x3899: intif->pGetZenyAck(fd); break;
+ case 0x389a: intif->pGetItemsAck(fd); break;
// Clan System
case 0x3858: intif->pRecvClanMemberAction(fd); break;
@@ -3020,7 +3037,7 @@ void intif_defaults(void)
-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, -1, 3, 3, 0, //0x3870 Mercenaries [Zephyrus] / Elemental [pakpil]
14,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3880
- -1,-1, 7, 3, 0,-1, 7, 15,18 + NAME_LENGTH, 23, 0, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator] / RoDEX [KirieZ]
+ -1,-1, 7, 3, 0,-1, 7, 15,18 + NAME_LENGTH, 23, 16 + sizeof(struct rodex_item) * RODEX_MAX_ITEM, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator] / RoDEX [KirieZ]
};
intif = &intif_s;
@@ -3191,6 +3208,7 @@ void intif_defaults(void)
intif->pRodexSendMail = intif_parse_RodexSendMail;
intif->pRodexCheckName = intif_parse_RodexCheckName;
intif->pGetZenyAck = intif_parse_GetZenyAck;
+ intif->pGetItemsAck = intif_parse_GetItemsAck;
/* Clan System */
intif->pRecvClanMemberAction = intif_parse_RecvClanMemberAction;
/* Achievement System */