diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-07-14 13:51:46 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-07-14 13:51:46 -0600 |
commit | df52e6b900600709ab0069daacf06093c61667b1 (patch) | |
tree | 45992865781aeca25c3263475b201beb4c372d7f /src/net | |
parent | cc0878202c99c896f98918b219253eddcf9abf53 (diff) | |
download | mana-df52e6b900600709ab0069daacf06093c61667b1.tar.gz mana-df52e6b900600709ab0069daacf06093c61667b1.tar.bz2 mana-df52e6b900600709ab0069daacf06093c61667b1.tar.xz mana-df52e6b900600709ab0069daacf06093c61667b1.zip |
Merge and cleanup more stuff
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/playerhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/ea/playerhandler.h | 4 | ||||
-rw-r--r-- | src/net/playerhandler.h | 4 | ||||
-rw-r--r-- | src/net/tmwserv/gameserver/player.cpp | 14 | ||||
-rw-r--r-- | src/net/tmwserv/gameserver/player.h | 2 | ||||
-rw-r--r-- | src/net/tmwserv/playerhandler.cpp | 12 | ||||
-rw-r--r-- | src/net/tmwserv/playerhandler.h | 4 |
7 files changed, 16 insertions, 28 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index 9eecc445..9b4c56e2 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -431,7 +431,7 @@ void PlayerHandler::emote(int emoteId) outMsg.writeInt8(emoteId); } -void PlayerHandler::increaseStat(LocalPlayer::Attribute attr) +void PlayerHandler::increaseAttribute(size_t attr) { MessageOut outMsg(CMSG_STAT_UPDATE_REQUEST); @@ -464,7 +464,7 @@ void PlayerHandler::increaseStat(LocalPlayer::Attribute attr) outMsg.writeInt8(1); } -void PlayerHandler::decreaseStat(LocalPlayer::Attribute attr) +void PlayerHandler::decreaseAttribute(size_t attr) { // Supported by eA? } diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h index dcf53f6f..7312dacf 100644 --- a/src/net/ea/playerhandler.h +++ b/src/net/ea/playerhandler.h @@ -39,9 +39,9 @@ class PlayerHandler : public MessageHandler, public Net::PlayerHandler void emote(int emoteId); - void increaseStat(LocalPlayer::Attribute attr); + void increaseAttribute(size_t attr); - void decreaseStat(LocalPlayer::Attribute attr); + void decreaseAttribute(size_t attr); void increaseSkill(int skillId); diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h index 9a185d9c..910424b3 100644 --- a/src/net/playerhandler.h +++ b/src/net/playerhandler.h @@ -35,9 +35,9 @@ class PlayerHandler virtual void emote(int emoteId) = 0; - virtual void increaseStat(LocalPlayer::Attribute attr) = 0; + virtual void increaseAttribute(size_t attr) = 0; - virtual void decreaseStat(LocalPlayer::Attribute attr) = 0; + virtual void decreaseAttribute(size_t attr) = 0; virtual void increaseSkill(int skillId) = 0; diff --git a/src/net/tmwserv/gameserver/player.cpp b/src/net/tmwserv/gameserver/player.cpp index 7935b06d..4e63930b 100644 --- a/src/net/tmwserv/gameserver/player.cpp +++ b/src/net/tmwserv/gameserver/player.cpp @@ -50,20 +50,6 @@ void Net::GameServer::Player::moveItem(int oldSlot, int newSlot, int amount) Net::GameServer::connection->send(msg); } -void Net::GameServer::Player::raiseAttribute(int attribute) -{ - MessageOut msg(PGMSG_RAISE_ATTRIBUTE); - msg.writeInt8(attribute); - Net::GameServer::connection->send(msg); -} - -void Net::GameServer::Player::lowerAttribute(int attribute) -{ - MessageOut msg(PGMSG_LOWER_ATTRIBUTE); - msg.writeInt8(attribute); - Net::GameServer::connection->send(msg); -} - void Net::GameServer::Player::respawn() { MessageOut msg(PGMSG_RESPAWN); diff --git a/src/net/tmwserv/gameserver/player.h b/src/net/tmwserv/gameserver/player.h index 823dcb11..9a202c6e 100644 --- a/src/net/tmwserv/gameserver/player.h +++ b/src/net/tmwserv/gameserver/player.h @@ -42,8 +42,6 @@ namespace Net { void walk(int x, int y); void moveItem(int oldSlot, int newSlot, int amount); - void raiseAttribute(int attribute); - void lowerAttribute(int attribute); void respawn(); static RespawnRequestListener respawnListener; } diff --git a/src/net/tmwserv/playerhandler.cpp b/src/net/tmwserv/playerhandler.cpp index fe1b821c..413fbeaf 100644 --- a/src/net/tmwserv/playerhandler.cpp +++ b/src/net/tmwserv/playerhandler.cpp @@ -322,14 +322,18 @@ void PlayerHandler::emote(int emoteId) // TODO } -void PlayerHandler::increaseStat(LocalPlayer::Attribute attr) +void PlayerHandler::increaseAttribute(size_t attr) { - // TODO + MessageOut msg(PGMSG_RAISE_ATTRIBUTE); + msg.writeInt8(attr); + Net::GameServer::connection->send(msg); } -void PlayerHandler::decreaseStat(LocalPlayer::Attribute attr) +void PlayerHandler::decreaseAttribute(size_t attr) { - // TODO + MessageOut msg(PGMSG_LOWER_ATTRIBUTE); + msg.writeInt8(attr); + Net::GameServer::connection->send(msg); } void PlayerHandler::increaseSkill(int skillId) diff --git a/src/net/tmwserv/playerhandler.h b/src/net/tmwserv/playerhandler.h index 88844a55..1c94b4e4 100644 --- a/src/net/tmwserv/playerhandler.h +++ b/src/net/tmwserv/playerhandler.h @@ -38,9 +38,9 @@ class PlayerHandler : public MessageHandler, public Net::PlayerHandler void emote(int emoteId); - void increaseStat(LocalPlayer::Attribute attr); + void increaseAttribute(size_t attr); - void decreaseStat(LocalPlayer::Attribute attr); + void decreaseAttribute(size_t attr); void increaseSkill(int skillId); |