diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-17 00:49:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-17 00:49:45 +0300 |
commit | 1307b14ff24f3935fa58aef405ffb246c0741336 (patch) | |
tree | be0ebcda4a9b99a3b290fca9d8a210b18400b73a /src/gui/windows | |
parent | b10cb3ac1189eaa5f41184527eee342584231f84 (diff) | |
download | manaplus-1307b14ff24f3935fa58aef405ffb246c0741336.tar.gz manaplus-1307b14ff24f3935fa58aef405ffb246c0741336.tar.bz2 manaplus-1307b14ff24f3935fa58aef405ffb246c0741336.tar.xz manaplus-1307b14ff24f3935fa58aef405ffb246c0741336.zip |
Remove getter for charServerHandler.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/charcreatedialog.cpp | 8 | ||||
-rw-r--r-- | src/gui/windows/charselectdialog.cpp | 12 | ||||
-rw-r--r-- | src/gui/windows/logindialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/quitdialog.cpp | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index 7454eee73..1ee09a5d8 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -335,8 +335,8 @@ CharCreateDialog::~CharCreateDialog() { delete2(mPlayer); - if (Net::getCharServerHandler()) - Net::getCharServerHandler()->setCharCreateDialog(nullptr); + if (charServerHandler) + charServerHandler->setCharCreateDialog(nullptr); } void CharCreateDialog::action(const ActionEvent &event) @@ -358,7 +358,7 @@ void CharCreateDialog::action(const ActionEvent &event) const int characterSlot = mSlot; - Net::getCharServerHandler()->newCharacter(getName(), characterSlot, + charServerHandler->newCharacter(getName(), characterSlot, mFemale->isSelected(), mHairStyle, mHairColor, static_cast<unsigned char>(mRace), static_cast<unsigned char>(mLook), atts); @@ -620,7 +620,7 @@ void CharCreateDialog::updateHair() mHairColorNameLabel->setCaption(ColorDB::getHairColorName(mHairColor)); mHairColorNameLabel->resizeTo(150, 150); - mPlayer->setSprite(Net::getCharServerHandler()->hairSprite(), + mPlayer->setSprite(charServerHandler->hairSprite(), mHairStyle * -1, item.getDyeColorsString(mHairColor)); } diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp index 3c355c199..95b3d6cfc 100644 --- a/src/gui/windows/charselectdialog.cpp +++ b/src/gui/windows/charselectdialog.cpp @@ -83,7 +83,7 @@ CharSelectDialog::CharSelectDialog(LoginData *const data) : mDeleteButton(new Button(this, _("Delete"), "delete", this)), mCharacterView(nullptr), mCharacterEntries(0), - mCharServerHandler(Net::getCharServerHandler()), + mCharServerHandler(charServerHandler), mDeleteDialog(nullptr), mDeleteIndex(-1), mLocked(false), @@ -166,21 +166,21 @@ CharSelectDialog::CharSelectDialog(LoginData *const data) : addKeyListener(this); center(); - Net::getCharServerHandler()->setCharSelectDialog(this); + charServerHandler->setCharSelectDialog(this); mCharacterView->show(0); updateState(); } CharSelectDialog::~CharSelectDialog() { - Net::getCharServerHandler()->clear(); + charServerHandler->clear(); } void CharSelectDialog::postInit() { setVisible(true); requestFocus(); - if (Net::getCharServerHandler()->isNeedCreatePin()) + if (charServerHandler->isNeedCreatePin()) { EditDialog *const dialog = new EditDialog( _("Please set new pincode"), "", "OK"); @@ -261,7 +261,7 @@ void CharSelectDialog::action(const ActionEvent &event) } if (eventId == "switch") { - Net::getCharServerHandler()->clear(); + charServerHandler->clear(); close(); } else if (eventId == "change_password") @@ -274,7 +274,7 @@ void CharSelectDialog::action(const ActionEvent &event) } else if (eventId == "unregister") { - Net::getCharServerHandler()->clear(); + charServerHandler->clear(); client->setState(STATE_UNREGISTER); } else if (eventId == "try delete character") diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp index 510470ada..ffcbc8c69 100644 --- a/src/gui/windows/logindialog.cpp +++ b/src/gui/windows/logindialog.cpp @@ -97,7 +97,7 @@ LoginDialog::LoginDialog(LoginData *const data, setCloseButton(true); setWindowName("Login"); - Net::getCharServerHandler()->clear(); + charServerHandler->clear(); // TRANSLATORS: login dialog label Label *const serverLabel1 = new Label(this, _("Server:")); diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp index 9635cd98f..2f9cf51c5 100644 --- a/src/gui/windows/quitdialog.cpp +++ b/src/gui/windows/quitdialog.cpp @@ -193,7 +193,7 @@ void QuitDialog::action(const ActionEvent &event) { if (client->getState() == STATE_GAME) { - Net::getCharServerHandler()->switchCharacter(); + charServerHandler->switchCharacter(); DialogsManager::closeDialogs(); serverConfig.write(); } |