summaryrefslogtreecommitdiff
path: root/src/net/net.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-10-03 12:40:52 -0600
committerJared Adams <jaxad0127@gmail.com>2009-10-03 16:47:11 -0600
commit0269b1f766a4e9e8ded91505855cff58c18086e2 (patch)
treec557c4c189bb536ab5ef7b8642011fe4f1da4eff /src/net/net.cpp
parenteb22b66b0821e49ed550d30d20d9db5af535e6a3 (diff)
downloadmana-0269b1f766a4e9e8ded91505855cff58c18086e2.tar.gz
mana-0269b1f766a4e9e8ded91505855cff58c18086e2.tar.bz2
mana-0269b1f766a4e9e8ded91505855cff58c18086e2.tar.xz
mana-0269b1f766a4e9e8ded91505855cff58c18086e2.zip
Do some more post-merge cleanup
Fixes a few more bugs
Diffstat (limited to 'src/net/net.cpp')
-rw-r--r--src/net/net.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/net/net.cpp b/src/net/net.cpp
index 6a9c072a..bce0844c 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -122,19 +122,34 @@ Net::TradeHandler *Net::getTradeHandler()
return tradeHandler;
}
+namespace Net
+{
+ bool networkLoaded = false;
+}
+
void Net::connectToServer(const ServerInfo &server)
{
// TODO: Actually query the server about itself and choose the netcode
// based on that
+ if (networkLoaded)
+ {
+ printf("Reload!\n");
+ Net::getGeneralHandler()->reload();
+ }
+ else
+ {
#ifdef TMWSERV_SUPPORT
- new TmwServ::GeneralHandler;
+ new TmwServ::GeneralHandler;
#else
- new EAthena::GeneralHandler;
+ new EAthena::GeneralHandler;
#endif
+ }
Net::getGeneralHandler()->load();
+ networkLoaded = true;
+
Net::getLoginHandler()->setServer(server);
Net::getLoginHandler()->connect();