summaryrefslogtreecommitdiff
path: root/src/net/ea
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
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')
-rw-r--r--src/net/ea/beinghandler.cpp30
-rw-r--r--src/net/ea/npchandler.cpp2
-rw-r--r--src/net/ea/playerhandler.cpp4
3 files changed, 18 insertions, 18 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);
}
}
diff --git a/src/net/ea/npchandler.cpp b/src/net/ea/npchandler.cpp
index 40e9daf8..3ec3c1f8 100644
--- a/src/net/ea/npchandler.cpp
+++ b/src/net/ea/npchandler.cpp
@@ -126,7 +126,7 @@ void NpcHandler::handleMessage(Net::MessageIn &msg)
break;
}
- if (resetPlayer && player_node->mAction != Being::SIT)
+ if (resetPlayer && player_node->getCurrentAction() != Being::SIT)
player_node->setAction(Being::STAND);
}
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 3a0a2fe2..0965e85a 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -211,7 +211,7 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg)
}
player_node->setAction(Being::STAND);
- player_node->mFrame = 0;
+ player_node->setFrame(0);
player_node->setTileCoords(x, y);
logger->log("Adjust scrolling by %d:%d", (int) scrollOffsetX,
@@ -295,7 +295,7 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg)
case 0x0034: player_node->setAttributeBase(CRIT, value);
player_node->setAttributeEffective(CRIT, value); break;
- case 0x0035: player_node->mAttackSpeed = value; break;
+ case 0x0035: player_node->setAttackSpeed(value); break;
case 0x0037: player_node->setAttributeBase(JOB, value);
player_node->setAttributeEffective(JOB, value); break;
case 500: player_node->setGMLevel(value); break;