diff options
Diffstat (limited to 'src/net/manaserv/gameserver')
-rw-r--r-- | src/net/manaserv/gameserver/gameserver.cpp | 53 | ||||
-rw-r--r-- | src/net/manaserv/gameserver/gameserver.h | 39 | ||||
-rw-r--r-- | src/net/manaserv/gameserver/internal.cpp | 32 | ||||
-rw-r--r-- | src/net/manaserv/gameserver/internal.h | 35 | ||||
-rw-r--r-- | src/net/manaserv/gameserver/player.cpp | 61 | ||||
-rw-r--r-- | src/net/manaserv/gameserver/player.h | 51 |
6 files changed, 0 insertions, 271 deletions
diff --git a/src/net/manaserv/gameserver/gameserver.cpp b/src/net/manaserv/gameserver/gameserver.cpp deleted file mode 100644 index ba3bd983..00000000 --- a/src/net/manaserv/gameserver/gameserver.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * The Mana World - * Copyright (C) 2004 The Mana World Development Team - * - * This file is part of The Mana World. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "gameserver.h" - -#include "internal.h" - -#include "net/manaserv/connection.h" -#include "net/manaserv/messageout.h" -#include "net/manaserv/protocol.h" - -namespace ManaServ -{ - -void GameServer::connect(Connection *connection, const std::string &token) -{ - GameServer::connection = connection; - - MessageOut msg(PGMSG_CONNECT); - - msg.writeString(token, 32); - - GameServer::connection->send(msg); -} - -void GameServer::logout(bool reconnectAccount) -{ - MessageOut msg(PGMSG_DISCONNECT); - - msg.writeInt8((unsigned char) reconnectAccount); - - GameServer::connection->send(msg); -} - -} diff --git a/src/net/manaserv/gameserver/gameserver.h b/src/net/manaserv/gameserver/gameserver.h deleted file mode 100644 index 1f9e5b78..00000000 --- a/src/net/manaserv/gameserver/gameserver.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * The Mana World - * Copyright (C) 2004 The Mana World Development Team - * - * This file is part of The Mana World. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef NET_MANASERV_GAMESERVER_GAMESERVER_H -#define NET_MANASERV_GAMESERVER_GAMESERVER_H - -#include <iosfwd> - -namespace ManaServ -{ - class Connection; - - namespace GameServer - { - void connect(Connection *connection, const std::string &token); - - void logout(bool reconnectAccount); - } -} - -#endif // NET_MANASERV_GAMESERVER_GAMESERVER_H diff --git a/src/net/manaserv/gameserver/internal.cpp b/src/net/manaserv/gameserver/internal.cpp deleted file mode 100644 index e998ced9..00000000 --- a/src/net/manaserv/gameserver/internal.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - * The Mana World - * Copyright (C) 2004 The Mana World Development Team - * - * This file is part of The Mana World. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "internal.h" - -namespace ManaServ -{ - class Connection; - - namespace GameServer - { - Connection *connection = 0; - } -} diff --git a/src/net/manaserv/gameserver/internal.h b/src/net/manaserv/gameserver/internal.h deleted file mode 100644 index 44cd3be2..00000000 --- a/src/net/manaserv/gameserver/internal.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * The Mana World - * Copyright (C) 2004 The Mana World Development Team - * - * This file is part of The Mana World. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef NET_MANASERV_GAMESERVER_INTERNAL_H -#define NET_MANASERV_GAMESERVER_INTERNAL_H - -namespace ManaServ -{ - class Connection; - - namespace GameServer - { - extern Connection *connection; - } -} - -#endif // NET_MANASERV_GAMESERVER_INTERNAL_H diff --git a/src/net/manaserv/gameserver/player.cpp b/src/net/manaserv/gameserver/player.cpp deleted file mode 100644 index 6fa146d4..00000000 --- a/src/net/manaserv/gameserver/player.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - * The Mana World - * Copyright (C) 2004 The Mana World Development Team - * - * This file is part of The Mana World. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "player.h" - -#include "internal.h" - -#include "net/manaserv/connection.h" -#include "net/manaserv/messageout.h" -#include "net/manaserv/protocol.h" - -void RespawnRequestListener::action(const gcn::ActionEvent &event) -{ - ManaServ::GameServer::Player::respawn(); -} - -namespace ManaServ -{ - -void GameServer::Player::walk(int x, int y) -{ - MessageOut msg(PGMSG_WALK); - msg.writeInt16(x); - msg.writeInt16(y); - GameServer::connection->send(msg); -} - -void GameServer::Player::moveItem(int oldSlot, int newSlot, int amount) -{ - MessageOut msg(PGMSG_MOVE_ITEM); - msg.writeInt8(oldSlot); - msg.writeInt8(newSlot); - msg.writeInt8(amount); - GameServer::connection->send(msg); -} - -void GameServer::Player::respawn() -{ - MessageOut msg(PGMSG_RESPAWN); - GameServer::connection->send(msg); -} - -} diff --git a/src/net/manaserv/gameserver/player.h b/src/net/manaserv/gameserver/player.h deleted file mode 100644 index 40ba4b2b..00000000 --- a/src/net/manaserv/gameserver/player.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * The Mana World - * Copyright (C) 2004 The Mana World Development Team - * - * This file is part of The Mana World. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef NET_MANASERV_GAMESERVER_PLAYER_H -#define NET_MANASERV_GAMESERVER_PLAYER_H - -#include "being.h" - -#include <guichan/actionlistener.hpp> - -#include <iosfwd> - - -struct RespawnRequestListener : public gcn::ActionListener -{ - void action(const gcn::ActionEvent &event); -}; - -namespace ManaServ -{ - namespace GameServer - { - namespace Player - { - void walk(int x, int y); - void moveItem(int oldSlot, int newSlot, int amount); - void respawn(); - static RespawnRequestListener respawnListener; - } - } -} - -#endif // NET_MANASERV_GAMESERVER_PLAYER_H |