From f98d003e354a1792117b7cbc771d1dd91475a156 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 18 Mar 2011 17:48:29 +0200 Subject: Fix most old style cast except manaserv and libxml2 defines. --- src/net/tmwa/beinghandler.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/net/tmwa/beinghandler.cpp') diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index 74a620ce3..f066db0bd 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -179,7 +179,8 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) speed = msg.readInt16(); stunMode = msg.readInt16(); // opt1 statusEffects = msg.readInt16(); // opt2 - statusEffects |= ((Uint32)msg.readInt16()) << 16; // option + statusEffects |= (static_cast( + msg.readInt16())) << 16; // option job = msg.readInt16(); // class dstBeing = actorSpriteManager->findBeing(id); @@ -500,12 +501,12 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) if (dstBeing) { dstBeing->takeDamage(srcBeing, param1, - (Being::AttackType)type); + static_cast(type)); } if (srcBeing) { srcBeing->handleAttack(dstBeing, param1, - (Being::AttackType)type); + static_cast(type)); if (srcBeing->getType() == Being::PLAYER) srcBeing->setAttackTime(); } @@ -560,7 +561,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) if (!effectManager) return; - id = (Uint32)msg.readInt32(); + id = static_cast(msg.readInt32()); Being* being = actorSpriteManager->findBeing(id); if (!being) break; @@ -843,7 +844,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) speed = msg.readInt16(); stunMode = msg.readInt16(); // opt1; Aethyra use this as cape statusEffects = msg.readInt16(); // opt2; Aethyra use this as misc1 - statusEffects |= ((Uint32) msg.readInt16()) + statusEffects |= (static_cast(msg.readInt16())) << 16; // status.options; Aethyra uses this as misc2 job = msg.readInt16(); @@ -1100,7 +1101,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) stunMode = msg.readInt16(); statusEffects = msg.readInt16(); - statusEffects |= ((Uint32) msg.readInt16()) << 16; + statusEffects |= (static_cast(msg.readInt16())) << 16; msg.readInt8(); // Unused? dstBeing->setStunMode(stunMode); -- cgit v1.2.3-60-g2f50