From 206123cda79c8b77aafcd042c99f5ea1c38f084d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 6 Jan 2016 02:29:43 +0300 Subject: Impliment packet CMSG_SHORTCUTS_ROW_SHIFT 0x0a01. --- src/net/eathena/packetsout.inc | 1 + src/net/eathena/playerhandler.cpp | 9 +++++++++ src/net/eathena/playerhandler.h | 1 + src/net/playerhandler.h | 2 ++ src/net/tmwa/playerhandler.cpp | 4 ++++ src/net/tmwa/playerhandler.h | 2 ++ 6 files changed, 19 insertions(+) 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(level), "level"); } +void PlayerHandler::shortcutShiftRow(const int row) const +{ + if (serverVersion != 0 && serverVersion < 11) + return; + createOutPacket(CMSG_SHORTCUTS_ROW_SHIFT); + outMsg.writeInt8(static_cast(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; diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h index 1f57f2edf..2a0e2d391 100644 --- a/src/net/playerhandler.h +++ b/src/net/playerhandler.h @@ -84,6 +84,8 @@ class PlayerHandler notfinal const int id, const int level) const = 0; + virtual void shortcutShiftRow(const int row) const = 0; + virtual void removeOption() const = 0; virtual void changeCart(const int type) const = 0; diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index 6d8e11548..f0ea94947 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -189,6 +189,10 @@ void PlayerHandler::revive() const { } +void PlayerHandler::shortcutShiftRow(const int row A_UNUSED) const +{ +} + void PlayerHandler::setViewEquipment(const bool allow A_UNUSED) const { } diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h index 1f93a8e45..f9799a597 100644 --- a/src/net/tmwa/playerhandler.h +++ b/src/net/tmwa/playerhandler.h @@ -59,6 +59,8 @@ class PlayerHandler final : public Ea::PlayerHandler const int id, const int level) const override final A_CONST; + void shortcutShiftRow(const int row) const override final; + void removeOption() const override final A_CONST; void changeCart(const int type) const override final A_CONST; -- cgit v1.2.3-70-g09d2