summaryrefslogtreecommitdiff
path: root/src/net/tmwserv
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-07-14 10:14:35 -0600
committerJared Adams <jaxad0127@gmail.com>2009-07-14 10:33:44 -0600
commitcc0878202c99c896f98918b219253eddcf9abf53 (patch)
treeadced066461c9f987d3e05dba50617f4e8ee3395 /src/net/tmwserv
parent6d3e53146ba15e4d90670db3067fa7f1a67034e1 (diff)
downloadmana-cc0878202c99c896f98918b219253eddcf9abf53.tar.gz
mana-cc0878202c99c896f98918b219253eddcf9abf53.tar.bz2
mana-cc0878202c99c896f98918b219253eddcf9abf53.tar.xz
mana-cc0878202c99c896f98918b219253eddcf9abf53.zip
Add netcode for specials
Diffstat (limited to 'src/net/tmwserv')
-rw-r--r--src/net/tmwserv/gameserver/player.cpp7
-rw-r--r--src/net/tmwserv/gameserver/player.h1
-rw-r--r--src/net/tmwserv/specialhandler.cpp11
3 files changed, 10 insertions, 9 deletions
diff --git a/src/net/tmwserv/gameserver/player.cpp b/src/net/tmwserv/gameserver/player.cpp
index 10ffdcda..7935b06d 100644
--- a/src/net/tmwserv/gameserver/player.cpp
+++ b/src/net/tmwserv/gameserver/player.cpp
@@ -50,13 +50,6 @@ void Net::GameServer::Player::moveItem(int oldSlot, int newSlot, int amount)
Net::GameServer::connection->send(msg);
}
-void Net::GameServer::Player::useSpecial(int special)
-{
- MessageOut msg(PGMSG_USE_SPECIAL);
- msg.writeInt8(special);
- Net::GameServer::connection->send(msg);
-}
-
void Net::GameServer::Player::raiseAttribute(int attribute)
{
MessageOut msg(PGMSG_RAISE_ATTRIBUTE);
diff --git a/src/net/tmwserv/gameserver/player.h b/src/net/tmwserv/gameserver/player.h
index b6a51ef0..823dcb11 100644
--- a/src/net/tmwserv/gameserver/player.h
+++ b/src/net/tmwserv/gameserver/player.h
@@ -42,7 +42,6 @@ namespace Net
{
void walk(int x, int y);
void moveItem(int oldSlot, int newSlot, int amount);
- void useSpecial(int special);
void raiseAttribute(int attribute);
void lowerAttribute(int attribute);
void respawn();
diff --git a/src/net/tmwserv/specialhandler.cpp b/src/net/tmwserv/specialhandler.cpp
index 5be8272a..f259e77a 100644
--- a/src/net/tmwserv/specialhandler.cpp
+++ b/src/net/tmwserv/specialhandler.cpp
@@ -21,6 +21,13 @@
#include "net/tmwserv/specialhandler.h"
+#include "net/tmwserv/gameserver/internal.h"
+
+#include "net/tmwserv/connection.h"
+#include "net/tmwserv/protocol.h"
+
+#include "net/messageout.h"
+
Net::SpecialHandler *specialHandler;
namespace TmwServ {
@@ -32,7 +39,9 @@ SpecialHandler::SpecialHandler()
void SpecialHandler::use(int id)
{
- // TODO
+ MessageOut msg(PGMSG_USE_SPECIAL);
+ msg.writeInt8(id);
+ Net::GameServer::connection->send(msg);
}
void SpecialHandler::use(int id, int level, int beingId)