summaryrefslogtreecommitdiff
path: root/src/net/eathena/playerhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-09-26 00:25:43 +0300
committerAndrei Karas <akaras@inbox.ru>2018-09-26 00:25:43 +0300
commitffd17ba339d1d7b65481c736839978380093e70c (patch)
treeff387b440729b9c1b5d5aa9d385545a70df6a529 /src/net/eathena/playerhandler.cpp
parentb859885c6fcfa1828cd966162d6081638e151280 (diff)
downloadplus-ffd17ba339d1d7b65481c736839978380093e70c.tar.gz
plus-ffd17ba339d1d7b65481c736839978380093e70c.tar.bz2
plus-ffd17ba339d1d7b65481c736839978380093e70c.tar.xz
plus-ffd17ba339d1d7b65481c736839978380093e70c.zip
Add packet CMSG_PLAYER_SELECT_STYLE2 0x0afc.
Diffstat (limited to 'src/net/eathena/playerhandler.cpp')
-rw-r--r--src/net/eathena/playerhandler.cpp32
1 files changed, 24 insertions, 8 deletions
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index e8cfe7374..04fd7b772 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -46,7 +46,9 @@
#include "debug.h"
extern int packetVersion;
+extern int packetVersionMain;
extern int packetVersionRe;
+extern int packetVersionZero;
extern int serverVersion;
namespace EAthena
@@ -801,15 +803,29 @@ void PlayerHandler::selectStyle(const int headColor,
{
if (packetVersion < 20151104)
return;
- createOutPacket(CMSG_PLAYER_SELECT_STYLE);
- outMsg.writeInt16(CAST_S16(headColor), "head color");
- outMsg.writeInt16(CAST_S16(headStyle), "head style");
- outMsg.writeInt16(CAST_S16(bodyColor), "body color");
- outMsg.writeInt16(CAST_S16(topStyle), "top style");
- outMsg.writeInt16(CAST_S16(middleStyle), "middle style");
- outMsg.writeInt16(CAST_S16(bottomStyle), "bottom style");
- if (packetVersionRe >= 20180718)
+ if (packetVersionMain >= 20180516 ||
+ packetVersionRe >= 20180516 ||
+ packetVersionZero >= 20180523)
+ {
+ createOutPacket(CMSG_PLAYER_SELECT_STYLE2);
+ outMsg.writeInt16(CAST_S16(headColor), "head color");
+ outMsg.writeInt16(CAST_S16(headStyle), "head style");
+ outMsg.writeInt16(CAST_S16(bodyColor), "body color");
+ outMsg.writeInt16(CAST_S16(topStyle), "top style");
+ outMsg.writeInt16(CAST_S16(middleStyle), "middle style");
+ outMsg.writeInt16(CAST_S16(bottomStyle), "bottom style");
outMsg.writeInt16(CAST_S16(bodyStyle), "body style");
+ }
+ else
+ {
+ createOutPacket(CMSG_PLAYER_SELECT_STYLE);
+ outMsg.writeInt16(CAST_S16(headColor), "head color");
+ outMsg.writeInt16(CAST_S16(headStyle), "head style");
+ outMsg.writeInt16(CAST_S16(bodyColor), "body color");
+ outMsg.writeInt16(CAST_S16(topStyle), "top style");
+ outMsg.writeInt16(CAST_S16(middleStyle), "middle style");
+ outMsg.writeInt16(CAST_S16(bottomStyle), "bottom style");
+ }
}
void PlayerHandler::setTitle(const int titleId) const