summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-06 02:29:43 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-06 02:38:52 +0300
commit206123cda79c8b77aafcd042c99f5ea1c38f084d (patch)
tree8010f20d7813d5b2bacd5adc3f51def7d04f0310 /src/net/eathena
parentcc79a815a38dab8970e28a692b9a051627c8e56a (diff)
downloadmv-206123cda79c8b77aafcd042c99f5ea1c38f084d.tar.gz
mv-206123cda79c8b77aafcd042c99f5ea1c38f084d.tar.bz2
mv-206123cda79c8b77aafcd042c99f5ea1c38f084d.tar.xz
mv-206123cda79c8b77aafcd042c99f5ea1c38f084d.zip
Impliment packet CMSG_SHORTCUTS_ROW_SHIFT 0x0a01.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/packetsout.inc1
-rw-r--r--src/net/eathena/playerhandler.cpp9
-rw-r--r--src/net/eathena/playerhandler.h1
3 files changed, 11 insertions, 0 deletions
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc
index a14965f3e..40d4aa569 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -175,6 +175,7 @@ packet(CMSG_IGNORE_NICK, 0x00cf);
packet(CMSG_REQUEST_IGNORE_LIST, 0x00d3);
packet(CMSG_REQUEST_RANKS, 0x097c);
packet(CMSG_SET_SHORTCUTS, 0x02ba);
+packet(CMSG_SHORTCUTS_ROW_SHIFT, 0x0a01);
packet(CMSG_NPC_COMPLETE_PROGRESS_BAR, 0x02f1);
packet(CMSG_NPC_PRODUCE_MIX, 0x018e);
packet(CMSG_NPC_COOKING, 0x025b);
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 8c82cd93e..c319c6e8d 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -31,6 +31,7 @@
#include "debug.h"
extern Net::PlayerHandler *playerHandler;
+extern int serverVersion;
namespace EAthena
{
@@ -170,6 +171,14 @@ void PlayerHandler::setShortcut(const int idx,
outMsg.writeInt16(static_cast<int16_t>(level), "level");
}
+void PlayerHandler::shortcutShiftRow(const int row) const
+{
+ if (serverVersion != 0 && serverVersion < 11)
+ return;
+ createOutPacket(CMSG_SHORTCUTS_ROW_SHIFT);
+ outMsg.writeInt8(static_cast<int8_t>(row), "row");
+}
+
void PlayerHandler::removeOption() const
{
createOutPacket(CMSG_REMOVE_OPTION);
diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h
index e43ea256e..f8e29c36b 100644
--- a/src/net/eathena/playerhandler.h
+++ b/src/net/eathena/playerhandler.h
@@ -57,6 +57,7 @@ class PlayerHandler final : public Ea::PlayerHandler
const uint8_t type,
const int id,
const int level) const override final;
+ void shortcutShiftRow(const int row) const override final;
void removeOption() const override final;
void changeCart(const int type) const override final;
void setMemo() const override final;