summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-09 00:41:19 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-09 00:41:19 +0300
commit3d1770d40bb11292d79bbdf0a6c9e628509632d5 (patch)
tree3e3bf62a1821fb67dc59fd29d35e7d462be54714 /src
parentdf01c98c8a7c0b45de0b67cf484994e5886fef4d (diff)
downloadmanaplus-3d1770d40bb11292d79bbdf0a6c9e628509632d5.tar.gz
manaplus-3d1770d40bb11292d79bbdf0a6c9e628509632d5.tar.bz2
manaplus-3d1770d40bb11292d79bbdf0a6c9e628509632d5.tar.xz
manaplus-3d1770d40bb11292d79bbdf0a6c9e628509632d5.zip
eathena: add packet CMSG_SET_SHORTCUTS 0x02ba.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/playerhandler.cpp12
-rw-r--r--src/net/eathena/playerhandler.h4
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/playerhandler.h5
-rw-r--r--src/net/tmwa/playerhandler.cpp7
-rw-r--r--src/net/tmwa/playerhandler.h5
6 files changed, 34 insertions, 0 deletions
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 35759bfd6..d6ae04585 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -234,6 +234,18 @@ void PlayerHandler::updateStatus(const uint8_t status) const
outMsg.writeInt8(0);
}
+void PlayerHandler::setShortcut(const int idx,
+ const uint8_t type,
+ const int id,
+ const int level) const
+{
+ MessageOut outMsg(CMSG_SET_SHORTCUTS);
+ outMsg.writeInt16(idx, "index");
+ outMsg.writeInt8(type, "type");
+ outMsg.writeInt32(id, "id");
+ outMsg.writeInt16(level, "level");
+}
+
void PlayerHandler::processPlayerShortcuts(Net::MessageIn &msg)
{
for (int f = 0; f < 27; f ++)
diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h
index cc6804164..38a6b3d25 100644
--- a/src/net/eathena/playerhandler.h
+++ b/src/net/eathena/playerhandler.h
@@ -59,6 +59,10 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler
void requestOnlineList() const override final;
void respawn() const override final;
+ void setShortcut(const int idx,
+ const uint8_t type,
+ const int id,
+ const int level) const override final;
protected:
void processPlayerStatUpdate5(Net::MessageIn &msg);
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index db7ed985e..27e6d250d 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -306,6 +306,7 @@
#define CMSG_SOLVE_CHAR_NAME 0x0368
#define CMSG_IGNORE_ALL 0x00d0
#define CMSG_REQUEST_RANKS 0x097c
+#define CMSG_SET_SHORTCUTS 0x02ba
#define SMSG_SOLVE_CHAR_NAME 0x0194
#define SMSG_SKILL_CASTING 0x07fb
diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h
index 83a0c4e8d..f230169fd 100644
--- a/src/net/playerhandler.h
+++ b/src/net/playerhandler.h
@@ -78,6 +78,11 @@ class PlayerHandler notfinal
virtual void requestOnlineList() const = 0;
virtual void updateStatus(const uint8_t status) const = 0;
+
+ virtual void setShortcut(const int idx,
+ const uint8_t type,
+ const int id,
+ const int level) const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 3e304e8da..cf95ed84f 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -430,4 +430,11 @@ void PlayerHandler::processWalkResponse(Net::MessageIn &msg)
BLOCK_END("PlayerHandler::processWalkResponse")
}
+void PlayerHandler::setShortcut(const int idx A_UNUSED,
+ const uint8_t type A_UNUSED,
+ const int id A_UNUSED,
+ const int level A_UNUSED) const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h
index a3e62ae10..7b4eed209 100644
--- a/src/net/tmwa/playerhandler.h
+++ b/src/net/tmwa/playerhandler.h
@@ -60,6 +60,11 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler
void respawn() const override final;
+ void setShortcut(const int idx,
+ const uint8_t type,
+ const int id,
+ const int level) const override final;
+
protected:
void processPlayerStatUpdate5(Net::MessageIn &msg);