diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-09-25 23:05:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-09-25 23:05:23 +0300 |
commit | 3f5414baed89f0ca2d06a9f91d8f9993bb125a78 (patch) | |
tree | 444ce3b9368122b71ededf135edc33cedcddf66b | |
parent | f726b2f2e39711fc043a36518601d81b57294efd (diff) | |
download | manaplus-3f5414baed89f0ca2d06a9f91d8f9993bb125a78.tar.gz manaplus-3f5414baed89f0ca2d06a9f91d8f9993bb125a78.tar.bz2 manaplus-3f5414baed89f0ca2d06a9f91d8f9993bb125a78.tar.xz manaplus-3f5414baed89f0ca2d06a9f91d8f9993bb125a78.zip |
Add packet CMSG_PLAYER_SET_TITLE 0x0a2e.
-rw-r--r-- | src/net/eathena/packetsout.inc | 7 | ||||
-rw-r--r-- | src/net/eathena/playerhandler.cpp | 8 | ||||
-rw-r--r-- | src/net/eathena/playerhandler.h | 2 | ||||
-rw-r--r-- | src/net/playerhandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/playerhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/playerhandler.h | 2 |
6 files changed, 25 insertions, 0 deletions
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc index f2b54ddfd..9ece15a51 100644 --- a/src/net/eathena/packetsout.inc +++ b/src/net/eathena/packetsout.inc @@ -337,6 +337,7 @@ packet(CMSG_MAP_BLOCK_PLAY_CANCEL, 0x0000, 0, nullptr); packet(CMSG_PRIVATE_AIRSHIP_REQUEST, 0x0000, 0, nullptr); packet(CMSG_PLAYER_SELECT_STYLE, 0x0000, 0, nullptr); packet(CMSG_PET_EVOLUTION, 0x0000, 0, nullptr); +packet(CMSG_PLAYER_SET_TITLE, 0x0000, 0, nullptr); #else // 20040713 if (packetVersion >= 20040713) @@ -1324,6 +1325,12 @@ if (packetVersion >= 20140618) packet(CMSG_ROULETTE_RECV_ITEM, 0x0a21, 3, clif->pRouletteRecvItem); } +// 20140903 +if (packetVersion >= 20140903) +{ + packet(CMSG_PLAYER_SET_TITLE, 0x0a2e, 6, clif->pChangeTitle); +} + // 20141119 if (packetVersion >= 20141119) { diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index a70d130cf..e8cfe7374 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -812,6 +812,14 @@ void PlayerHandler::selectStyle(const int headColor, outMsg.writeInt16(CAST_S16(bodyStyle), "body style"); } +void PlayerHandler::setTitle(const int titleId) const +{ + if (packetVersion < 20140903) + return; + createOutPacket(CMSG_PLAYER_SET_TITLE); + outMsg.writeInt32(titleId, "title"); +} + #undef setStatComplex } // namespace EAthena diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h index 887f652f6..43c469f95 100644 --- a/src/net/eathena/playerhandler.h +++ b/src/net/eathena/playerhandler.h @@ -83,6 +83,8 @@ class PlayerHandler final : public Ea::PlayerHandler const int64_t base, const int mod, const Notify notify) const override final; + + void setTitle(const int titleId) const override final; }; } // namespace EAthena diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h index ae4c1f61f..58c4466b3 100644 --- a/src/net/playerhandler.h +++ b/src/net/playerhandler.h @@ -119,6 +119,8 @@ class PlayerHandler notfinal const int middleStyle, const int bottomStyle, const int bodyStyle) const = 0; + + virtual void setTitle(const int titleId) const = 0; }; } // namespace Net diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index 362269ab9..834b75e1d 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -505,4 +505,8 @@ void PlayerHandler::selectStyle(const int headColor A_UNUSED, { } +void PlayerHandler::setTitle(const int titleId A_UNUSED) const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h index 418843989..ca40660ec 100644 --- a/src/net/tmwa/playerhandler.h +++ b/src/net/tmwa/playerhandler.h @@ -94,6 +94,8 @@ class PlayerHandler final : public Ea::PlayerHandler const int64_t base, const int mod, const Notify notify) const override final; + + void setTitle(const int titleId) const override final; }; } // namespace TmwAthena |