summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-13 23:38:20 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-13 23:38:20 +0300
commite61466ca3f2af0b3c7354d42c7f10d40ecea9d08 (patch)
treec9c3f6f10a057aaf4deab39e48000eeca4b928ae /src/net
parent9a11f30d150928e504406139691b42cce0922174 (diff)
downloadmv-e61466ca3f2af0b3c7354d42c7f10d40ecea9d08.tar.gz
mv-e61466ca3f2af0b3c7354d42c7f10d40ecea9d08.tar.bz2
mv-e61466ca3f2af0b3c7354d42c7f10d40ecea9d08.tar.xz
mv-e61466ca3f2af0b3c7354d42c7f10d40ecea9d08.zip
Impliment packet CMSG_SELECT_CART 0x0980.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/inventoryhandler.cpp8
-rw-r--r--src/net/eathena/inventoryhandler.h3
-rw-r--r--src/net/eathena/packetsout.inc3
-rw-r--r--src/net/inventoryhandler.h5
-rw-r--r--src/net/tmwa/inventoryhandler.cpp5
-rw-r--r--src/net/tmwa/inventoryhandler.h3
6 files changed, 27 insertions, 0 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 8220bd2e6..c27bf1c8c 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -213,4 +213,12 @@ int InventoryHandler::convertFromServerSlot(const int serverSlot) const
return static_cast<int>(EQUIP_CONVERT[serverSlot]);
}
+void InventoryHandler::selectCart(const BeingId accountId,
+ const int type) const
+{
+ createOutPacket(CMSG_SELECT_CART);
+ outMsg.writeBeingId(accountId, "account id");
+ outMsg.writeInt8(type, "type");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h
index d2d7f100f..5f7439133 100644
--- a/src/net/eathena/inventoryhandler.h
+++ b/src/net/eathena/inventoryhandler.h
@@ -66,6 +66,9 @@ class InventoryHandler final : public Ea::InventoryHandler
int convertFromServerSlot(const int serverSlot)
const override final A_WARN_UNUSED;
+ void selectCart(const BeingId accountId,
+ const int type) const override final;
+
int getProjectileSlot() const override final
{ return 23; }
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc
index 9e1efc065..a8fe50a14 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -274,3 +274,6 @@ if (packetVersion >= 20150513)
packet(CMSG_BUYINGSTORE_CLOSE, 0x022d);
}
#endif
+
+// introduced in 20150805
+packet(CMSG_SELECT_CART, 0x0980);
diff --git a/src/net/inventoryhandler.h b/src/net/inventoryhandler.h
index 2c18d4ead..b4786fb94 100644
--- a/src/net/inventoryhandler.h
+++ b/src/net/inventoryhandler.h
@@ -23,6 +23,8 @@
#ifndef NET_INVENTORYHANDLER_H
#define NET_INVENTORYHANDLER_H
+#include "enums/simpletypes/beingid.h"
+
#include "resources/inventory/inventory.h"
namespace Net
@@ -84,6 +86,9 @@ class InventoryHandler notfinal
virtual int getProjectileSlot() const = 0;
virtual int getItemIndex() const A_WARN_UNUSED = 0;
+
+ virtual void selectCart(const BeingId accountId,
+ const int type) const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index fff35eb48..efe307775 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -164,4 +164,9 @@ int InventoryHandler::convertFromServerSlot(const int serverSlot) const
return static_cast<int>(EQUIP_CONVERT[serverSlot]);
}
+void InventoryHandler::selectCart(const BeingId accountId A_UNUSED,
+ const int type A_UNUSED) const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h
index 14b86fdd1..3b42c5f4c 100644
--- a/src/net/tmwa/inventoryhandler.h
+++ b/src/net/tmwa/inventoryhandler.h
@@ -66,6 +66,9 @@ class InventoryHandler final : public Ea::InventoryHandler
int convertFromServerSlot(const int serverSlot)
const override final A_WARN_UNUSED;
+ void selectCart(const BeingId accountId,
+ const int type) const override final;
+
int getProjectileSlot() const override final
{ return 10; }