diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-24 22:03:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-25 10:45:54 +0300 |
commit | 67f8b40f80368dad17a9da50c78923433e266f54 (patch) | |
tree | 4667906e1ab807c31216f89da450b3cce5585150 /src | |
parent | 286f34b97b8a4fb56fde1f9e5f3a95ba0c807441 (diff) | |
download | mv-67f8b40f80368dad17a9da50c78923433e266f54.tar.gz mv-67f8b40f80368dad17a9da50c78923433e266f54.tar.bz2 mv-67f8b40f80368dad17a9da50c78923433e266f54.tar.xz mv-67f8b40f80368dad17a9da50c78923433e266f54.zip |
Fix code style.
Diffstat (limited to 'src')
43 files changed, 66 insertions, 76 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp index 655aa01ae..83ed121c5 100644 --- a/src/actions/chat.cpp +++ b/src/actions/chat.cpp @@ -84,6 +84,15 @@ static void outString(const ChatTab *const tab, break; } default: + case ChatTabType::UNKNOWN: + case ChatTabType::INPUT: + case ChatTabType::WHISPER: + case ChatTabType::DEBUG: + case ChatTabType::TRADE: + case ChatTabType::BATTLE: + case ChatTabType::LANG: + case ChatTabType::GM: + case ChatTabType::CHANNEL: chatHandler->me(def, GENERAL_CHANNEL); break; } diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index d187f8f6c..d3c79c10f 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -410,17 +410,11 @@ impHandler(info) return false; } - switch (event.tab->getType()) + if (event.tab->getType() == ChatTabType::GUILD) { - case ChatTabType::GUILD: - { - const Guild *const guild = localPlayer->getGuild(); - if (guild) - guildHandler->info(guild->getId()); - break; - } - default: - break; + const Guild *const guild = localPlayer->getGuild(); + if (guild) + guildHandler->info(guild->getId()); } return true; } diff --git a/src/actions/windows.cpp b/src/actions/windows.cpp index 18a2c4773..107988ec5 100644 --- a/src/actions/windows.cpp +++ b/src/actions/windows.cpp @@ -112,7 +112,23 @@ impHandler(helpWindowShow) return showHelpPage("chatparty", true); case ChatTabType::GUILD: return showHelpPage("chatguild", true); + case ChatTabType::WHISPER: + return showHelpPage("chatwhisper", true); + case ChatTabType::DEBUG: + return showHelpPage("chatdebug", true); + case ChatTabType::TRADE: + return showHelpPage("chattrade", true); + case ChatTabType::BATTLE: + return showHelpPage("chatbattle", true); + case ChatTabType::LANG: + return showHelpPage("chatlang", true); + case ChatTabType::GM: + return showHelpPage("chatgm", true); + case ChatTabType::CHANNEL: + return showHelpPage("chatchannel", true); default: + case ChatTabType::UNKNOWN: + case ChatTabType::INPUT: return showHelpPage("chatcommands", true); } } diff --git a/src/being/being.cpp b/src/being/being.cpp index 97b20ddc6..bfcb45eac 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -201,6 +201,7 @@ Being::Being(const int id, mNumber(100), mUsageCounter(1), mKarma(0), + mManner(0), mLook(0U), mHairColor(0), mErased(false), diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index c3f267cb6..321e849e5 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -38,7 +38,6 @@ #include "being/attributes.h" #include "being/beingflag.h" -#include "being/pickup.h" #include "being/playerinfo.h" #include "being/playerrelations.h" @@ -803,9 +802,9 @@ void LocalPlayer::untarget() void LocalPlayer::pickedUp(const ItemInfo &itemInfo, const int amount, const unsigned char color, const int floorItemId, - const unsigned char fail) + const Pickup::Type fail) { - if (fail) + if (fail != Pickup::OKAY) { if (actorManager && floorItemId) { @@ -1157,7 +1156,10 @@ void LocalPlayer::moveToTarget(int dist) debugPath = mMap->findPath(static_cast<int>( playerPos.x - mapTileSize / 2) / mapTileSize, static_cast<int>(playerPos.y - mapTileSize) / mapTileSize, - mTarget->getTileX(), mTarget->getTileY(), getBlockWalkMask(), 0); + mTarget->getTileX(), + mTarget->getTileY(), + getBlockWalkMask(), + 0); } const size_t sz = debugPath.size(); diff --git a/src/being/localplayer.h b/src/being/localplayer.h index bfec5ad58..46ed22cb8 100644 --- a/src/being/localplayer.h +++ b/src/being/localplayer.h @@ -25,6 +25,8 @@ #include "being/being.h" +#include "being/pickup.h" + #include "gui/userpalette.h" #include "listeners/actorspritelistener.h" @@ -174,7 +176,7 @@ class LocalPlayer final : public Being, */ void pickedUp(const ItemInfo &itemInfo, const int amount, const unsigned char color, const int floorItemId, - const unsigned char fail); + const Pickup::Type fail); int getLevel() const override final A_WARN_UNUSED; diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp index a6ec14c27..632fc7b09 100644 --- a/src/being/playerinfo.cpp +++ b/src/being/playerinfo.cpp @@ -37,8 +37,6 @@ #include "gui/windows/npcdialog.h" #include "gui/windows/npcpostdialog.h" -#include "resources/iteminfo.h" - #include "net/homunculushandler.h" #include "net/inventoryhandler.h" #include "net/mercenaryhandler.h" diff --git a/src/gui/widgets/horizontcontainer.cpp b/src/gui/widgets/horizontcontainer.cpp index ff9a5b010..f02a0b0af 100644 --- a/src/gui/widgets/horizontcontainer.cpp +++ b/src/gui/widgets/horizontcontainer.cpp @@ -28,6 +28,7 @@ HorizontContainer::HorizontContainer(const Widget2 *const widget, const int spacing) : Container(widget), WidgetListener(), + ToolTipListener(), mSpacing(spacing), mCount(0), mLastX(spacing) diff --git a/src/gui/widgets/tabs/chat/battletab.cpp b/src/gui/widgets/tabs/chat/battletab.cpp index 73fc3802e..1735c1d06 100644 --- a/src/gui/widgets/tabs/chat/battletab.cpp +++ b/src/gui/widgets/tabs/chat/battletab.cpp @@ -22,7 +22,6 @@ #include "gui/widgets/tabs/chat/battletab.h" -#include "chatlogger.h" #include "configuration.h" #include "utils/gettext.h" diff --git a/src/gui/widgets/tabs/chat/battletab.h b/src/gui/widgets/tabs/chat/battletab.h index ffac0dfd9..be4a594eb 100644 --- a/src/gui/widgets/tabs/chat/battletab.h +++ b/src/gui/widgets/tabs/chat/battletab.h @@ -24,7 +24,6 @@ #define GUI_WIDGETS_TABS_CHAT_BATTLETAB_H #include "gui/widgets/tabs/chat/chattab.h" -#include "gui/widgets/tabs/chat/chattabtype.h" /** * A tab for a party chat channel. diff --git a/src/gui/widgets/tabs/chat/channeltab.cpp b/src/gui/widgets/tabs/chat/channeltab.cpp index cf8e2443f..4983218dc 100644 --- a/src/gui/widgets/tabs/chat/channeltab.cpp +++ b/src/gui/widgets/tabs/chat/channeltab.cpp @@ -22,9 +22,6 @@ #include "gui/widgets/tabs/chat/channeltab.h" -#include "chatlogger.h" -#include "configuration.h" - #include "gui/widgets/windowcontainer.h" #include "gui/windows/chatwindow.h" diff --git a/src/gui/widgets/tabs/chat/channeltab.h b/src/gui/widgets/tabs/chat/channeltab.h index 0bcfc425c..03a5239ff 100644 --- a/src/gui/widgets/tabs/chat/channeltab.h +++ b/src/gui/widgets/tabs/chat/channeltab.h @@ -24,7 +24,6 @@ #define GUI_WIDGETS_TABS_CHAT_CHANNELTAB_H #include "gui/widgets/tabs/chat/chattab.h" -#include "gui/widgets/tabs/chat/chattabtype.h" /** * A tab for a chat channel. diff --git a/src/gui/widgets/tabs/chat/emulateguildtab.cpp b/src/gui/widgets/tabs/chat/emulateguildtab.cpp index 1606fbcd3..c0bb519e5 100644 --- a/src/gui/widgets/tabs/chat/emulateguildtab.cpp +++ b/src/gui/widgets/tabs/chat/emulateguildtab.cpp @@ -22,7 +22,6 @@ #include "gui/widgets/tabs/chat/emulateguildtab.h" -#include "chatlogger.h" #include "configuration.h" #include "guildmanager.h" #include "soundconsts.h" diff --git a/src/gui/widgets/tabs/chat/emulateguildtab.h b/src/gui/widgets/tabs/chat/emulateguildtab.h index 86279d249..1820e9ba8 100644 --- a/src/gui/widgets/tabs/chat/emulateguildtab.h +++ b/src/gui/widgets/tabs/chat/emulateguildtab.h @@ -24,7 +24,6 @@ #define GUI_WIDGETS_TABS_CHAT_EMULATEGUILDTAB_H #include "gui/widgets/tabs/chat/chattab.h" -#include "gui/widgets/tabs/chat/chattabtype.h" /** * Emulate guild tab, because server not support normal guilds. diff --git a/src/gui/widgets/tabs/chat/gmtab.cpp b/src/gui/widgets/tabs/chat/gmtab.cpp index db1e6a98d..079df013c 100644 --- a/src/gui/widgets/tabs/chat/gmtab.cpp +++ b/src/gui/widgets/tabs/chat/gmtab.cpp @@ -20,8 +20,6 @@ #include "gui/widgets/tabs/chat/gmtab.h" -#include "chatlogger.h" - #include "utils/gettext.h" #include "debug.h" diff --git a/src/gui/widgets/tabs/chat/gmtab.h b/src/gui/widgets/tabs/chat/gmtab.h index 008b7ec12..a96fafb25 100644 --- a/src/gui/widgets/tabs/chat/gmtab.h +++ b/src/gui/widgets/tabs/chat/gmtab.h @@ -22,7 +22,6 @@ #define GUI_WIDGETS_TABS_CHAT_GMTAB_H #include "gui/widgets/tabs/chat/chattab.h" -#include "gui/widgets/tabs/chat/chattabtype.h" /** * A tab for whispers from a single player. diff --git a/src/gui/widgets/tabs/chat/guildtab.cpp b/src/gui/widgets/tabs/chat/guildtab.cpp index 97f0f348d..f3c0b1d04 100644 --- a/src/gui/widgets/tabs/chat/guildtab.cpp +++ b/src/gui/widgets/tabs/chat/guildtab.cpp @@ -22,7 +22,6 @@ #include "gui/widgets/tabs/chat/guildtab.h" -#include "chatlogger.h" #include "configuration.h" #include "guild.h" #include "soundconsts.h" diff --git a/src/gui/widgets/tabs/chat/guildtab.h b/src/gui/widgets/tabs/chat/guildtab.h index c0d5b7ce7..4ac43fcc5 100644 --- a/src/gui/widgets/tabs/chat/guildtab.h +++ b/src/gui/widgets/tabs/chat/guildtab.h @@ -24,7 +24,6 @@ #define GUI_WIDGETS_TABS_CHAT_GUILDTAB_H #include "gui/widgets/tabs/chat/chattab.h" -#include "gui/widgets/tabs/chat/chattabtype.h" /** * A tab for a guild chat channel. diff --git a/src/gui/widgets/tabs/chat/langtab.cpp b/src/gui/widgets/tabs/chat/langtab.cpp index 554af2782..6f5b84f1f 100644 --- a/src/gui/widgets/tabs/chat/langtab.cpp +++ b/src/gui/widgets/tabs/chat/langtab.cpp @@ -20,8 +20,6 @@ #include "gui/widgets/tabs/chat/langtab.h" -#include "chatlogger.h" - #include "utils/gettext.h" #include "debug.h" diff --git a/src/gui/widgets/tabs/chat/langtab.h b/src/gui/widgets/tabs/chat/langtab.h index 65a26b562..1532afd32 100644 --- a/src/gui/widgets/tabs/chat/langtab.h +++ b/src/gui/widgets/tabs/chat/langtab.h @@ -22,7 +22,6 @@ #define GUI_WIDGETS_TABS_CHAT_LANGTAB_H #include "gui/widgets/tabs/chat/chattab.h" -#include "gui/widgets/tabs/chat/chattabtype.h" class LangTab final : public ChatTab { diff --git a/src/gui/widgets/tabs/chat/partytab.cpp b/src/gui/widgets/tabs/chat/partytab.cpp index e34d49014..0779b62d0 100644 --- a/src/gui/widgets/tabs/chat/partytab.cpp +++ b/src/gui/widgets/tabs/chat/partytab.cpp @@ -22,7 +22,6 @@ #include "gui/widgets/tabs/chat/partytab.h" -#include "chatlogger.h" #include "configuration.h" #include "party.h" #include "soundconsts.h" diff --git a/src/gui/widgets/tabs/chat/partytab.h b/src/gui/widgets/tabs/chat/partytab.h index dc0799ecc..5590e9d18 100644 --- a/src/gui/widgets/tabs/chat/partytab.h +++ b/src/gui/widgets/tabs/chat/partytab.h @@ -24,7 +24,6 @@ #define GUI_WIDGETS_TABS_CHAT_PARTYTAB_H #include "gui/widgets/tabs/chat/chattab.h" -#include "gui/widgets/tabs/chat/chattabtype.h" /** * A tab for a party chat channel. diff --git a/src/gui/widgets/tabs/chat/tradetab.cpp b/src/gui/widgets/tabs/chat/tradetab.cpp index a4906a815..707b64847 100644 --- a/src/gui/widgets/tabs/chat/tradetab.cpp +++ b/src/gui/widgets/tabs/chat/tradetab.cpp @@ -22,8 +22,6 @@ #include "gui/widgets/tabs/chat/tradetab.h" -#include "chatlogger.h" - #include "gui/chatconsts.h" #include "utils/gettext.h" diff --git a/src/gui/widgets/tabs/chat/tradetab.h b/src/gui/widgets/tabs/chat/tradetab.h index 935f2ce4f..3ed2a538e 100644 --- a/src/gui/widgets/tabs/chat/tradetab.h +++ b/src/gui/widgets/tabs/chat/tradetab.h @@ -24,7 +24,6 @@ #define GUI_WIDGETS_TABS_CHAT_TRADETAB_H #include "gui/widgets/tabs/chat/chattab.h" -#include "gui/widgets/tabs/chat/chattabtype.h" /** * A tab for a party chat channel. diff --git a/src/gui/widgets/tabs/chat/whispertab.cpp b/src/gui/widgets/tabs/chat/whispertab.cpp index 20354cc69..f82277171 100644 --- a/src/gui/widgets/tabs/chat/whispertab.cpp +++ b/src/gui/widgets/tabs/chat/whispertab.cpp @@ -22,8 +22,6 @@ #include "gui/widgets/tabs/chat/whispertab.h" -#include "chatlogger.h" - #include "being/localplayer.h" #include "net/chathandler.h" diff --git a/src/gui/widgets/tabs/chat/whispertab.h b/src/gui/widgets/tabs/chat/whispertab.h index 2ad8ca03d..24fc2abe0 100644 --- a/src/gui/widgets/tabs/chat/whispertab.h +++ b/src/gui/widgets/tabs/chat/whispertab.h @@ -24,7 +24,6 @@ #define GUI_WIDGETS_TABS_CHAT_WHISPERTAB_H #include "gui/widgets/tabs/chat/chattab.h" -#include "gui/widgets/tabs/chat/chattabtype.h" /** * A tab for whispers from a single player. diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 73ab5a0cf..bb5f37a4d 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -64,8 +64,6 @@ #include "gui/widgets/tabs/chat/tradetab.h" #include "gui/widgets/tabs/chat/whispertab.h" -#include "input/inputmanager.h" - #include "render/opengldebug.h" #include "net/chathandler.h" diff --git a/src/gui/windows/npcpostdialog.cpp b/src/gui/windows/npcpostdialog.cpp index 1adf01309..353ba1b4b 100644 --- a/src/gui/windows/npcpostdialog.cpp +++ b/src/gui/windows/npcpostdialog.cpp @@ -32,21 +32,19 @@ #include "gui/widgets/tabs/chat/chattab.h" -#include "net/npchandler.h" - #include "utils/gettext.h" #include "debug.h" NpcPostDialog::DialogList NpcPostDialog::instances; -NpcPostDialog::NpcPostDialog(const int npcId) : +NpcPostDialog::NpcPostDialog(const int npcId A_UNUSED) : // TRANSLATORS: npc post dialog caption Window(_("NPC"), false, nullptr, "npcpost.xml"), ActionListener(), mText(new TextBox(this)), - mSender(new TextField(this)), - mNpcId(npcId) + mSender(new TextField(this)) +// mNpcId(npcId) { setContentSize(400, 180); } diff --git a/src/gui/windows/npcpostdialog.h b/src/gui/windows/npcpostdialog.h index c0477bf20..998844db8 100644 --- a/src/gui/windows/npcpostdialog.h +++ b/src/gui/windows/npcpostdialog.h @@ -69,7 +69,7 @@ class NpcPostDialog final : public Window, TextBox *mText; TextField *mSender; - int mNpcId; +// int mNpcId; }; #endif // GUI_WINDOWS_NPCPOSTDIALOG_H diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp index 6790c26ab..9005e8b35 100644 --- a/src/gui/windows/socialwindow.cpp +++ b/src/gui/windows/socialwindow.cpp @@ -49,8 +49,6 @@ #include "gui/widgets/tabs/socialpickuptab.h" #include "gui/widgets/tabs/socialplayerstab.h" -#include "gui/widgets/tabs/chat/chattab.h" - #include "gui/popups/createpartypopup.h" #include "net/serverfeatures.h" diff --git a/src/gui/windows/textcommandeditor.cpp b/src/gui/windows/textcommandeditor.cpp index d35334e36..7cd72149b 100644 --- a/src/gui/windows/textcommandeditor.cpp +++ b/src/gui/windows/textcommandeditor.cpp @@ -40,7 +40,6 @@ #include "gui/widgets/radiobutton.h" #include "utils/delete2.h" -#include "utils/gettext.h" #include "debug.h" diff --git a/src/item.cpp b/src/item.cpp index 3b4beacdc..58148d2b1 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -144,7 +144,7 @@ void Item::setCard(const int index, const int id) int Item::getCard(const int index) const { if (index < 0 || index >= maxCards) - return 0 ; + return 0; return mCards[index]; } diff --git a/src/listeners/tooltiplistener.cpp b/src/listeners/tooltiplistener.cpp index 511779192..1b0e9cc2a 100644 --- a/src/listeners/tooltiplistener.cpp +++ b/src/listeners/tooltiplistener.cpp @@ -28,7 +28,8 @@ #include "debug.h" ToolTipListener::ToolTipListener() : - MouseListener() + MouseListener(), + mToolTip() { } diff --git a/src/net/ea/partyhandler.h b/src/net/ea/partyhandler.h index d2c82cc95..c415ac4b5 100644 --- a/src/net/ea/partyhandler.h +++ b/src/net/ea/partyhandler.h @@ -25,7 +25,6 @@ #include "net/partyhandler.h" class Party; -class PartyTab; namespace Net { diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp index 124e09734..686048554 100644 --- a/src/net/eathena/adminhandler.cpp +++ b/src/net/eathena/adminhandler.cpp @@ -22,13 +22,9 @@ #include "net/eathena/adminhandler.h" -#include "notifymanager.h" - #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" -#include "resources/notifytypes.h" - #include <string> #include "debug.h" diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index e7b8e66ec..50d4569dc 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -422,7 +422,8 @@ std::string ChatHandler::extractChannelFromMessage(std::string &chatMsg) return channel; } -void ChatHandler::processChatContinue(std::string chatMsg, ChatMsgType::Type own) +void ChatHandler::processChatContinue(std::string chatMsg, + ChatMsgType::Type own) { const std::string channel = extractChannelFromMessage(chatMsg); bool allow(true); diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index a7315c506..14fa4df3b 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -29,8 +29,6 @@ #include "listeners/arrowslistener.h" -#include "net/serverfeatures.h" - #include "net/eathena/itemflags.h" #include "net/eathena/menu.h" #include "net/eathena/messageout.h" diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp index 3d76d9e78..ef08a5521 100644 --- a/src/net/eathena/tradehandler.cpp +++ b/src/net/eathena/tradehandler.cpp @@ -46,7 +46,7 @@ extern Net::TradeHandler *tradeHandler; namespace EAthena { int TradeHandler::mQuantity = 0; -uint16_t TradeHandler::mItemIndex = -1; +int TradeHandler::mItemIndex = -1; TradeHandler::TradeHandler() : MessageHandler(), diff --git a/src/net/eathena/tradehandler.h b/src/net/eathena/tradehandler.h index 36336f002..ccfee1101 100644 --- a/src/net/eathena/tradehandler.h +++ b/src/net/eathena/tradehandler.h @@ -66,7 +66,7 @@ class TradeHandler final : public MessageHandler, public Ea::TradeHandler static void processTradeItemAddResponse(Net::MessageIn &msg); static int mQuantity; - static uint16_t mItemIndex; + static int mItemIndex; }; } // namespace EAthena diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp index ce81c596c..08bf5f3a4 100644 --- a/src/net/tmwa/adminhandler.cpp +++ b/src/net/tmwa/adminhandler.cpp @@ -22,8 +22,6 @@ #include "net/tmwa/adminhandler.h" -#include "notifymanager.h" - #include "gui/chatconsts.h" #include "net/chathandler.h" @@ -31,8 +29,6 @@ #include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" -#include "resources/notifytypes.h" - #include "utils/stringutils.h" #include <string> diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index e2c609b2c..219cedc3d 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -33,8 +33,6 @@ #include "gui/windows/socialwindow.h" #include "gui/windows/statuswindow.h" -#include "net/ea/guildhandler.h" - #include "gui/widgets/tabs/chat/guildtab.h" #include "gui/widgets/tabs/chat/partytab.h" diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index dec66396e..43cc5fd3b 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -254,7 +254,7 @@ void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg) const int index = msg.readInt16("index") - INVENTORY_OFFSET; const int itemId = msg.readInt16("item id"); const uint8_t itemType = msg.readUInt8("item type"); - uint8_t identified = msg.readUInt8("identify"); + const uint8_t identified = msg.readUInt8("identify"); msg.readInt16("equip type?"); const int equipType = msg.readInt16("equip type"); @@ -306,7 +306,7 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg) const int index = msg.readInt16("index") - INVENTORY_OFFSET; int amount = msg.readInt16("amount"); const int itemId = msg.readInt16("item id"); - uint8_t identified = msg.readUInt8("identified"); + const uint8_t identified = msg.readUInt8("identified"); msg.readUInt8("attribute"); const uint8_t refine = msg.readUInt8("refine"); int cards[4]; @@ -416,7 +416,7 @@ void InventoryHandler::processPlayerInventory(Net::MessageIn &msg) const int index = msg.readInt16("index") - INVENTORY_OFFSET; const int itemId = msg.readInt16("item id"); const uint8_t itemType = msg.readUInt8("item type"); - uint8_t identified = msg.readUInt8("identified"); + const uint8_t identified = msg.readUInt8("identified"); const int amount = msg.readInt16("amount"); const int arrow = msg.readInt16("arrow"); for (int i = 0; i < 4; i++) @@ -465,7 +465,7 @@ void InventoryHandler::processPlayerStorage(Net::MessageIn &msg) const int index = msg.readInt16("index") - STORAGE_OFFSET; const int itemId = msg.readInt16("item id"); const uint8_t itemType = msg.readUInt8("item type"); - uint8_t identified = msg.readUInt8("identified"); + const uint8_t identified = msg.readUInt8("identified"); const int amount = msg.readInt16("amount"); msg.readInt16("arrow"); for (int i = 0; i < 4; i++) @@ -533,7 +533,7 @@ void InventoryHandler::processPlayerStorageEquip(Net::MessageIn &msg) const int index = msg.readInt16("index") - STORAGE_OFFSET; const int itemId = msg.readInt16("item id"); const uint8_t itemType = msg.readUInt8("item type"); - uint8_t identified = msg.readUInt8("identified"); + const uint8_t identified = msg.readUInt8("identified"); const int amount = 1; msg.readInt16("equip point?"); msg.readInt16("another equip point?"); @@ -575,7 +575,7 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg) const int index = msg.readInt16("index") - STORAGE_OFFSET; const int amount = msg.readInt32("amount"); const int itemId = msg.readInt16("item id"); - unsigned char identified = msg.readUInt8("identified"); + const unsigned char identified = msg.readUInt8("identified"); msg.readUInt8("attribute"); const uint8_t refine = msg.readUInt8("refine"); int cards[4]; diff --git a/src/utils/chatutils.cpp b/src/utils/chatutils.cpp index 60a5329b1..105b7ace5 100644 --- a/src/utils/chatutils.cpp +++ b/src/utils/chatutils.cpp @@ -86,7 +86,16 @@ void outStringNormal(ChatTab *const tab, chatHandler->privateMessage(whisper->getNick(), str); break; } + case ChatTabType::DEBUG: + case ChatTabType::BATTLE: + break; default: + case ChatTabType::UNKNOWN: + case ChatTabType::INPUT: + case ChatTabType::TRADE: + case ChatTabType::LANG: + case ChatTabType::GM: + case ChatTabType::CHANNEL: chatHandler->talk(def, GENERAL_CHANNEL); break; } |