summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-06-14 23:28:55 +0300
committerAndrei Karas <akaras@inbox.ru>2018-06-14 23:28:55 +0300
commitf349460cedb54d3490e016a48036ced26cd8e998 (patch)
treee93d9bae4296dc021c93a620da9d8dc652fdd64f /src/net
parent7b7771f90573b462b16ccb467500f4d7d533b6a9 (diff)
downloadmv-f349460cedb54d3490e016a48036ced26cd8e998.tar.gz
mv-f349460cedb54d3490e016a48036ced26cd8e998.tar.bz2
mv-f349460cedb54d3490e016a48036ced26cd8e998.tar.xz
mv-f349460cedb54d3490e016a48036ced26cd8e998.zip
Add packet CMSG_PLAYER_SELECT_STYLE 0x0a46.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/packetsout.inc7
-rw-r--r--src/net/eathena/playerhandler.cpp18
-rw-r--r--src/net/eathena/playerhandler.h6
-rw-r--r--src/net/playerhandler.h6
-rw-r--r--src/net/tmwa/playerhandler.cpp9
-rw-r--r--src/net/tmwa/playerhandler.h7
6 files changed, 53 insertions, 0 deletions
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc
index 70e1e25f2..b622b0340 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -335,6 +335,7 @@ packet(CMSG_WINDOW_OPEN_REQUEST2, 0x0000, 0, nullptr);
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);
#else
// 20040713
if (packetVersion >= 20040713)
@@ -1328,6 +1329,12 @@ if (packetVersion >= 20151001)
packet(CMSG_CHAR_CREATE, 0x0a39, 36, chr->parse_char_create_new_char);
}
+// 20151104
+if (packetVersion >= 20151104)
+{
+ packet(CMSG_PLAYER_SELECT_STYLE, 0x0a46, 14, clif->pReqStyleChange);
+}
+
// 20160323
if (packetVersion >= 20160323)
{
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index c86eb5c28..e22ca822b 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -789,6 +789,24 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
}
}
+void PlayerHandler::selectStyle(const int headColor,
+ const int headStyle,
+ const int bodyColor,
+ const int topStyle,
+ const int middleStyle,
+ const int bottomStyle) const
+{
+ if (packetVersion < 20151104)
+ return;
+ createOutPacket(CMSG_PLAYER_SELECT_STYLE);
+ outMsg.writeInt16(headColor, "head color");
+ outMsg.writeInt16(headStyle, "head style");
+ outMsg.writeInt16(bodyColor, "body color");
+ outMsg.writeInt16(topStyle, "top style");
+ outMsg.writeInt16(middleStyle, "middle style");
+ outMsg.writeInt16(bottomStyle, "bottom style");
+}
+
#undef setStatComplex
} // namespace EAthena
diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h
index 6df0aa5f2..c98b7f885 100644
--- a/src/net/eathena/playerhandler.h
+++ b/src/net/eathena/playerhandler.h
@@ -69,6 +69,12 @@ class PlayerHandler final : public Ea::PlayerHandler
void requestPvpInfo() const override final;
void revive() const override final;
void setViewEquipment(const bool allow) const override final;
+ void selectStyle(const int headColor,
+ const int headStyle,
+ const int bodyColor,
+ const int topStyle,
+ const int middleStyle,
+ const int bottomStyle) const override final;
void setStat(Net::MessageIn &msg,
const int type,
diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h
index 88a13fa1f..58fa582ee 100644
--- a/src/net/playerhandler.h
+++ b/src/net/playerhandler.h
@@ -111,6 +111,12 @@ class PlayerHandler notfinal
const int64_t base,
const int mod,
const Notify notify) const = 0;
+ virtual void selectStyle(const int headColor,
+ const int headStyle,
+ const int bodyColor,
+ const int topStyle,
+ const int middleStyle,
+ const int bottomStyle) const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 0fd189f8e..71b2d55c6 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -494,4 +494,13 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
#undef setStatComplex
+void PlayerHandler::selectStyle(const int headColor A_UNUSED,
+ const int headStyle A_UNUSED,
+ const int bodyColor A_UNUSED,
+ const int topStyle A_UNUSED,
+ const int middleStyle A_UNUSED,
+ const int bottomStyle A_UNUSED) const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h
index fca26b2b8..b4bfabe02 100644
--- a/src/net/tmwa/playerhandler.h
+++ b/src/net/tmwa/playerhandler.h
@@ -80,6 +80,13 @@ class PlayerHandler final : public Ea::PlayerHandler
void setViewEquipment(const bool allow) const override final;
+ void selectStyle(const int headColor,
+ const int headStyle,
+ const int bodyColor,
+ const int topStyle,
+ const int middleStyle,
+ const int bottomStyle) const override final;
+
void setStat(Net::MessageIn &msg,
const int type,
const int64_t base,