summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-05-14 21:38:35 +0300
committerAndrei Karas <akaras@inbox.ru>2019-05-14 22:15:04 +0300
commit38f418870341b9f6c95a1b6cb16b6ad5c2d0a12f (patch)
tree5eccef77cc3e819daf4deb4de410800e1d7b4284 /src/net/eathena
parent5f82169b8d23d70760967da59709c86abc5ae949 (diff)
downloadManaVerse-38f418870341b9f6c95a1b6cb16b6ad5c2d0a12f.tar.gz
ManaVerse-38f418870341b9f6c95a1b6cb16b6ad5c2d0a12f.tar.bz2
ManaVerse-38f418870341b9f6c95a1b6cb16b6ad5c2d0a12f.tar.xz
ManaVerse-38f418870341b9f6c95a1b6cb16b6ad5c2d0a12f.zip
Add packet CMSG_REFINE_ADD_ITEM 0x0aa1
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/generalhandler.cpp4
-rw-r--r--src/net/eathena/generalhandler.h2
-rw-r--r--src/net/eathena/packetsout.inc15
-rw-r--r--src/net/eathena/refinehandler.cpp53
-rw-r--r--src/net/eathena/refinehandler.h42
5 files changed, 116 insertions, 0 deletions
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index acb53d8b6..d3729ef9f 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -64,6 +64,8 @@
#include "net/eathena/partyhandler.h"
#include "net/eathena/pethandler.h"
#include "net/eathena/playerhandler.h"
+#include "net/eathena/refinehandler.h"
+#include "net/eathena/refinehandler.h"
#include "net/eathena/roulettehandler.h"
#include "net/eathena/searchstorehandler.h"
#include "net/eathena/serverfeatures.h"
@@ -118,6 +120,7 @@ GeneralHandler::GeneralHandler() :
mMarketHandler(new MarketHandler),
mBarterHandler(new BarterHandler),
mVendingHandler(new VendingHandler),
+ mRefineHandler(new RefineHandler),
mRouletteHandler(new RouletteHandler),
mSearchStoreHandler(new SearchStoreHandler)
{
@@ -166,6 +169,7 @@ GeneralHandler::~GeneralHandler()
delete2(mMarketHandler)
delete2(mBarterHandler)
delete2(mVendingHandler)
+ delete2(mRefineHandler)
delete2(mRouletteHandler)
delete2(mSearchStoreHandler)
}
diff --git a/src/net/eathena/generalhandler.h b/src/net/eathena/generalhandler.h
index 509b01fcb..d50299ff4 100644
--- a/src/net/eathena/generalhandler.h
+++ b/src/net/eathena/generalhandler.h
@@ -64,6 +64,7 @@ class Mail2Handler;
class MapHandler;
class MarketHandler;
class MercenaryHandler;
+class RefineHandler;
class RouletteHandler;
class SearchStoreHandler;
class VendingHandler;
@@ -133,6 +134,7 @@ class GeneralHandler final : public Net::GeneralHandler
MarketHandler *mMarketHandler;
BarterHandler *mBarterHandler;
VendingHandler *mVendingHandler;
+ RefineHandler *mRefineHandler;
RouletteHandler *mRouletteHandler;
SearchStoreHandler *mSearchStoreHandler;
};
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc
index 7c1a19e3a..d2d50a402 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -358,6 +358,7 @@ packet(CMSG_CLIENT_VERSION, 0x0000, 0, nullptr);
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);
#else
// 20040713
if (packetVersion >= 20040713)
@@ -1396,6 +1397,18 @@ if (packetVersion >= 20160525)
packet(CMSG_CAMERA_INFO, 0x0a77, 15, clif->pCameraInfo);
}
+// 20161005 main
+if (packetVersionMain >= 20161005)
+{
+ packet(CMSG_REFINE_ADD_ITEM, 0x0aa1, 4, clif->pAddItemRefineryUI);
+}
+
+// 20161005 re
+if (packetVersionRe >= 20161005)
+{
+ packet(CMSG_REFINE_ADD_ITEM, 0x0aa1, 4, clif->pAddItemRefineryUI);
+}
+
// 20170419
if (packetVersion >= 20170419)
{
@@ -1403,9 +1416,11 @@ if (packetVersion >= 20170419)
packet(CMSG_MAIL2_REFRESH_MAIL_LIST, 0x0ac1, 26, clif->pRodexRefreshMaillist);
}
+// zero
if (packets_zero >= true)
{
packet(CMSG_PRIVATE_AIRSHIP_REQUEST, 0x0a49, 20, clif->pPrivateAirshipRequest);
+ packet(CMSG_REFINE_ADD_ITEM, 0x0aa1, 4, clif->pAddItemRefineryUI);
}
// 20171214 zero
diff --git a/src/net/eathena/refinehandler.cpp b/src/net/eathena/refinehandler.cpp
new file mode 100644
index 000000000..c6b3e0d25
--- /dev/null
+++ b/src/net/eathena/refinehandler.cpp
@@ -0,0 +1,53 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2019 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "net/eathena/refinehandler.h"
+
+#include "const/net/inventory.h"
+
+#include "net/eathena/messageout.h"
+#include "net/eathena/protocolout.h"
+
+#include "debug.h"
+
+namespace EAthena
+{
+
+RefineHandler::RefineHandler() :
+ Net::RefineHandler()
+{
+ refineHandler = this;
+}
+
+RefineHandler::~RefineHandler()
+{
+ refineHandler = nullptr;
+}
+
+void RefineHandler::addItem(const Item *const item) const
+{
+ if (item == nullptr)
+ return;
+ createOutPacket(CMSG_REFINE_ADD_ITEM);
+ outMsg.writeInt16(CAST_S16(
+ item->getInvIndex() + INVENTORY_OFFSET), "inv index");
+}
+
+} // namespace EAthena
diff --git a/src/net/eathena/refinehandler.h b/src/net/eathena/refinehandler.h
new file mode 100644
index 000000000..0c02fae99
--- /dev/null
+++ b/src/net/eathena/refinehandler.h
@@ -0,0 +1,42 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2019 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NET_EATHENA_REFINEHANDLER_H
+#define NET_EATHENA_REFINEHANDLER_H
+
+#include "net/refinehandler.h"
+
+namespace EAthena
+{
+class RefineHandler final : public Net::RefineHandler
+{
+ public:
+ RefineHandler();
+
+ A_DELETE_COPY(RefineHandler)
+
+ ~RefineHandler() override final;
+
+ void addItem(const Item *const item) const override final;
+};
+
+} // namespace EAthena
+
+#endif // NET_EATHENA_REFINEHANDLER_H