summaryrefslogtreecommitdiff
path: root/src/net/eathena/beinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-29 20:59:14 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-29 20:59:14 +0300
commit390e5da0f9ecc4407aa7d4bcba1af5730db56271 (patch)
treeee0879cba3fec38740f1e51f2d1d35719ec3d8ae /src/net/eathena/beinghandler.cpp
parent9f1994182d4225f630a93ae06b01927c4f7a9a37 (diff)
downloadmanaplus-390e5da0f9ecc4407aa7d4bcba1af5730db56271.tar.gz
manaplus-390e5da0f9ecc4407aa7d4bcba1af5730db56271.tar.bz2
manaplus-390e5da0f9ecc4407aa7d4bcba1af5730db56271.tar.xz
manaplus-390e5da0f9ecc4407aa7d4bcba1af5730db56271.zip
Convert AttackType enum into strong typed enum.
Diffstat (limited to 'src/net/eathena/beinghandler.cpp')
-rw-r--r--src/net/eathena/beinghandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 99866bfbf..79354e34c 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -1280,7 +1280,8 @@ void BeingHandler::processBeingAction2(Net::MessageIn &msg)
msg.readInt32("dst speed");
const int param1 = msg.readInt32("damage");
msg.readInt16("count");
- const uint8_t type = msg.readUInt8("action");
+ const AttackTypeT type = static_cast<AttackTypeT>(
+ msg.readUInt8("action"));
msg.readInt32("left damage");
switch (type)
@@ -1307,7 +1308,7 @@ void BeingHandler::processBeingAction2(Net::MessageIn &msg)
{
// level not present, using 1
dstBeing->takeDamage(srcBeing, param1,
- static_cast<AttackType::Type>(type), 1);
+ static_cast<AttackTypeT>(type), 1);
}
break;