summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/packetsout.inc19
-rw-r--r--src/net/eathena/playerhandler.cpp32
2 files changed, 43 insertions, 8 deletions
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc
index 9ece15a51..527c8511a 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -336,6 +336,7 @@ packet(CMSG_ATTENDANCE_REWARD, 0x0000, 0, nullptr);
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_PLAYER_SELECT_STYLE2, 0x0000, 0, nullptr);
packet(CMSG_PET_EVOLUTION, 0x0000, 0, nullptr);
packet(CMSG_PLAYER_SET_TITLE, 0x0000, 0, nullptr);
#else
@@ -1410,6 +1411,24 @@ if (packetVersionZero >= 20180411)
packet(CMSG_ATTENDANCE_REWARD, 0x0aef, 2, clif->pAttendanceRewardRequest);
}
+// 20180516 main
+if (packetVersionMain >= 20180516)
+{
+ packet(CMSG_PLAYER_SELECT_STYLE2, 0x0afc, 16, clif->pReqStyleChange2);
+}
+
+// 20180516 re
+if (packetVersionRe >= 20180516)
+{
+ packet(CMSG_PLAYER_SELECT_STYLE2, 0x0afc, 16, clif->pReqStyleChange2);
+}
+
+// 20180523 zero
+if (packetVersionZero >= 20180523)
+{
+ packet(CMSG_PLAYER_SELECT_STYLE2, 0x0afc, 16, clif->pReqStyleChange2);
+}
+
// 20180704 re
if (packetVersionRe >= 20180704)
{
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