summaryrefslogtreecommitdiff
path: root/src/net/ea/playerhandler.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-04-18 13:39:34 -0600
committerJared Adams <jaxad0127@gmail.com>2009-04-18 14:34:12 -0600
commitcdd6fa5fe9627780a281f420c1a3f5ba5248aa72 (patch)
treed3b0ea1f1edf37bae205fbcdc7e3a1ee5a06e08e /src/net/ea/playerhandler.cpp
parent1032dcdc6cb7084db493cb5f88bd5cade17e2fdf (diff)
downloadmana-client-cdd6fa5fe9627780a281f420c1a3f5ba5248aa72.tar.gz
mana-client-cdd6fa5fe9627780a281f420c1a3f5ba5248aa72.tar.bz2
mana-client-cdd6fa5fe9627780a281f420c1a3f5ba5248aa72.tar.xz
mana-client-cdd6fa5fe9627780a281f420c1a3f5ba5248aa72.zip
Make sure every eAthena packet has a #define
Diffstat (limited to 'src/net/ea/playerhandler.cpp')
-rw-r--r--src/net/ea/playerhandler.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 5d2a4829..c0c0fe20 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -435,14 +435,14 @@ void PlayerHandler::handleMessage(MessageIn &msg)
void PlayerHandler::attack(Being *being)
{
- MessageOut outMsg(0x0089);
+ MessageOut outMsg(CMSG_PLAYER_ATTACK);
outMsg.writeInt32(being->getId());
outMsg.writeInt8(0);
}
void PlayerHandler::emote(int emoteId)
{
- MessageOut outMsg(0x00bf);
+ MessageOut outMsg(CMSG_PLAYER_EMOTE);
outMsg.writeInt8(emoteId);
}
@@ -501,20 +501,28 @@ void PlayerHandler::setDestination(int x, int y, int direction)
{
char temp[4] = "";
set_coordinates(temp, x, y, direction);
- MessageOut outMsg(0x0085);
+ MessageOut outMsg(CMSG_PLAYER_CHANGE_DEST);
outMsg.writeString(temp, 3);
}
void PlayerHandler::changeAction(Being::Action action)
{
- MessageOut outMsg(0x0089);
+ char type;
+ switch (action)
+ {
+ case Being::SIT: type = 2; break;
+ case Being::STAND: type = 3; break;
+ default: return;
+ }
+
+ MessageOut outMsg(CMSG_PLAYER_CHANGE_ACT);
outMsg.writeInt32(0);
- outMsg.writeInt8((action == Being::SIT) ? 2 : 3);
+ outMsg.writeInt8(type);
}
void PlayerHandler::respawn()
{
- MessageOut outMsg(0x00b2);
+ MessageOut outMsg(CMSG_PLAYER_RESPAWN);
outMsg.writeInt8(0);
}