diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/charcreatedialog.cpp | 4 | ||||
-rw-r--r-- | src/gui/charselectdialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/customserverdialog.cpp | 10 | ||||
-rw-r--r-- | src/gui/ministatuswindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/popupmenu.cpp | 2 | ||||
-rw-r--r-- | src/gui/selldialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/serverdialog.cpp | 12 | ||||
-rw-r--r-- | src/gui/skilldialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/statuswindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/viewport.cpp | 6 |
10 files changed, 22 insertions, 22 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp index fd27c89c..0d8a928e 100644 --- a/src/gui/charcreatedialog.cpp +++ b/src/gui/charcreatedialog.cpp @@ -167,7 +167,7 @@ void CharCreateDialog::action(const gcn::ActionEvent &event) { if (event.getId() == "create") { - if (Net::getNetworkType() == ServerInfo::MANASERV + if (Net::getNetworkType() == ServerType::MANASERV || getName().length() >= 4) { // Attempt to create the character @@ -175,7 +175,7 @@ void CharCreateDialog::action(const gcn::ActionEvent &event) int characterSlot = mSlot; // On Manaserv, the slots start at 1, so we offset them. - if (Net::getNetworkType() == ServerInfo::MANASERV) + if (Net::getNetworkType() == ServerType::MANASERV) ++characterSlot; // Should avoid the most common crash case diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp index 4bd712f6..a0a14c65 100644 --- a/src/gui/charselectdialog.cpp +++ b/src/gui/charselectdialog.cpp @@ -277,7 +277,7 @@ void CharSelectDialog::setCharacters(const Net::Characters &characters) // Slots Number start at 1 for Manaserv, so we offset them by one. int characterSlot = character->slot; - if (Net::getNetworkType() == ServerInfo::MANASERV + if (Net::getNetworkType() == ServerType::MANASERV && characterSlot > 0) --characterSlot; diff --git a/src/gui/customserverdialog.cpp b/src/gui/customserverdialog.cpp index 455951ec..c4fadca9 100644 --- a/src/gui/customserverdialog.cpp +++ b/src/gui/customserverdialog.cpp @@ -128,7 +128,7 @@ CustomServerDialog::CustomServerDialog(ServerDialog *parent, int index): mServerAddressField->setText(serverInfo.hostname); mPortField->setText(toString(serverInfo.port)); #ifdef MANASERV_SUPPORT - mTypeField->setSelected(serverInfo.type == ServerInfo::TMWATHENA ? + mTypeField->setSelected(serverInfo.type == ServerType::TMWATHENA ? 0 : 1); #endif } @@ -180,16 +180,16 @@ void CustomServerDialog::action(const gcn::ActionEvent &event) switch (mTypeField->getSelected()) { case 0: - serverInfo.type = ServerInfo::TMWATHENA; + serverInfo.type = ServerType::TMWATHENA; break; case 1: - serverInfo.type = ServerInfo::MANASERV; + serverInfo.type = ServerType::MANASERV; break; default: - serverInfo.type = ServerInfo::UNKNOWN; + serverInfo.type = ServerType::UNKNOWN; } #else - serverInfo.type = ServerInfo::TMWATHENA; + serverInfo.type = ServerType::TMWATHENA; #endif if (mPortField->getText().empty()) serverInfo.port = ServerInfo::defaultPortForServerType(serverInfo.type); diff --git a/src/gui/ministatuswindow.cpp b/src/gui/ministatuswindow.cpp index 29718ed6..9988df48 100644 --- a/src/gui/ministatuswindow.cpp +++ b/src/gui/ministatuswindow.cpp @@ -143,7 +143,7 @@ void MiniStatusWindow::event(Event::Channel channel, } if (event.getType() == Event::UpdateStat) { - if (Net::getNetworkType() == ServerInfo::TMWATHENA && + if (Net::getNetworkType() == ServerType::TMWATHENA && event.getInt("id") == TmwAthena::MATK) { StatusWindow::updateMPBar(mMpBar); diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 048ecc78..dec3faf9 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -127,7 +127,7 @@ void PopupMenu::showPopup(int x, int y, Being *being) strprintf(_("Invite %s to join your guild"), name.c_str()).c_str())); if (local_player->isInParty() || - Net::getNetworkType() == ServerInfo::MANASERV) + Net::getNetworkType() == ServerType::MANASERV) { mBrowserBox->addRow(strprintf("@@party|%s@@", strprintf(_("Invite %s to join your party"), diff --git a/src/gui/selldialog.cpp b/src/gui/selldialog.cpp index 38730862..ef694f96 100644 --- a/src/gui/selldialog.cpp +++ b/src/gui/selldialog.cpp @@ -205,7 +205,7 @@ void SellDialog::action(const gcn::ActionEvent &event) sellCount = item->sellCurrentDuplicate(mAmountItems); // For Manaserv, the Item id is to be given as index. - if ((Net::getNetworkType() == ServerInfo::MANASERV)) + if ((Net::getNetworkType() == ServerType::MANASERV)) itemIndex = item->getId(); Net::getNpcHandler()->sellItem(mNpcId, itemIndex, sellCount); diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp index 0bff4c9e..bad2c2b5 100644 --- a/src/gui/serverdialog.cpp +++ b/src/gui/serverdialog.cpp @@ -55,13 +55,13 @@ static const int MAX_SERVERLIST = 6; -static std::string serverTypeToString(ServerInfo::Type type) +static std::string serverTypeToString(ServerType type) { switch (type) { - case ServerInfo::TMWATHENA: + case ServerType::TMWATHENA: return "TmwAthena"; - case ServerInfo::MANASERV: + case ServerType::MANASERV: return "ManaServ"; default: return std::string(); @@ -267,7 +267,7 @@ void ServerDialog::action(const gcn::ActionEvent &event) // Check login if (index < 0 #ifndef MANASERV_SUPPORT - || mServersListModel->getServer(index).type == ServerInfo::MANASERV + || mServersListModel->getServer(index).type == ServerType::MANASERV #endif ) { @@ -458,9 +458,9 @@ void ServerDialog::loadServers() server.type = ServerInfo::parseType(type); // Ignore unknown server types - if (server.type == ServerInfo::UNKNOWN + if (server.type == ServerType::UNKNOWN #ifndef MANASERV_SUPPORT - || server.type == ServerInfo::MANASERV + || server.type == ServerType::MANASERV #endif ) { diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp index 96a57e54..c43183a2 100644 --- a/src/gui/skilldialog.cpp +++ b/src/gui/skilldialog.cpp @@ -327,7 +327,7 @@ void SkillDialog::loadSkills() { logger->log("Error loading skills file: %s", SKILLS_FILE); - if (Net::getNetworkType() == ServerInfo::TMWATHENA) + if (Net::getNetworkType() == ServerType::TMWATHENA) { auto *model = new SkillModel(); auto *skill = new SkillInfo; diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp index ef6ca62e..ffcfa350 100644 --- a/src/gui/statuswindow.cpp +++ b/src/gui/statuswindow.cpp @@ -290,7 +290,7 @@ void StatusWindow::event(Event::Channel channel, it->second->update(); } - if (Net::getNetworkType() == ServerInfo::TMWATHENA && + if (Net::getNetworkType() == ServerType::TMWATHENA && id == TmwAthena::MATK) { updateMPBar(mMpBar, true); diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 8c174c8d..a31a65f6 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -323,11 +323,11 @@ void Viewport::_drawDebugPath(Graphics *graphics) unsigned char walkMask; switch (Net::getNetworkType()) { - case ServerInfo::TMWATHENA: + case ServerType::TMWATHENA: walkMask = Map::BLOCKMASK_WALL | Map::BLOCKMASK_CHARACTER; break; - case ServerInfo::MANASERV: - default: + case ServerType::MANASERV: + default: walkMask = Map::BLOCKMASK_WALL; break; } |