summaryrefslogtreecommitdiff
path: root/src/net/tmwa/playerlisthandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa/playerlisthandler.cpp')
-rw-r--r--src/net/tmwa/playerlisthandler.cpp88
1 files changed, 0 insertions, 88 deletions
diff --git a/src/net/tmwa/playerlisthandler.cpp b/src/net/tmwa/playerlisthandler.cpp
deleted file mode 100644
index b15c28c6..00000000
--- a/src/net/tmwa/playerlisthandler.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * The Mana Client
- * Copyright (C) 2009-2024 The Mana Developers
- *
- * This file is part of The Mana Client.
- *
- * 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, see <http://www.gnu.org/licenses/>.
- */
-
-#include "net/tmwa/playerlisthandler.h"
-
-#include "net/tmwa/messagein.h"
-#include "net/tmwa/messageout.h"
-#include "net/tmwa/protocol.h"
-
-#include "gui/socialwindow.h"
-
-#include "utils/gettext.h"
-
-#include "avatar.h"
-#include "event.h"
-#include "log.h"
-
-extern Net::PlayerListHandler *playerListHandler;
-
-namespace TmwAthena {
-
-PlayerListHandler::PlayerListHandler()
-{
- static const uint16_t _messages[] = {
- SMSG_ONLINE_LIST,
- 0
- };
- handledMessages = _messages;
- playerListHandler = this;
-}
-
-PlayerListHandler::~PlayerListHandler()
-{
-}
-
-void PlayerListHandler::handleMessage(MessageIn &msg)
-{
- switch (msg.getId())
- {
- case SMSG_ONLINE_LIST:
- {
- int length = msg.readInt16();
- int count = (length - 4) / 31;
- std::vector<Avatar*> onlineUsers;
-
- SERVER_NOTICE(strprintf(_("%d players online."), count))
- for (int i = 0; i < count; i++)
- {
- int id = msg.readInt32();
- std::string nick = msg.readString(24);
- msg.readInt8(); // level
- msg.readInt8(); // gm level
- msg.readInt8(); // gender
-
- Avatar *avatar = new Avatar(nick);
- avatar->setOnline(true);
- onlineUsers.push_back(avatar);
- }
-
- socialWindow->setPlayersOnline(onlineUsers);
- }
- break;
- }
-}
-
-void PlayerListHandler::refreshList()
-{
- MessageOut outMsg(CMSG_ONLINE_LIST);
-}
-
-} // namespace TmwAthena \ No newline at end of file