summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/charserverhandler.cpp3
-rw-r--r--src/net/tmwa/gamehandler.cpp4
-rw-r--r--src/net/tmwa/playerhandler.cpp6
3 files changed, 13 insertions, 0 deletions
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index 64626becb..c4571969e 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -315,6 +315,8 @@ void CharServerHandler::connect()
void CharServerHandler::processCharLogin(Net::MessageIn &msg)
{
+ BLOCK_START("CharServerHandler::processCharLogin")
+
msg.skip(2); // Length word
const int slots = msg.readInt16();
if (slots > 0 && slots < 30)
@@ -346,6 +348,7 @@ void CharServerHandler::processCharLogin(Net::MessageIn &msg)
}
Client::setState(STATE_CHAR_SELECT);
+ BLOCK_END("CharServerHandler::processCharLogin")
}
} // namespace TmwAthena
diff --git a/src/net/tmwa/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp
index c92a83654..62457d718 100644
--- a/src/net/tmwa/gamehandler.cpp
+++ b/src/net/tmwa/gamehandler.cpp
@@ -98,6 +98,7 @@ void GameHandler::connect()
if (!mNetwork)
return;
+ BLOCK_START("GameHandler::connect")
mNetwork->connect(mapServer);
const Token &token = static_cast<LoginHandler*>(
Net::getLoginHandler())->getToken();
@@ -133,6 +134,7 @@ void GameHandler::connect()
*/
// We get 4 useless bytes before the real answer comes in (what are these?)
mNetwork->skip(4);
+ BLOCK_END("GameHandler::connect")
}
bool GameHandler::isConnected() const
@@ -144,8 +146,10 @@ bool GameHandler::isConnected() const
void GameHandler::disconnect()
{
+ BLOCK_START("GameHandler::disconnect")
if (mNetwork)
mNetwork->disconnect();
+ BLOCK_END("GameHandler::disconnect")
}
void GameHandler::quit() const
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index b63be0a6d..645959fbc 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -222,6 +222,7 @@ void PlayerHandler::processOnlineList(Net::MessageIn &msg) const
if (!whoIsOnline)
return;
+ BLOCK_START("PlayerHandler::processOnlineList")
const int size = msg.readInt16() - 4;
std::vector<OnlinePlayer*> arr;
@@ -229,12 +230,16 @@ void PlayerHandler::processOnlineList(Net::MessageIn &msg) const
{
if (whoIsOnline)
whoIsOnline->loadList(arr);
+ BLOCK_END("PlayerHandler::processOnlineList")
return;
}
char *const start = reinterpret_cast<char*>(msg.readBytes(size));
if (!start)
+ {
+ BLOCK_END("PlayerHandler::processOnlineList")
return;
+ }
const char *buf = start;
@@ -278,6 +283,7 @@ void PlayerHandler::processOnlineList(Net::MessageIn &msg) const
if (whoIsOnline)
whoIsOnline->loadList(arr);
delete [] start;
+ BLOCK_END("PlayerHandler::processOnlineList")
}
void PlayerHandler::updateStatus(const uint8_t status) const