summaryrefslogtreecommitdiff
path: root/src/net/tmwa/beinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-18 17:48:29 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-18 17:49:00 +0200
commitf98d003e354a1792117b7cbc771d1dd91475a156 (patch)
treedc2a297f7c4026394c9954ae4bfd4abd22ef9612 /src/net/tmwa/beinghandler.cpp
parentbb0a6cb25b2985fd1f74c9d27d5a46f6863e2dee (diff)
downloadplus-f98d003e354a1792117b7cbc771d1dd91475a156.tar.gz
plus-f98d003e354a1792117b7cbc771d1dd91475a156.tar.bz2
plus-f98d003e354a1792117b7cbc771d1dd91475a156.tar.xz
plus-f98d003e354a1792117b7cbc771d1dd91475a156.zip
Fix most old style cast except manaserv and libxml2 defines.
Diffstat (limited to 'src/net/tmwa/beinghandler.cpp')
-rw-r--r--src/net/tmwa/beinghandler.cpp13
1 files changed, 7 insertions, 6 deletions
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<Uint32>(
+ 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<Being::AttackType>(type));
}
if (srcBeing)
{
srcBeing->handleAttack(dstBeing, param1,
- (Being::AttackType)type);
+ static_cast<Being::AttackType>(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<Uint32>(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<Uint32>(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<Uint32>(msg.readInt16())) << 16;
msg.readInt8(); // Unused?
dstBeing->setStunMode(stunMode);