diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-04 01:26:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-04 01:26:47 +0300 |
commit | 8356efd659046630db247b344bb4baec29c4a6e7 (patch) | |
tree | b0758791b4f0856856536556d0e99f1ef08bf3bb /src/net/tmwa | |
parent | ad65d5b7ee4e206733add9e5514a7d51e02c2d54 (diff) | |
download | mv-8356efd659046630db247b344bb4baec29c4a6e7.tar.gz mv-8356efd659046630db247b344bb4baec29c4a6e7.tar.bz2 mv-8356efd659046630db247b344bb4baec29c4a6e7.tar.xz mv-8356efd659046630db247b344bb4baec29c4a6e7.zip |
Remove some useless includes.
Diffstat (limited to 'src/net/tmwa')
30 files changed, 16 insertions, 152 deletions
diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp index fa2f012f1..fe2151df0 100644 --- a/src/net/tmwa/adminhandler.cpp +++ b/src/net/tmwa/adminhandler.cpp @@ -26,8 +26,6 @@ #include "net/chathandler.h" -#include "net/ea/adminrecv.h" - #include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" diff --git a/src/net/tmwa/adminhandler.h b/src/net/tmwa/adminhandler.h index 7fa28ce2b..3bc0f0175 100644 --- a/src/net/tmwa/adminhandler.h +++ b/src/net/tmwa/adminhandler.h @@ -25,11 +25,6 @@ #include "net/ea/adminhandler.h" -namespace Net -{ - class MessageIn; -} - namespace TmwAthena { diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index b3529b53c..fd334b712 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -22,9 +22,6 @@ #include "net/tmwa/beinghandler.h" -#include "net/ea/beingrecv.h" - -#include "net/tmwa/beingrecv.h" #include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" #include "net/tmwa/sprite.h" diff --git a/src/net/tmwa/beingrecv.cpp b/src/net/tmwa/beingrecv.cpp index d77a4bffa..1dfa00e08 100644 --- a/src/net/tmwa/beingrecv.cpp +++ b/src/net/tmwa/beingrecv.cpp @@ -37,9 +37,10 @@ #include "gui/windows/socialwindow.h" #include "net/beinghandler.h" -#include "net/messagein.h" #include "net/serverfeatures.h" +#include "net/messagein.h" + #include "net/ea/beingrecv.h" #include "net/tmwa/guildmanager.h" diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp index b2582a595..144b70379 100644 --- a/src/net/tmwa/buysellhandler.cpp +++ b/src/net/tmwa/buysellhandler.cpp @@ -31,9 +31,6 @@ #include "net/ea/buysellrecv.h" -#include "net/tmwa/buysellrecv.h" -#include "net/tmwa/protocol.h" - #include "utils/timer.h" #include "debug.h" diff --git a/src/net/tmwa/buysellrecv.cpp b/src/net/tmwa/buysellrecv.cpp index 52f04cac2..c5d28f35e 100644 --- a/src/net/tmwa/buysellrecv.cpp +++ b/src/net/tmwa/buysellrecv.cpp @@ -32,7 +32,7 @@ #include "gui/widgets/createwidget.h" -#include "net/buysellhandler.h" +#include "net/messagein.h" #include "net/ea/buysellrecv.h" diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 487e0bbfc..76e428156 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -30,9 +30,6 @@ #include "net/ea/token.h" -#include "net/ea/charserverrecv.h" - -#include "net/tmwa/charserverrecv.h" #include "net/tmwa/loginhandler.h" #include "net/tmwa/messageout.h" #include "net/tmwa/network.h" diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp index a3071c1a5..5ec871685 100644 --- a/src/net/tmwa/chathandler.cpp +++ b/src/net/tmwa/chathandler.cpp @@ -30,7 +30,6 @@ #include "net/ea/chatrecv.h" -#include "net/tmwa/chatrecv.h" #include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" diff --git a/src/net/tmwa/chatrecv.cpp b/src/net/tmwa/chatrecv.cpp index 561511041..a768dab2e 100644 --- a/src/net/tmwa/chatrecv.cpp +++ b/src/net/tmwa/chatrecv.cpp @@ -43,7 +43,6 @@ #include "net/messagein.h" #include "net/tmwa/guildmanager.h" -#include "net/tmwa/protocol.h" #include "debug.h" @@ -123,7 +122,6 @@ void ChatRecv::processChatContinue(std::string chatMsg, void ChatRecv::processGmChat(Net::MessageIn &msg) { BLOCK_START("ChatRecv::processChat") - const bool normalChat = msg.getId() == SMSG_PLAYER_CHAT; int chatMsgLength = msg.readInt16("len") - 4; if (chatMsgLength <= 0) { @@ -132,57 +130,8 @@ void ChatRecv::processGmChat(Net::MessageIn &msg) } std::string chatMsg = msg.readRawString(chatMsgLength, "message"); - const size_t pos = chatMsg.find(" : ", 0); - - if (normalChat) - { - bool allow(true); - if (chatWindow) - { - allow = chatWindow->resortChatLog(chatMsg, - ChatMsgType::BY_PLAYER, - GENERAL_CHANNEL, - IgnoreRecord_false, - TryRemoveColors_true); - } - - const std::string senseStr("You sense the following: "); - if (actorManager && !chatMsg.find(senseStr)) - { - actorManager->parseLevels( - chatMsg.substr(senseStr.size())); - } - if (pos == std::string::npos && - !Ea::ChatRecv::mShowMotd && - Ea::ChatRecv::mSkipping) - { - // skip motd from "new" tmw server - if (Ea::ChatRecv::mMotdTime == -1) - { - Ea::ChatRecv::mMotdTime = cur_time + 1; - } - else if (Ea::ChatRecv::mMotdTime == cur_time || - Ea::ChatRecv::mMotdTime < cur_time) - { - Ea::ChatRecv::mSkipping = false; - } - BLOCK_END("ChatRecv::processChat") - return; - } - - if (pos != std::string::npos) - chatMsg.erase(0, pos + 3); - - trim(chatMsg); - - if (localPlayer) - { - if ((chatWindow || Ea::ChatRecv::mShowMotd) && allow) - localPlayer->setSpeech(chatMsg, GENERAL_CHANNEL); - } - } - else if (localChatTab) + if (localChatTab) { if (chatWindow) chatWindow->addGlobalMessage(chatMsg); diff --git a/src/net/tmwa/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp index 7d6d912fa..8e1c8970d 100644 --- a/src/net/tmwa/gamehandler.cpp +++ b/src/net/tmwa/gamehandler.cpp @@ -30,7 +30,6 @@ #include "net/ea/gamerecv.h" -#include "net/tmwa/gamerecv.h" #include "net/tmwa/loginhandler.h" #include "net/tmwa/messageout.h" #include "net/tmwa/network.h" diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index b844261d5..818e2d7a2 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -32,8 +32,6 @@ #include "gui/widgets/tabs/chat/guildtab.h" #include "gui/widgets/tabs/chat/partytab.h" -#include "net/tmwa/generalrecv.h" - #include "net/tmwa/adminhandler.h" #include "net/tmwa/beinghandler.h" #include "net/tmwa/buysellhandler.h" @@ -49,7 +47,6 @@ #include "net/tmwa/partyhandler.h" #include "net/tmwa/pethandler.h" #include "net/tmwa/playerhandler.h" -#include "net/tmwa/protocol.h" #include "net/tmwa/serverfeatures.h" #include "net/tmwa/tradehandler.h" #include "net/tmwa/skillhandler.h" diff --git a/src/net/tmwa/guildhandler.cpp b/src/net/tmwa/guildhandler.cpp index e2074ac27..3494c87bb 100644 --- a/src/net/tmwa/guildhandler.cpp +++ b/src/net/tmwa/guildhandler.cpp @@ -26,11 +26,8 @@ #include "being/localplayer.h" #include "being/playerinfo.h" -#include "net/serverfeatures.h" - #include "net/ea/guildrecv.h" -#include "net/tmwa/guildrecv.h" #include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" diff --git a/src/net/tmwa/guildrecv.cpp b/src/net/tmwa/guildrecv.cpp index 0a6a84fc7..3e22992cd 100644 --- a/src/net/tmwa/guildrecv.cpp +++ b/src/net/tmwa/guildrecv.cpp @@ -22,7 +22,6 @@ #include "net/tmwa/guildrecv.h" #include "configuration.h" -#include "guild.h" #include "being/localplayer.h" #include "being/playerinfo.h" diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index 33d260673..2cca7ebc3 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -23,13 +23,9 @@ #include "net/tmwa/inventoryhandler.h" #include "item.h" -#include "logger.h" #include "enums/equipslot.h" -#include "net/ea/inventoryrecv.h" - -#include "net/tmwa/inventoryrecv.h" #include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" diff --git a/src/net/tmwa/itemhandler.cpp b/src/net/tmwa/itemhandler.cpp index eb42aa2a3..e331d4a5e 100644 --- a/src/net/tmwa/itemhandler.cpp +++ b/src/net/tmwa/itemhandler.cpp @@ -22,11 +22,6 @@ #include "net/tmwa/itemhandler.h" -#include "net/ea/itemrecv.h" - -#include "net/tmwa/itemrecv.h" -#include "net/tmwa/protocol.h" - #include "debug.h" namespace TmwAthena diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp index de9196814..c2cf125d4 100644 --- a/src/net/tmwa/loginhandler.cpp +++ b/src/net/tmwa/loginhandler.cpp @@ -28,7 +28,6 @@ #include "net/ea/loginrecv.h" -#include "net/tmwa/loginrecv.h" #include "net/tmwa/messageout.h" #include "net/tmwa/network.h" #include "net/tmwa/protocol.h" @@ -67,7 +66,8 @@ bool LoginHandler::isConnected() const if (!Network::mInstance) return false; - return Ea::LoginRecv::mVersionResponse && Network::mInstance->isConnected(); + return Ea::LoginRecv::mVersionResponse && + Network::mInstance->isConnected(); } void LoginHandler::disconnect() diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp index 069ff373a..16f4c073f 100644 --- a/src/net/tmwa/network.cpp +++ b/src/net/tmwa/network.cpp @@ -61,8 +61,6 @@ #include "net/tmwa/messagein.h" #include "net/tmwa/protocol.h" -#include "utils/delete2.h" - #include "debug.h" namespace TmwAthena diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp index b20516363..6c721ffd1 100644 --- a/src/net/tmwa/partyhandler.cpp +++ b/src/net/tmwa/partyhandler.cpp @@ -32,7 +32,6 @@ #include "net/ea/partyrecv.h" #include "net/tmwa/messageout.h" -#include "net/tmwa/partyrecv.h" #include "net/tmwa/protocol.h" #include "debug.h" diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index d637aed4d..5591c903e 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -25,13 +25,8 @@ #include "being/localplayer.h" #include "being/playerinfo.h" -#include "gui/windows/statuswindow.h" - -#include "net/ea/playerrecv.h" - #include "net/tmwa/inventoryhandler.h" #include "net/tmwa/messageout.h" -#include "net/tmwa/playerrecv.h" #include "net/tmwa/protocol.h" #include "debug.h" diff --git a/src/net/tmwa/playerrecv.cpp b/src/net/tmwa/playerrecv.cpp index 88d2062bb..813006448 100644 --- a/src/net/tmwa/playerrecv.cpp +++ b/src/net/tmwa/playerrecv.cpp @@ -27,9 +27,7 @@ #include "gui/windows/statuswindow.h" -#include "net/tmwa/inventoryhandler.h" -#include "net/tmwa/messageout.h" -#include "net/tmwa/protocol.h" +#include "net/messagein.h" #include "debug.h" diff --git a/src/net/tmwa/playerrecv.h b/src/net/tmwa/playerrecv.h index 929591be6..c0f39acff 100644 --- a/src/net/tmwa/playerrecv.h +++ b/src/net/tmwa/playerrecv.h @@ -23,7 +23,10 @@ #ifndef NET_TMWA_PLAYERRECV_H #define NET_TMWA_PLAYERRECV_H -#include "net/ea/playerhandler.h" +namespace Net +{ + class MessageIn; +} namespace TmwAthena { diff --git a/src/net/tmwa/questhandler.cpp b/src/net/tmwa/questhandler.cpp index 8ecf0b83e..5a7fd894e 100644 --- a/src/net/tmwa/questhandler.cpp +++ b/src/net/tmwa/questhandler.cpp @@ -20,14 +20,6 @@ #include "net/tmwa/questhandler.h" -#include "gui/windows/skilldialog.h" -#include "gui/windows/questswindow.h" - -#include "net/tmwa/protocol.h" -#include "net/tmwa/questrecv.h" - -#include "resources/skillconsts.h" - #include "debug.h" namespace TmwAthena diff --git a/src/net/tmwa/questrecv.cpp b/src/net/tmwa/questrecv.cpp index 0f05413af..f95a7463a 100644 --- a/src/net/tmwa/questrecv.cpp +++ b/src/net/tmwa/questrecv.cpp @@ -25,8 +25,6 @@ #include "net/messagein.h" -#include "net/tmwa/protocol.h" - #include "resources/skillconsts.h" #include "debug.h" diff --git a/src/net/tmwa/questrecv.h b/src/net/tmwa/questrecv.h index f81653cf6..cc7472881 100644 --- a/src/net/tmwa/questrecv.h +++ b/src/net/tmwa/questrecv.h @@ -21,8 +21,6 @@ #ifndef NET_TMWA_QUESTRECV_H #define NET_TMWA_QUESTRECV_H -#include "net/questhandler.h" - namespace Net { class MessageIn; diff --git a/src/net/tmwa/skillhandler.cpp b/src/net/tmwa/skillhandler.cpp index ed9909e18..a666dec96 100644 --- a/src/net/tmwa/skillhandler.cpp +++ b/src/net/tmwa/skillhandler.cpp @@ -22,22 +22,8 @@ #include "net/tmwa/skillhandler.h" -#include "notifymanager.h" - -#include "being/localplayer.h" -#include "being/playerinfo.h" - -#include "enums/resources/notifytypes.h" - -#include "gui/windows/skilldialog.h" - -#include "net/ea/skillrecv.h" - #include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" -#include "net/tmwa/skillrecv.h" - -#include "utils/gettext.h" #include "debug.h" diff --git a/src/net/tmwa/skillrecv.cpp b/src/net/tmwa/skillrecv.cpp index 9c29be38c..0330d3566 100644 --- a/src/net/tmwa/skillrecv.cpp +++ b/src/net/tmwa/skillrecv.cpp @@ -35,9 +35,6 @@ #include "net/ea/skillrecv.h" -#include "net/tmwa/messageout.h" -#include "net/tmwa/protocol.h" - #include "utils/gettext.h" #include "debug.h" diff --git a/src/net/tmwa/skillrecv.h b/src/net/tmwa/skillrecv.h index 7d0b84cc2..fd2e6f66f 100644 --- a/src/net/tmwa/skillrecv.h +++ b/src/net/tmwa/skillrecv.h @@ -23,8 +23,6 @@ #ifndef NET_TMWA_SKILLRECV_H #define NET_TMWA_SKILLRECV_H -#include "net/ea/skillhandler.h" - namespace Net { class MessageIn; diff --git a/src/net/tmwa/tradehandler.cpp b/src/net/tmwa/tradehandler.cpp index 3eccd966d..1d889b1db 100644 --- a/src/net/tmwa/tradehandler.cpp +++ b/src/net/tmwa/tradehandler.cpp @@ -22,28 +22,15 @@ #include "net/tmwa/tradehandler.h" -#include "inventory.h" #include "item.h" -#include "notifymanager.h" #include "being/playerinfo.h" -#include "being/playerrelation.h" -#include "being/playerrelations.h" - -#include "enums/resources/notifytypes.h" - -#include "gui/windows/tradewindow.h" - -#include "net/ea/traderecv.h" #include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" -#include "net/tmwa/traderecv.h" #include "net/ea/eaprotocol.h" -#include "utils/stringutils.h" - #include "debug.h" extern Net::TradeHandler *tradeHandler; diff --git a/src/net/tmwa/traderecv.cpp b/src/net/tmwa/traderecv.cpp index 654b9eeb5..e616313c0 100644 --- a/src/net/tmwa/traderecv.cpp +++ b/src/net/tmwa/traderecv.cpp @@ -35,19 +35,15 @@ #include "gui/windows/tradewindow.h" #include "net/messagein.h" +#include "net/tradehandler.h" #include "net/ea/eaprotocol.h" #include "net/ea/traderecv.h" -#include "net/tmwa/messageout.h" -#include "net/tmwa/protocol.h" - #include "utils/stringutils.h" #include "debug.h" -extern Net::TradeHandler *tradeHandler; - extern std::string tradePartnerName; namespace TmwAthena diff --git a/src/net/tmwa/traderecv.h b/src/net/tmwa/traderecv.h index 3b7166267..1a08f17ea 100644 --- a/src/net/tmwa/traderecv.h +++ b/src/net/tmwa/traderecv.h @@ -23,7 +23,10 @@ #ifndef NET_TMWA_TRADERECV_H #define NET_TMWA_TRADERECV_H -#include "net/ea/tradehandler.h" +namespace Net +{ + class MessageIn; +} namespace TmwAthena { |