From 72ceaaa426166bfa425f519c2418a66872839e12 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sat, 2 Mar 2024 17:26:44 +0100 Subject: Changed server type to "enum class" --- src/client.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index f90ca05a..98c8be30 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -384,12 +384,12 @@ Client::Client(const Options &options): loginData.remember = config.getBoolValue("remember"); loginData.registerLogin = false; - if (mCurrentServer.type == ServerInfo::UNKNOWN && mCurrentServer.port != 0) + if (mCurrentServer.type == ServerType::UNKNOWN && mCurrentServer.port != 0) { mCurrentServer.type = ServerInfo::defaultServerTypeForPort(mCurrentServer.port); } - if (mCurrentServer.type == ServerInfo::UNKNOWN) + if (mCurrentServer.type == ServerType::UNKNOWN) { mCurrentServer.type = ServerInfo::parseType( branding.getValue("defaultServerType", "tmwathena")); @@ -754,10 +754,10 @@ int Client::exec() switch (Net::getNetworkType()) { - case ServerInfo::TMWATHENA: + case ServerType::TMWATHENA: itemDb = new TmwAthena::TaItemDB; break; - case ServerInfo::MANASERV: + case ServerType::MANASERV: itemDb = new ManaServ::ManaServItemDB; break; default: @@ -815,7 +815,7 @@ int Client::exec() Net::getGameHandler()->connect(); mCurrentDialog = new ConnectionDialog( _("Connecting to the game server"), - Net::getNetworkType() == ServerInfo::TMWATHENA ? + Net::getNetworkType() == ServerType::TMWATHENA ? STATE_CHOOSE_SERVER : STATE_SWITCH_CHARACTER); break; -- cgit v1.2.3-70-g09d2