From 64a37da4cb8d74a29f369e96e8c3669275516394 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Tue, 6 Oct 2009 23:40:55 +0200 Subject: Some cleanup regarding keeping track of gender for eAthena LoginHandler now owns the world list and the token, instead of having them as global variables with pointers to the 'sex' member of the token from the GUI. --- src/net/ea/generalhandler.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/net/ea/generalhandler.cpp') diff --git a/src/net/ea/generalhandler.cpp b/src/net/ea/generalhandler.cpp index c3eab725..78a10423 100644 --- a/src/net/ea/generalhandler.cpp +++ b/src/net/ea/generalhandler.cpp @@ -29,7 +29,6 @@ #include "net/ea/network.h" #include "net/ea/protocol.h" -#include "net/ea/token.h" #include "net/ea/adminhandler.h" #include "net/ea/beinghandler.h" @@ -67,10 +66,8 @@ Net::GeneralHandler *generalHandler = NULL; namespace EAthena { -Token netToken; ServerInfo charServer; ServerInfo mapServer; -Worlds worlds; GeneralHandler::GeneralHandler(): mAdminHandler(new AdminHandler), @@ -106,8 +103,6 @@ GeneralHandler::GeneralHandler(): stats.push_back(ItemDB::Stat("luck", N_("Luck %+d"))); ItemDB::setStatsList(stats); - - RegisterDialog::setGender(&netToken.sex); } GeneralHandler::~GeneralHandler() @@ -179,7 +174,8 @@ void GeneralHandler::reload() { if (mNetwork) mNetwork->disconnect(); - worlds.clear(); + + static_cast(mLoginHandler.get())->clearWorlds(); } void GeneralHandler::unload() -- cgit v1.2.3-70-g09d2