summaryrefslogtreecommitdiff
path: root/src/net/ea/beinghandler.cpp
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2010-01-27 01:46:58 +0100
committerBertram <bertram@cegetel.net>2010-01-27 01:46:58 +0100
commit572ed6a1aa6c847e8764bddf2bb0d687ecf1a405 (patch)
treef0183d944a3a887b359e2dc2895e87a9c2767e66 /src/net/ea/beinghandler.cpp
parent692aac3122843c59610684802e25b92cc9f0a33c (diff)
downloadmana-572ed6a1aa6c847e8764bddf2bb0d687ecf1a405.tar.gz
mana-572ed6a1aa6c847e8764bddf2bb0d687ecf1a405.tar.bz2
mana-572ed6a1aa6c847e8764bddf2bb0d687ecf1a405.tar.xz
mana-572ed6a1aa6c847e8764bddf2bb0d687ecf1a405.zip
Added mutators/accessors to being.h and smal cleanups.
Diffstat (limited to 'src/net/ea/beinghandler.cpp')
-rw-r--r--src/net/ea/beinghandler.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index 412b0930..797668a2 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -112,7 +112,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
Player *player;
int hairStyle, hairColor, flag;
std::string player_followed;
-
+
switch (msg.getId())
{
case SMSG_BEING_VISIBLE:
@@ -153,8 +153,8 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
if (msg.getId() == 0x0078)
{
dstBeing->clearPath();
- dstBeing->mFrame = 0;
- dstBeing->mWalkTime = tick_time;
+ dstBeing->setFrame(0);
+ dstBeing->setWalkTime(tick_time);
dstBeing->setAction(Being::STAND);
}
@@ -163,7 +163,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
if (speed == 0) { speed = 150; }
dstBeing->setWalkSpeed(speed);
- dstBeing->mJob = job;
+ dstBeing->setJob(job);
hairStyle = msg.readInt16();
weapon = msg.readInt16();
headBottom = msg.readInt16();
@@ -263,9 +263,9 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
if (!dstBeing)
break;
-
+
player_followed = player_node->getFollow();
-
+
if (!player_followed.empty())
{
if (dstBeing->getName() == player_followed)
@@ -349,7 +349,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
case 0x02: // Sit
if (srcBeing)
{
- srcBeing->mFrame = 0;
+ srcBeing->setFrame(0);
srcBeing->setAction(Being::SIT);
}
break;
@@ -357,7 +357,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
case 0x03: // Stand up
if (srcBeing)
{
- srcBeing->mFrame = 0;
+ srcBeing->setFrame(0);
srcBeing->setAction(Being::STAND);
}
break;
@@ -386,7 +386,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
if (player_relations.hasPermission(dstBeing, PlayerRelation::EMOTE))
{
// only set emote if one doesnt already exist
- if (!dstBeing->mEmotion)
+ if (!dstBeing->getEmotion())
dstBeing->setEmote(msg.readInt8(), EMOTION_TIME);
}
@@ -524,7 +524,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
}
dstBeing->setWalkSpeed(speed);
- dstBeing->mJob = job;
+ dstBeing->setJob(job);
hairStyle = msg.readInt16();
weapon = msg.readInt16();
shield = msg.readInt16();
@@ -567,7 +567,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
msg.readCoordinatePair(srcX, srcY, dstX, dstY);
dstBeing->setTileCoords(srcX, srcY);
dstBeing->setDestination(dstX, dstY);
-
+
player_followed = player_node->getFollow();
if (!player_followed.empty())
{
@@ -612,8 +612,8 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
msg.readInt8(); // Lv
msg.readInt8(); // unknown
- dstBeing->mWalkTime = tick_time;
- dstBeing->mFrame = 0;
+ dstBeing->setWalkTime(tick_time);
+ dstBeing->setFrame(0);
dstBeing->setStunMode(stunMode);
dstBeing->setStatusEffectBlock(0, (statusEffects >> 16) & 0xffff);
@@ -643,9 +643,9 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
x = msg.readInt16();
y = msg.readInt16();
dstBeing->setTileCoords(x, y);
- if (dstBeing->mAction == Being::WALK)
+ if (dstBeing->getCurrentAction() == Being::WALK)
{
- dstBeing->mFrame = 0;
+ dstBeing->setFrame(0);
dstBeing->setAction(Being::STAND);
}
}