summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-05-14 23:37:52 +0300
committerAndrei Karas <akaras@inbox.ru>2019-05-14 23:37:52 +0300
commite651fb2b52d64c78ec9d5bd01ba449fa0a70afc9 (patch)
treeff698015355f8257ba1d5f52bf84f3d2b511362c
parent29566fffe9a65329a88b4dab08bf8a6ce25e215c (diff)
downloadplus-e651fb2b52d64c78ec9d5bd01ba449fa0a70afc9.tar.gz
plus-e651fb2b52d64c78ec9d5bd01ba449fa0a70afc9.tar.bz2
plus-e651fb2b52d64c78ec9d5bd01ba449fa0a70afc9.tar.xz
plus-e651fb2b52d64c78ec9d5bd01ba449fa0a70afc9.zip
Add item CMSG_REFINE_ITEM 0x0aa3
-rw-r--r--src/net/eathena/packetsout.inc7
-rw-r--r--src/net/eathena/refinehandler.cpp16
-rw-r--r--src/net/eathena/refinehandler.h4
-rw-r--r--src/net/refinehandler.h4
-rw-r--r--src/net/tmwa/refinehandler.cpp6
-rw-r--r--src/net/tmwa/refinehandler.h4
6 files changed, 41 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
diff --git a/src/net/refinehandler.h b/src/net/refinehandler.h
index 1b3498e22..8e966e477 100644
--- a/src/net/refinehandler.h
+++ b/src/net/refinehandler.h
@@ -40,6 +40,10 @@ class RefineHandler notfinal
{ }
virtual void addItem(const Item *const item) const = 0;
+
+ virtual void refineItem(const Item *const item1,
+ const Item *const item2,
+ int blessing) const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/refinehandler.cpp b/src/net/tmwa/refinehandler.cpp
index af0705303..2120dd0fd 100644
--- a/src/net/tmwa/refinehandler.cpp
+++ b/src/net/tmwa/refinehandler.cpp
@@ -40,4 +40,10 @@ void RefineHandler::addItem(const Item *const item A_UNUSED) const
{
}
+void RefineHandler::refineItem(const Item *const item1 A_UNUSED,
+ const Item *const item2 A_UNUSED,
+ int blessing A_UNUSED) const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/refinehandler.h b/src/net/tmwa/refinehandler.h
index d5ae231ab..aa8479037 100644
--- a/src/net/tmwa/refinehandler.h
+++ b/src/net/tmwa/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 TmwAthena