diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-09-21 01:06:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-09-21 01:06:13 +0300 |
commit | 529d5ac21229ba7678bba9832f69448898b159b9 (patch) | |
tree | 0481fb34b969e423681a520617fd02d7a4c5b8d5 | |
parent | b10b9bbf68702e7c2b728d4036391399ae397eaa (diff) | |
download | mv-529d5ac21229ba7678bba9832f69448898b159b9.tar.gz mv-529d5ac21229ba7678bba9832f69448898b159b9.tar.bz2 mv-529d5ac21229ba7678bba9832f69448898b159b9.tar.xz mv-529d5ac21229ba7678bba9832f69448898b159b9.zip |
Fix code style.
-rw-r--r-- | src/being/playerrelations.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/shopwindow.cpp | 8 | ||||
-rw-r--r-- | src/net/eathena/guildhandler.cpp | 2 | ||||
-rw-r--r-- | src/spellmanager.cpp | 14 |
4 files changed, 13 insertions, 13 deletions
diff --git a/src/being/playerrelations.cpp b/src/being/playerrelations.cpp index ce79c25c5..4896776ab 100644 --- a/src/being/playerrelations.cpp +++ b/src/being/playerrelations.cpp @@ -183,7 +183,7 @@ int PlayerRelationsManager::getPlayerIgnoreStrategyIndex( void PlayerRelationsManager::load() { - Configuration *cfg = &serverConfig; + Configuration *const cfg = &serverConfig; clear(); mPersistIgnores = cfg->getValue(PERSIST_IGNORE_LIST, 1); diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp index 684f51a19..1b9d0a94a 100644 --- a/src/gui/windows/shopwindow.cpp +++ b/src/gui/windows/shopwindow.cpp @@ -819,6 +819,10 @@ void ShopWindow::sendMessage(const std::string &nick, void ShopWindow::showList(const std::string &nick, std::string data) { + const Inventory *const inv = PlayerInfo::getInventory(); + if (!inv) + return; + BuyDialog *buyDialog = nullptr; SellDialog *sellDialog = nullptr; if (data.find("B1") == 0) @@ -836,10 +840,6 @@ void ShopWindow::showList(const std::string &nick, std::string data) return; } - const Inventory *const inv = PlayerInfo::getInventory(); - if (!inv) - return; - if (buyDialog) buyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY)); if (sellDialog) diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp index 56a661da1..dc79ed198 100644 --- a/src/net/eathena/guildhandler.cpp +++ b/src/net/eathena/guildhandler.cpp @@ -90,7 +90,7 @@ void GuildHandler::invite(const std::string &name) const else if (packetVersion >= 20120418) { createOutPacket(CMSG_GUILD_INVITE2); - outMsg.writeString(being->getName(), 24, "name"); + outMsg.writeString(name, 24, "name"); } } diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp index 2020dae11..35ccbf651 100644 --- a/src/spellmanager.cpp +++ b/src/spellmanager.cpp @@ -265,15 +265,15 @@ void SpellManager::load() return; } - unsigned int targetType; - unsigned int basicLvl; - unsigned int school; - unsigned int schoolLvl; - unsigned int mana; - unsigned int commandType; - for (unsigned i = 0; i < SPELL_SHORTCUT_ITEMS * SPELL_SHORTCUT_TABS; i++) { + unsigned int targetType; + unsigned int basicLvl; + unsigned int school; + unsigned int schoolLvl; + unsigned int mana; + unsigned int commandType; + std::string flags = cfg->getValue("commandShortcutFlags" + toString(i), ""); std::stringstream ss(flags); |