diff options
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/packetsout.inc | 7 | ||||
-rw-r--r-- | src/net/eathena/refinehandler.cpp | 16 | ||||
-rw-r--r-- | src/net/eathena/refinehandler.h | 4 |
3 files changed, 27 insertions, 0 deletions
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc index d2d50a402..479e1687c 100644 --- a/src/net/eathena/packetsout.inc +++ b/src/net/eathena/packetsout.inc @@ -359,6 +359,7 @@ packet(CMSG_PLAYER_STYLE_CLOSE, 0x0000, 0, nullptr); packet(CMSG_MAP_PING2, 0x0000, 0, nullptr); packet(CMSG_ADMIN_RESET_COOLDOWNS, 0x0000, 0, nullptr); packet(CMSG_REFINE_ADD_ITEM, 0x0000, 0, nullptr); +packet(CMSG_REFINE_ITEM, 0x0000, 0, nullptr); #else // 20040713 if (packetVersion >= 20040713) @@ -1401,12 +1402,14 @@ if (packetVersion >= 20160525) if (packetVersionMain >= 20161005) { packet(CMSG_REFINE_ADD_ITEM, 0x0aa1, 4, clif->pAddItemRefineryUI); + packet(CMSG_REFINE_ITEM, 0x0aa3, 7, clif->pRefineryUIRefine); } // 20161005 re if (packetVersionRe >= 20161005) { packet(CMSG_REFINE_ADD_ITEM, 0x0aa1, 4, clif->pAddItemRefineryUI); + packet(CMSG_REFINE_ITEM, 0x0aa3, 7, clif->pRefineryUIRefine); } // 20170419 @@ -1421,6 +1424,7 @@ if (packets_zero >= true) { packet(CMSG_PRIVATE_AIRSHIP_REQUEST, 0x0a49, 20, clif->pPrivateAirshipRequest); packet(CMSG_REFINE_ADD_ITEM, 0x0aa1, 4, clif->pAddItemRefineryUI); + packet(CMSG_REFINE_ITEM, 0x0aa3, 7, clif->pRefineryUIRefine); } // 20171214 zero @@ -1503,6 +1507,7 @@ if (packetVersionRe >= 20180704) packet(CMSG_NPC_REPAIR, 0x01fd, 25, clif->pRepairItem); packet(CMSG_NPC_COOKING, 0x025b, 8, clif->pCooking); packet(CMSG_PRIVATE_AIRSHIP_REQUEST, 0x0a49, 22, clif->pPrivateAirshipRequest); + packet(CMSG_REFINE_ITEM, 0x0aa3, 9, clif->pRefineryUIRefine); } // 20180718 re @@ -1570,6 +1575,7 @@ if (packetVersionZero >= 20181114) packet(CMSG_INVENTORY_EXPAND_REJECT, 0x0b19, 2, clif->pInventoryExpansionReject); packet(CMSG_NPC_SELECT_ARROW, 0x01ae, 6, clif->pSelectArrow); packet(CMSG_PRIVATE_AIRSHIP_REQUEST, 0x0a49, 22, clif->pPrivateAirshipRequest); + packet(CMSG_REFINE_ITEM, 0x0aa3, 9, clif->pRefineryUIRefine); } // 20181121 main @@ -1577,6 +1583,7 @@ if (packetVersionMain >= 20181121) { packet(CMSG_NPC_SELECT_ARROW, 0x01ae, 6, clif->pSelectArrow); packet(CMSG_PRIVATE_AIRSHIP_REQUEST, 0x0a49, 22, clif->pPrivateAirshipRequest); + packet(CMSG_REFINE_ITEM, 0x0aa3, 9, clif->pRefineryUIRefine); } // 20181226 zero diff --git a/src/net/eathena/refinehandler.cpp b/src/net/eathena/refinehandler.cpp index c6b3e0d25..d602250a3 100644 --- a/src/net/eathena/refinehandler.cpp +++ b/src/net/eathena/refinehandler.cpp @@ -50,4 +50,20 @@ void RefineHandler::addItem(const Item *const item) const item->getInvIndex() + INVENTORY_OFFSET), "inv index"); } +void RefineHandler::refineItem(const Item *const item1, + const Item *const item2, + int blessing) const +{ + if (item1 == nullptr || + item2 == nullptr) + { + return; + } + createOutPacket(CMSG_REFINE_ITEM); + outMsg.writeInt16(CAST_S16( + item1->getInvIndex() + INVENTORY_OFFSET), "inv index"); + outMsg.writeItemId(item2->getId(), "item id"); + outMsg.writeInt8(blessing, "blessing"); +} + } // namespace EAthena diff --git a/src/net/eathena/refinehandler.h b/src/net/eathena/refinehandler.h index 0c02fae99..aefb8783c 100644 --- a/src/net/eathena/refinehandler.h +++ b/src/net/eathena/refinehandler.h @@ -35,6 +35,10 @@ class RefineHandler final : public Net::RefineHandler ~RefineHandler() override final; void addItem(const Item *const item) const override final; + + void refineItem(const Item *const item1, + const Item *const item2, + int blessing) const override final; }; } // namespace EAthena |