From 390e5da0f9ecc4407aa7d4bcba1af5730db56271 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 29 May 2015 20:59:14 +0300 Subject: Convert AttackType enum into strong typed enum. --- src/net/eathena/beinghandler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/net/eathena/beinghandler.cpp') 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( + 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(type), 1); + static_cast(type), 1); } break; -- cgit v1.2.3-70-g09d2