diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-29 16:56:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-29 16:56:45 +0300 |
commit | 973606a6dbd201050b7d4cd0a6a782ff742056f6 (patch) | |
tree | 4f951409d7dbde5eb201bf3c6b46f777c3ce39b8 | |
parent | d528e58cdbd306a828882eb68855e81dda2a3e62 (diff) | |
download | mv-973606a6dbd201050b7d4cd0a6a782ff742056f6.tar.gz mv-973606a6dbd201050b7d4cd0a6a782ff742056f6.tar.bz2 mv-973606a6dbd201050b7d4cd0a6a782ff742056f6.tar.xz mv-973606a6dbd201050b7d4cd0a6a782ff742056f6.zip |
Fix code style.
174 files changed, 378 insertions, 917 deletions
diff --git a/src/actormanager.h b/src/actormanager.h index 09a0864a0..989947f83 100644 --- a/src/actormanager.h +++ b/src/actormanager.h @@ -28,7 +28,6 @@ #include "enums/simpletypes/allowsort.h" #include "enums/simpletypes/allplayers.h" #include "enums/simpletypes/beingtypeid.h" -#include "enums/simpletypes/damaged.h" #include "enums/simpletypes/npcnames.h" #include "listeners/configlistener.h" diff --git a/src/being/being.h b/src/being/being.h index 7bb7def7d..a28565ba7 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -27,7 +27,6 @@ #include "enums/gui/usercolorid.h" -#include "enums/simpletypes/itemcolor.h" #include "enums/simpletypes/move.h" #include "resources/beinginfo.h" diff --git a/src/enums/simpletypes/itemcolor.h b/src/enums/simpletypes/itemcolor.h index 55966596e..258144b30 100644 --- a/src/enums/simpletypes/itemcolor.h +++ b/src/enums/simpletypes/itemcolor.h @@ -24,6 +24,5 @@ #include "enums/simpletypes/intdefines.h" defIntEnum(ItemColor, uint16_t); -defIntEnumNeg(ItemColor); #endif // ENUMS_SIMPLETYPES_ITEMCOLOR_H diff --git a/src/flooritem.cpp b/src/flooritem.cpp index a833ff935..25222229f 100644 --- a/src/flooritem.cpp +++ b/src/flooritem.cpp @@ -34,8 +34,6 @@ #include "resources/iteminfo.h" -#include "resources/db/itemdb.h" - #include "resources/map/map.h" #include "net/serverfeatures.h" diff --git a/src/flooritem.h b/src/flooritem.h index 3e203adbd..71ae94b6f 100644 --- a/src/flooritem.h +++ b/src/flooritem.h @@ -112,8 +112,19 @@ class FloorItem final : public ActorSprite Cursor::Cursor getHoverCursor() const A_WARN_UNUSED { return mCursor; } - void setCards(const int *const cards, - int sz); + void setCards(const int *const cards, int sz); + + int getRefine() const A_WARN_UNUSED + { return mRefine; } + + int getItemType() const A_WARN_UNUSED + { return mItemType; } + + Identified getIdentified() const A_WARN_UNUSED + { return mIdentified; } + + Damaged getDamaged() const A_WARN_UNUSED + { return mDamaged; } private: int mCards[4]; diff --git a/src/gui/windows/insertcarddialog.cpp b/src/gui/windows/insertcarddialog.cpp index 607a41c6a..570f87666 100644 --- a/src/gui/windows/insertcarddialog.cpp +++ b/src/gui/windows/insertcarddialog.cpp @@ -39,7 +39,6 @@ InsertCardDialog::InsertCardDialog(const int itemIndex, const Item *const item) : SellDialog(false), - mItem(item), mItemIndex(itemIndex) { // TRANSLATORS: insert card dialog name diff --git a/src/gui/windows/insertcarddialog.h b/src/gui/windows/insertcarddialog.h index aa10c9a02..038e46354 100644 --- a/src/gui/windows/insertcarddialog.h +++ b/src/gui/windows/insertcarddialog.h @@ -45,7 +45,6 @@ class InsertCardDialog final : public SellDialog void sellAction(const ActionEvent &event) override final; private: - const Item *mItem; int mItemIndex; }; diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index 931acdf4a..6f1cac84d 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -60,8 +60,6 @@ #include "listeners/insertcardlistener.h" -#include "net/inventoryhandler.h" - #include "resources/iteminfo.h" #include "utils/delete2.h" diff --git a/src/gui/windows/updaterwindow.h b/src/gui/windows/updaterwindow.h index be8b67938..4e6f26136 100644 --- a/src/gui/windows/updaterwindow.h +++ b/src/gui/windows/updaterwindow.h @@ -40,7 +40,6 @@ class BrowserBox; class Button; class Label; class ProgressBar; -class ResourceManager; class ScrollArea; namespace Net diff --git a/src/net/charserverhandler.h b/src/net/charserverhandler.h index d663db093..6d0c58d7f 100644 --- a/src/net/charserverhandler.h +++ b/src/net/charserverhandler.h @@ -31,8 +31,6 @@ class CharSelectDialog; namespace Net { -class MessageIn; - struct Character; typedef std::list<Character*> Characters; diff --git a/src/net/ea/adminhandler.cpp b/src/net/ea/adminhandler.cpp index d73019467..6815164c4 100644 --- a/src/net/ea/adminhandler.cpp +++ b/src/net/ea/adminhandler.cpp @@ -22,15 +22,9 @@ #include "net/ea/adminhandler.h" -#include "notifymanager.h" - -#include "enums/resources/notifytypes.h" - #include "gui/chatconsts.h" #include "net/chathandler.h" -#include "net/messagein.h" -#include "net/serverfeatures.h" #include "utils/stringutils.h" diff --git a/src/net/ea/adminhandler.h b/src/net/ea/adminhandler.h index bf8ad7b06..9849f4e31 100644 --- a/src/net/ea/adminhandler.h +++ b/src/net/ea/adminhandler.h @@ -27,11 +27,6 @@ #include "localconsts.h" -namespace Net -{ - class MessageIn; -} - namespace Ea { diff --git a/src/net/ea/adminrecv.h b/src/net/ea/adminrecv.h index 47da05c59..159cc94ea 100644 --- a/src/net/ea/adminrecv.h +++ b/src/net/ea/adminrecv.h @@ -20,8 +20,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_EA_ADMIN_H -#define NET_EA_ADMIN_H +#ifndef NET_EA_ADMINRECV_H +#define NET_EA_ADMINRECV_H #include "localconsts.h" @@ -38,4 +38,4 @@ namespace Ea } // namespace Admin } // namespace Ea -#endif // NET_EA_ADMIN_H +#endif // NET_EA_ADMINRECV_H diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index 56fea0fc7..a1a8dfabb 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -22,24 +22,6 @@ #include "net/ea/beinghandler.h" -#include "actormanager.h" -#include "game.h" -#include "party.h" - -#include "being/localplayer.h" -#include "being/playerrelation.h" -#include "being/playerrelations.h" - -#include "enums/resources/map/mapitemtype.h" - -#include "gui/viewport.h" - -#include "gui/windows/socialwindow.h" - -#include "resources/map/map.h" - -#include "net/serverfeatures.h" - #include "net/ea/beingrecv.h" #include "debug.h" diff --git a/src/net/ea/beingrecv.cpp b/src/net/ea/beingrecv.cpp index 047b77653..72111e4e1 100644 --- a/src/net/ea/beingrecv.cpp +++ b/src/net/ea/beingrecv.cpp @@ -38,6 +38,7 @@ #include "resources/map/map.h" +#include "net/messagein.h" #include "net/serverfeatures.h" #include "debug.h" diff --git a/src/net/ea/beingrecv.h b/src/net/ea/beingrecv.h index 0fb51ebe7..9b77ce714 100644 --- a/src/net/ea/beingrecv.h +++ b/src/net/ea/beingrecv.h @@ -20,10 +20,20 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_EA_BEING_H -#define NET_EA_BEING_H +#ifndef NET_EA_BEINGRECV_H +#define NET_EA_BEINGRECV_H -#include "net/beinghandler.h" +#include "enums/simpletypes/beingid.h" +#include "enums/simpletypes/itemcolor.h" + +#include <string> + +namespace Net +{ + class MessageIn; +} + +class Being; namespace Ea { @@ -51,9 +61,6 @@ namespace Ea const bool isWeapon = false, const bool isTempSprite = false); } // namespace Being - } // namespace Ea -//extern bool Ea::BeingRecv::mSync; - -#endif // NET_EA_BEING_H +#endif // NET_EA_BEINGRECV_H diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp index 0b8734d49..f8d0ba84f 100644 --- a/src/net/ea/buysellhandler.cpp +++ b/src/net/ea/buysellhandler.cpp @@ -22,21 +22,7 @@ #include "net/ea/buysellhandler.h" -#include "inventory.h" -#include "notifymanager.h" - -#include "being/playerinfo.h" - -#include "enums/resources/notifytypes.h" - -#include "gui/windows/buydialog.h" -#include "gui/windows/buyselldialog.h" -#include "gui/windows/npcselldialog.h" - -#include "gui/widgets/createwidget.h" - #include "net/ea/buysellrecv.h" -#include "net/ea/eaprotocol.h" #include "debug.h" diff --git a/src/net/ea/buysellhandler.h b/src/net/ea/buysellhandler.h index 2afc82ee0..bfc8219d0 100644 --- a/src/net/ea/buysellhandler.h +++ b/src/net/ea/buysellhandler.h @@ -25,8 +25,6 @@ #include "net/buysellhandler.h" -class BuyDialog; - namespace Ea { diff --git a/src/net/ea/buysellrecv.cpp b/src/net/ea/buysellrecv.cpp index 14fa812f0..e49305a7f 100644 --- a/src/net/ea/buysellrecv.cpp +++ b/src/net/ea/buysellrecv.cpp @@ -35,6 +35,8 @@ #include "gui/widgets/createwidget.h" +#include "net/buysellhandler.h" + #include "net/ea/eaprotocol.h" #include "debug.h" diff --git a/src/net/ea/buysellrecv.h b/src/net/ea/buysellrecv.h index 1b6cd4518..e8b771856 100644 --- a/src/net/ea/buysellrecv.h +++ b/src/net/ea/buysellrecv.h @@ -23,7 +23,12 @@ #ifndef NET_EA_BUYSELLRECV_H #define NET_EA_BUYSELLRECV_H -#include "net/buysellhandler.h" +#include "enums/simpletypes/beingid.h" + +namespace Net +{ + class MessageIn; +} class BuyDialog; diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp index e46562085..0983a2007 100644 --- a/src/net/ea/charserverhandler.cpp +++ b/src/net/ea/charserverhandler.cpp @@ -22,20 +22,11 @@ #include "net/ea/charserverhandler.h" -#include "client.h" - -#include "gui/windows/charcreatedialog.h" -#include "gui/windows/okdialog.h" - -#include "gui/widgets/createwidget.h" +#include "net/serverinfo.h" #include "net/ea/eaprotocol.h" -#include "net/character.h" -#include "net/messagein.h" - #include "utils/dtor.h" -#include "utils/gettext.h" #include "debug.h" diff --git a/src/net/ea/charserverrecv.cpp b/src/net/ea/charserverrecv.cpp index 8435f0caf..7b04c05b0 100644 --- a/src/net/ea/charserverrecv.cpp +++ b/src/net/ea/charserverrecv.cpp @@ -29,12 +29,10 @@ #include "gui/widgets/createwidget.h" -#include "net/ea/eaprotocol.h" - #include "net/character.h" +#include "net/charserverhandler.h" #include "net/messagein.h" -#include "utils/dtor.h" #include "utils/gettext.h" #include "debug.h" diff --git a/src/net/ea/charserverrecv.h b/src/net/ea/charserverrecv.h index 8f5d233c5..0d2c4c27a 100644 --- a/src/net/ea/charserverrecv.h +++ b/src/net/ea/charserverrecv.h @@ -23,8 +23,6 @@ #ifndef NET_EA_CHARSERVERRECV_H #define NET_EA_CHARSERVERRECV_H -#include "net/charserverhandler.h" - namespace Net { class MessageIn; diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp index fd47bc48f..aa2377c7b 100644 --- a/src/net/ea/chathandler.cpp +++ b/src/net/ea/chathandler.cpp @@ -22,24 +22,10 @@ #include "net/ea/chathandler.h" -#include "actormanager.h" #include "configuration.h" -#include "notifymanager.h" - -#include "being/being.h" - -#include "enums/resources/notifytypes.h" - -#include "gui/windows/chatwindow.h" - -#include "gui/widgets/tabs/chat/chattab.h" - -#include "net/messagein.h" #include "net/ea/chatrecv.h" -#include "utils/gettext.h" - #include "debug.h" namespace Ea diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h index a71f63e83..87dd4f2c3 100644 --- a/src/net/ea/chathandler.h +++ b/src/net/ea/chathandler.h @@ -27,11 +27,6 @@ #include <queue> -namespace Net -{ - class MessageIn; -} - namespace Ea { diff --git a/src/net/ea/chatrecv.cpp b/src/net/ea/chatrecv.cpp index 3f11ab0e1..9c7e5ccdd 100644 --- a/src/net/ea/chatrecv.cpp +++ b/src/net/ea/chatrecv.cpp @@ -78,7 +78,7 @@ std::string ChatRecv::getLastWhisperNick() } void ChatRecv::processWhisperResponseContinue(Net::MessageIn &msg, - const uint8_t type) + const uint8_t type) { const std::string nick = getPopLastWhisperNick(); switch (type) diff --git a/src/net/ea/chatrecv.h b/src/net/ea/chatrecv.h index c84f38b62..c01bd7fe9 100644 --- a/src/net/ea/chatrecv.h +++ b/src/net/ea/chatrecv.h @@ -23,8 +23,7 @@ #ifndef NET_EA_CHATRECV_H #define NET_EA_CHATRECV_H -#include "net/chathandler.h" - +#include <string> #include <queue> namespace Net diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp index 4f8734e92..fb8e76832 100644 --- a/src/net/ea/gamehandler.cpp +++ b/src/net/ea/gamehandler.cpp @@ -22,22 +22,10 @@ #include "net/ea/gamehandler.h" -#include "client.h" #include "game.h" -#include "notifymanager.h" - -#include "enums/resources/notifytypes.h" - -#include "gui/windows/okdialog.h" - -#include "gui/widgets/createwidget.h" - -#include "net/messagein.h" #include "net/ea/gamerecv.h" -#include "utils/gettext.h" - #include "debug.h" namespace Ea diff --git a/src/net/ea/gamehandler.h b/src/net/ea/gamehandler.h index 17834b333..9a6c1aeae 100644 --- a/src/net/ea/gamehandler.h +++ b/src/net/ea/gamehandler.h @@ -23,15 +23,8 @@ #ifndef NET_EA_GAMEHANDLER_H #define NET_EA_GAMEHANDLER_H -#include "enums/simpletypes/beingid.h" - #include "net/gamehandler.h" -namespace Net -{ - class MessageIn; -} - namespace Ea { diff --git a/src/net/ea/gamerecv.cpp b/src/net/ea/gamerecv.cpp index 73fe3a01e..3a85e54a9 100644 --- a/src/net/ea/gamerecv.cpp +++ b/src/net/ea/gamerecv.cpp @@ -23,7 +23,6 @@ #include "net/ea/gamerecv.h" #include "client.h" -#include "game.h" #include "notifymanager.h" #include "enums/resources/notifytypes.h" @@ -45,7 +44,7 @@ namespace GameRecv { std::string mMap; BeingId mCharID = BeingId_zero; -} // namespace GameRev +} // namespace GameRecv void GameRecv::processWhoAnswer(Net::MessageIn &msg) { diff --git a/src/net/ea/gamerecv.h b/src/net/ea/gamerecv.h index a35b13825..7b127df7e 100644 --- a/src/net/ea/gamerecv.h +++ b/src/net/ea/gamerecv.h @@ -25,7 +25,7 @@ #include "enums/simpletypes/beingid.h" -#include "net/gamehandler.h" +#include <string> namespace Net { diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp index 2bc7ba02d..739e42940 100644 --- a/src/net/ea/guildhandler.cpp +++ b/src/net/ea/guildhandler.cpp @@ -21,26 +21,11 @@ #include "net/ea/guildhandler.h" -#include "actormanager.h" -#include "notifymanager.h" - -#include "being/localplayer.h" -#include "being/playerinfo.h" - -#include "enums/resources/notifytypes.h" - -#include "gui/windows/skilldialog.h" -#include "gui/windows/socialwindow.h" - -#include "net/messagein.h" - #include "net/ea/guildrecv.h" #include "gui/widgets/tabs/chat/guildtab.h" #include "utils/delete2.h" -#include "utils/gettext.h" -#include "utils/stringutils.h" #include "debug.h" diff --git a/src/net/ea/guildhandler.h b/src/net/ea/guildhandler.h index a03ff5b64..93cb4a597 100644 --- a/src/net/ea/guildhandler.h +++ b/src/net/ea/guildhandler.h @@ -24,11 +24,6 @@ #include "net/guildhandler.h" -namespace Net -{ - class MessageIn; -} - class GuildTab; namespace Ea diff --git a/src/net/ea/guildrecv.cpp b/src/net/ea/guildrecv.cpp index a28818924..504895c54 100644 --- a/src/net/ea/guildrecv.cpp +++ b/src/net/ea/guildrecv.cpp @@ -22,6 +22,7 @@ #include "net/ea/guildrecv.h" #include "actormanager.h" +#include "guild.h" #include "notifymanager.h" #include "being/localplayer.h" diff --git a/src/net/ea/guildrecv.h b/src/net/ea/guildrecv.h index 542243c83..efdb7289d 100644 --- a/src/net/ea/guildrecv.h +++ b/src/net/ea/guildrecv.h @@ -22,14 +22,14 @@ #ifndef NET_EA_GUILDRECV_H #define NET_EA_GUILDRECV_H -#include "net/guildhandler.h" +#include <string> namespace Net { class MessageIn; } -class GuildTab; +class Guild; namespace Ea { diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index e4409278c..8d3ad6c9f 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -22,26 +22,11 @@ #include "net/ea/inventoryhandler.h" -#include "notifymanager.h" - -#include "being/localplayer.h" - -#include "enums/equipslot.h" - -#include "enums/resources/notifytypes.h" - -#include "gui/widgets/createwidget.h" - -#include "net/messagein.h" - -#include "net/ea/eaprotocol.h" #include "net/ea/equipbackend.h" #include "net/ea/inventoryrecv.h" #include "utils/delete2.h" -#include "listeners/arrowslistener.h" - #include "debug.h" namespace Ea diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h index 3883ab0d4..ffac7e282 100644 --- a/src/net/ea/inventoryhandler.h +++ b/src/net/ea/inventoryhandler.h @@ -33,17 +33,9 @@ #include <queue> -namespace Net -{ - class MessageIn; -} - namespace Ea { -class EquipBackend; - -typedef std::vector<InventoryItem> InventoryItems; typedef std::queue<BeingId> PickupQueue; class InventoryHandler notfinal : public Net::InventoryHandler diff --git a/src/net/ea/inventoryitem.h b/src/net/ea/inventoryitem.h index d4d9c3637..4b18a542b 100644 --- a/src/net/ea/inventoryitem.h +++ b/src/net/ea/inventoryitem.h @@ -35,6 +35,8 @@ #include <stdint.h> #endif +#include <vector> + #include "localconsts.h" namespace Ea @@ -87,6 +89,8 @@ class InventoryItem final } }; +typedef std::vector<InventoryItem> InventoryItems; + } // namespace Ea #endif // NET_EA_INVENTORYITEM_H diff --git a/src/net/ea/inventoryrecv.cpp b/src/net/ea/inventoryrecv.cpp index 810743d26..e7c1afb62 100644 --- a/src/net/ea/inventoryrecv.cpp +++ b/src/net/ea/inventoryrecv.cpp @@ -32,6 +32,7 @@ #include "gui/widgets/createwidget.h" +#include "net/inventoryhandler.h" #include "net/messagein.h" #include "net/ea/eaprotocol.h" @@ -79,7 +80,7 @@ namespace InventoryRecv Inventory *mStorage = nullptr; PickupQueue mSentPickups; bool mDebugInventory = true; -} +} // namespace InventoryRecv void InventoryRecv::processPlayerInventoryRemove(Net::MessageIn &msg) { diff --git a/src/net/ea/inventoryrecv.h b/src/net/ea/inventoryrecv.h index b5ba2a4df..a55d88716 100644 --- a/src/net/ea/inventoryrecv.h +++ b/src/net/ea/inventoryrecv.h @@ -27,8 +27,6 @@ #include "enums/simpletypes/beingid.h" -#include "net/inventoryhandler.h" - #include "net/ea/inventoryitem.h" #include <queue> @@ -38,12 +36,12 @@ namespace Net class MessageIn; } +class Inventory; + namespace Ea { - class EquipBackend; - typedef std::vector<InventoryItem> InventoryItems; typedef std::queue<BeingId> PickupQueue; namespace InventoryRecv diff --git a/src/net/ea/itemhandler.cpp b/src/net/ea/itemhandler.cpp index 19b1e919d..61ec35f96 100644 --- a/src/net/ea/itemhandler.cpp +++ b/src/net/ea/itemhandler.cpp @@ -22,12 +22,6 @@ #include "net/ea/itemhandler.h" -#include "actormanager.h" - -#include "net/messagein.h" - -#include "net/ea/itemrecv.h" - #include "debug.h" namespace Ea diff --git a/src/net/ea/itemhandler.h b/src/net/ea/itemhandler.h index f8365990b..687f81d81 100644 --- a/src/net/ea/itemhandler.h +++ b/src/net/ea/itemhandler.h @@ -25,11 +25,6 @@ #include "localconsts.h" -namespace Net -{ - class MessageIn; -} - namespace Ea { diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp index 0958434f0..e87650a29 100644 --- a/src/net/ea/loginhandler.cpp +++ b/src/net/ea/loginhandler.cpp @@ -24,18 +24,12 @@ #include "client.h" #include "configuration.h" +#include "logger.h" #include "settings.h" -#include "being/being.h" - -#include "gui/windows/logindialog.h" - #include "utils/dtor.h" -#include "utils/gettext.h" -#include "utils/paths.h" #include "net/logindata.h" -#include "net/messagein.h" #include "net/ea/loginrecv.h" #include "net/ea/token.h" diff --git a/src/net/ea/loginhandler.h b/src/net/ea/loginhandler.h index 9dc559dab..b4a36a4fa 100644 --- a/src/net/ea/loginhandler.h +++ b/src/net/ea/loginhandler.h @@ -31,11 +31,6 @@ class LoginData; struct Token; -namespace Net -{ - class MessageIn; -} - namespace Ea { diff --git a/src/net/ea/loginrecv.cpp b/src/net/ea/loginrecv.cpp index e3430bac8..6ebfa90c8 100644 --- a/src/net/ea/loginrecv.cpp +++ b/src/net/ea/loginrecv.cpp @@ -24,17 +24,16 @@ #include "client.h" #include "configuration.h" -#include "settings.h" #include "being/being.h" #include "gui/windows/logindialog.h" -#include "utils/dtor.h" #include "utils/gettext.h" #include "utils/paths.h" #include "net/logindata.h" +#include "net/loginhandler.h" #include "net/messagein.h" #include "net/ea/token.h" diff --git a/src/net/ea/loginrecv.h b/src/net/ea/loginrecv.h index 07e2f14bf..2f2c509a3 100644 --- a/src/net/ea/loginrecv.h +++ b/src/net/ea/loginrecv.h @@ -23,13 +23,13 @@ #ifndef NET_EA_LOGINRECV_H #define NET_EA_LOGINRECV_H -#include "net/loginhandler.h" +#include "net/worldinfo.h" -#include "net/registrationoptions.h" +#include "net/ea/token.h" -class LoginData; +#include <string> -struct Token; +class LoginData; namespace Net { diff --git a/src/net/ea/npchandler.cpp b/src/net/ea/npchandler.cpp index 78ed6de53..237c4e749 100644 --- a/src/net/ea/npchandler.cpp +++ b/src/net/ea/npchandler.cpp @@ -22,16 +22,8 @@ #include "net/ea/npchandler.h" -#include "gui/viewport.h" - -#include "gui/windows/npcdialog.h" - -#include "net/messagein.h" - #include "net/ea/npcrecv.h" -#include "utils/langs.h" - #include "debug.h" namespace Ea diff --git a/src/net/ea/npchandler.h b/src/net/ea/npchandler.h index 98321d29f..4a33062ec 100644 --- a/src/net/ea/npchandler.h +++ b/src/net/ea/npchandler.h @@ -27,13 +27,6 @@ #include "localconsts.h" -class NpcDialog; - -namespace Net -{ - class MessageIn; -} - namespace Ea { diff --git a/src/net/ea/npcrecv.cpp b/src/net/ea/npcrecv.cpp index 08d0ed498..e38a06531 100644 --- a/src/net/ea/npcrecv.cpp +++ b/src/net/ea/npcrecv.cpp @@ -27,6 +27,7 @@ #include "gui/windows/npcdialog.h" #include "net/messagein.h" +#include "net/npchandler.h" #include "utils/langs.h" diff --git a/src/net/ea/npcrecv.h b/src/net/ea/npcrecv.h index eb1808465..26e626d85 100644 --- a/src/net/ea/npcrecv.h +++ b/src/net/ea/npcrecv.h @@ -23,8 +23,6 @@ #ifndef NET_EA_NPCRECV_H #define NET_EA_NPCRECV_H -#include "net/npchandler.h" - #include "localconsts.h" class NpcDialog; diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index 0797e6e55..4ffbc27ef 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -21,20 +21,8 @@ #include "net/ea/partyhandler.h" -#include "actormanager.h" -#include "configuration.h" -#include "notifymanager.h" #include "party.h" -#include "being/localplayer.h" - -#include "enums/resources/notifytypes.h" - -#include "gui/windows/chatwindow.h" -#include "gui/windows/socialwindow.h" - -#include "net/messagein.h" - #include "net/ea/partyrecv.h" #include "gui/widgets/tabs/chat/partytab.h" diff --git a/src/net/ea/partyhandler.h b/src/net/ea/partyhandler.h index 1848d5316..2dc8e5c87 100644 --- a/src/net/ea/partyhandler.h +++ b/src/net/ea/partyhandler.h @@ -26,11 +26,6 @@ class Party; -namespace Net -{ - class MessageIn; -} - namespace Ea { class PartyHandler notfinal : public Net::PartyHandler diff --git a/src/net/ea/partyrecv.cpp b/src/net/ea/partyrecv.cpp index 415129f41..99b746e5b 100644 --- a/src/net/ea/partyrecv.cpp +++ b/src/net/ea/partyrecv.cpp @@ -61,8 +61,8 @@ void PartyRecv::processPartyCreate(Net::MessageIn &msg) } void PartyRecv::processPartySettingsContinue(Net::MessageIn &msg, - const PartyShareT exp, - const PartyShareT item) + const PartyShareT exp, + const PartyShareT item) { switch (exp) { diff --git a/src/net/ea/partyrecv.h b/src/net/ea/partyrecv.h index 87452318f..d80be62dc 100644 --- a/src/net/ea/partyrecv.h +++ b/src/net/ea/partyrecv.h @@ -22,7 +22,7 @@ #ifndef NET_EA_PARTYRECV_H #define NET_EA_PARTYRECV_H -#include "net/partyhandler.h" +#include "enums/net/partyshare.h" class Party; diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp index 6a938a478..5b19f912b 100644 --- a/src/net/eathena/adminhandler.cpp +++ b/src/net/eathena/adminhandler.cpp @@ -22,8 +22,6 @@ #include "net/eathena/adminhandler.h" -#include "logger.h" - #include "being/being.h" #include "net/ea/adminrecv.h" diff --git a/src/net/eathena/adminrecv.cpp b/src/net/eathena/adminrecv.cpp index e88843c79..57ddf11e7 100644 --- a/src/net/eathena/adminrecv.cpp +++ b/src/net/eathena/adminrecv.cpp @@ -22,10 +22,7 @@ #include "logger.h" -#include "being/being.h" - -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/messagein.h" #include "debug.h" diff --git a/src/net/eathena/adminrecv.h b/src/net/eathena/adminrecv.h index 5be80e996..e2f4f359c 100644 --- a/src/net/eathena/adminrecv.h +++ b/src/net/eathena/adminrecv.h @@ -18,10 +18,13 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_EATHENA_ADMIN_H -#define NET_EATHENA_ADMIN_H +#ifndef NET_EATHENA_ADMINRECV_H +#define NET_EATHENA_ADMINRECV_H -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { @@ -33,4 +36,4 @@ namespace EAthena } // namespace Admin } // namespace EAthena -#endif // NET_EATHENA_ADMIN_H +#endif // NET_EATHENA_ADMINRECV_H diff --git a/src/net/eathena/auctionhandler.cpp b/src/net/eathena/auctionhandler.cpp index ddce77077..e84a29cec 100644 --- a/src/net/eathena/auctionhandler.cpp +++ b/src/net/eathena/auctionhandler.cpp @@ -21,7 +21,6 @@ #include "net/eathena/auctionhandler.h" #include "item.h" -#include "logger.h" #include "net/ea/eaprotocol.h" diff --git a/src/net/eathena/auctionrecv.cpp b/src/net/eathena/auctionrecv.cpp index 4f1beddec..d4e24f8e7 100644 --- a/src/net/eathena/auctionrecv.cpp +++ b/src/net/eathena/auctionrecv.cpp @@ -22,7 +22,7 @@ #include "logger.h" -#include "net/eathena/messagein.h" +#include "net/messagein.h" #include "debug.h" diff --git a/src/net/eathena/auctionrecv.h b/src/net/eathena/auctionrecv.h index 583e873b9..cdd04b518 100644 --- a/src/net/eathena/auctionrecv.h +++ b/src/net/eathena/auctionrecv.h @@ -18,14 +18,15 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_EATHENA_AUCTION_H -#define NET_EATHENA_AUCTION_H +#ifndef NET_EATHENA_AUCTIONRECV_H +#define NET_EATHENA_AUCTIONRECV_H #ifdef EATHENA_SUPPORT -#include "net/auctionhandler.h" - -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { @@ -40,4 +41,4 @@ namespace EAthena } // namespace EAthena #endif // EATHENA_SUPPORT -#endif // NET_EATHENA_AUCTION_H +#endif // NET_EATHENA_AUCTIONRECV_H diff --git a/src/net/eathena/bankhandler.cpp b/src/net/eathena/bankhandler.cpp index f4be79dec..48bf2f425 100644 --- a/src/net/eathena/bankhandler.cpp +++ b/src/net/eathena/bankhandler.cpp @@ -20,12 +20,6 @@ #include "net/eathena/bankhandler.h" -#include "notifymanager.h" - -#include "enums/resources/notifytypes.h" - -#include "listeners/banklistener.h" - #include "net/eathena/bankrecv.h" #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" diff --git a/src/net/eathena/bankrecv.cpp b/src/net/eathena/bankrecv.cpp index d50984dcf..d70f589ae 100644 --- a/src/net/eathena/bankrecv.cpp +++ b/src/net/eathena/bankrecv.cpp @@ -26,6 +26,8 @@ #include "listeners/banklistener.h" +#include "net/messagein.h" + #include "debug.h" namespace EAthena diff --git a/src/net/eathena/bankrecv.h b/src/net/eathena/bankrecv.h index 95bf8e1da..32b22445c 100644 --- a/src/net/eathena/bankrecv.h +++ b/src/net/eathena/bankrecv.h @@ -18,14 +18,15 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_EATHENA_BANK_H -#define NET_EATHENA_BANK_H +#ifndef NET_EATHENA_BANKRECV_H +#define NET_EATHENA_BANKRECV_H #ifdef EATHENA_SUPPORT -#include "net/bankhandler.h" - -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { @@ -38,4 +39,4 @@ namespace EAthena } // namespace EAthena #endif // EATHENA_SUPPORT -#endif // NET_EATHENA_BANK_H +#endif // NET_EATHENA_BANKRECV_H diff --git a/src/net/eathena/battlegroundhandler.cpp b/src/net/eathena/battlegroundhandler.cpp index 536c8c850..1a8403444 100644 --- a/src/net/eathena/battlegroundhandler.cpp +++ b/src/net/eathena/battlegroundhandler.cpp @@ -20,8 +20,6 @@ #include "net/eathena/battlegroundhandler.h" -#include "logger.h" - #include "net/eathena/battlegroundrecv.h" #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" diff --git a/src/net/eathena/battlegroundrecv.cpp b/src/net/eathena/battlegroundrecv.cpp index afda89171..72bfe7d3c 100644 --- a/src/net/eathena/battlegroundrecv.cpp +++ b/src/net/eathena/battlegroundrecv.cpp @@ -22,6 +22,8 @@ #include "logger.h" +#include "net/messagein.h" + #include "debug.h" namespace EAthena diff --git a/src/net/eathena/battlegroundrecv.h b/src/net/eathena/battlegroundrecv.h index 43c0e7fe1..912580203 100644 --- a/src/net/eathena/battlegroundrecv.h +++ b/src/net/eathena/battlegroundrecv.h @@ -18,12 +18,15 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_EATHENA_BATTLEGROUND_H -#define NET_EATHENA_BATTLEGROUND_H +#ifndef NET_EATHENA_BATTLEGROUNDRECV_H +#define NET_EATHENA_BATTLEGROUNDRECV_H #ifdef EATHENA_SUPPORT -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { @@ -41,4 +44,4 @@ namespace EAthena } // namespace EAthena #endif // EATHENA_SUPPORT -#endif // NET_EATHENA_BATTLEGROUND_H +#endif // NET_EATHENA_BATTLEGROUNDRECV_H diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 6273d2202..664ccdca5 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -22,48 +22,13 @@ #include "net/eathena/beinghandler.h" -#include "actormanager.h" -#include "effectmanager.h" -#include "game.h" -#include "itemcolormanager.h" -#include "notifymanager.h" -#include "party.h" - -#include "being/mercenaryinfo.h" - -#include "enums/resources/notifytypes.h" - -#include "particle/particle.h" - -#include "input/keyboardconfig.h" - -#include "gui/windows/skilldialog.h" -#include "gui/windows/socialwindow.h" -#include "gui/windows/outfitwindow.h" - -#include "net/serverfeatures.h" - -#include "net/ea/eaprotocol.h" - -#include "net/charserverhandler.h" - -#include "net/character.h" - #include "net/ea/beingrecv.h" #include "net/eathena/beingrecv.h" -#include "net/eathena/maptypeproperty2.h" #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" #include "net/eathena/sprite.h" -#include "resources/iteminfo.h" -#include "resources/db/itemdb.h" - -#include "resources/map/map.h" - -#include "utils/timer.h" - #include "debug.h" extern Net::BeingHandler *beingHandler; diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h index 1a439c807..d47ec2f98 100644 --- a/src/net/eathena/beinghandler.h +++ b/src/net/eathena/beinghandler.h @@ -25,7 +25,6 @@ #include "net/ea/beinghandler.h" -#include "net/eathena/beingtype.h" #include "net/eathena/messagehandler.h" namespace EAthena diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp index c9c942023..977e95696 100644 --- a/src/net/eathena/beingrecv.cpp +++ b/src/net/eathena/beingrecv.cpp @@ -49,10 +49,9 @@ #include "net/charserverhandler.h" #include "net/character.h" +#include "net/messagein.h" #include "net/eathena/maptypeproperty2.h" -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" #include "net/eathena/sprite.h" #include "resources/iteminfo.h" @@ -136,7 +135,7 @@ void BeingRecv::processBeingChangeLookContinue(Net::MessageIn &msg, const uint8_t type, const int id, const int id2, - const int *cards A_UNUSED) + const int *cards) { if (dstBeing->getType() == ActorType::Player) dstBeing->setOtherTime(); @@ -322,7 +321,8 @@ void BeingRecv::processBeingVisible(Net::MessageIn &msg) const uint16_t headTop = msg.readInt16("head top"); const uint16_t headMid = msg.readInt16("head mid"); - const ItemColor hairColor = fromInt(msg.readInt16("hair color"), ItemColor); + const ItemColor hairColor = fromInt(msg.readInt16("hair color"), + ItemColor); const uint16_t shoes = msg.readInt16("shoes or clothes color?"); const uint16_t gloves = msg.readInt16("head dir / gloves"); diff --git a/src/net/eathena/beingrecv.h b/src/net/eathena/beingrecv.h index 137143143..597cd9544 100644 --- a/src/net/eathena/beingrecv.h +++ b/src/net/eathena/beingrecv.h @@ -20,13 +20,31 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_EATHENA_BEING_H -#define NET_EATHENA_BEING_H - -#include "net/ea/beinghandler.h" +#ifndef NET_EATHENA_BEINGRECV_H +#define NET_EATHENA_BEINGRECV_H #include "net/eathena/beingtype.h" -#include "net/eathena/messagehandler.h" + +#include "enums/simpletypes/beingid.h" + +#if defined(__GXX_EXPERIMENTAL_CXX0X__) +#if defined(__APPLE__) +#include <tr1/cstdint> +#else +#include <cstdint> +#endif +#else +#include <stdint.h> +#endif + +#include "localconsts.h" + +namespace Net +{ + class MessageIn; +} + +class Being; namespace EAthena { @@ -98,4 +116,4 @@ namespace EAthena } // namespace BeingRecv } // namespace EAthena -#endif // NET_EATHENA_BEING_H +#endif // NET_EATHENA_BEINGRECV_H diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp index 9b990fe7e..c6673e588 100644 --- a/src/net/eathena/buyingstorehandler.cpp +++ b/src/net/eathena/buyingstorehandler.cpp @@ -20,24 +20,11 @@ #include "net/eathena/buyingstorehandler.h" -#include "actormanager.h" -#include "inventory.h" -#include "notifymanager.h" #include "shopitem.h" -#include "being/localplayer.h" +#include "being/being.h" #include "being/playerinfo.h" -#include "enums/resources/notifytypes.h" - -#include "gui/windows/buyingstoreselldialog.h" - -#include "gui/widgets/createwidget.h" - -#include "listeners/arrowslistener.h" -#include "listeners/buyingstoremodelistener.h" -#include "listeners/buyingstoreslotslistener.h" - #include "net/ea/eaprotocol.h" #include "net/eathena/buyingstorerecv.h" diff --git a/src/net/eathena/buyingstorerecv.cpp b/src/net/eathena/buyingstorerecv.cpp index 1a9d3897d..5094abfef 100644 --- a/src/net/eathena/buyingstorerecv.cpp +++ b/src/net/eathena/buyingstorerecv.cpp @@ -22,8 +22,8 @@ #include "actormanager.h" #include "inventory.h" +#include "item.h" #include "notifymanager.h" -#include "shopitem.h" #include "being/localplayer.h" #include "being/playerinfo.h" @@ -38,10 +38,9 @@ #include "listeners/buyingstoremodelistener.h" #include "listeners/buyingstoreslotslistener.h" -#include "net/ea/eaprotocol.h" +#include "net/messagein.h" -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/ea/eaprotocol.h" #include "debug.h" @@ -164,8 +163,7 @@ void BuyingStoreRecv::processBuyingStoreSellFailed(Net::MessageIn &msg) } } -void BuyingStoreRecv::processBuyingStoreSellerSellFailed(Net::MessageIn - &msg) +void BuyingStoreRecv::processBuyingStoreSellerSellFailed(Net::MessageIn &msg) { const int16_t result = msg.readInt16("result"); msg.readInt16("item id"); diff --git a/src/net/eathena/buyingstorerecv.h b/src/net/eathena/buyingstorerecv.h index da4e338e8..df7dc9e11 100644 --- a/src/net/eathena/buyingstorerecv.h +++ b/src/net/eathena/buyingstorerecv.h @@ -23,9 +23,10 @@ #ifdef EATHENA_SUPPORT -#include "net/buyingstorehandler.h" - -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { diff --git a/src/net/eathena/buysellhandler.cpp b/src/net/eathena/buysellhandler.cpp index d5027335a..ea15b1ac3 100644 --- a/src/net/eathena/buysellhandler.cpp +++ b/src/net/eathena/buysellhandler.cpp @@ -22,16 +22,6 @@ #include "net/eathena/buysellhandler.h" -#include "notifymanager.h" - -#include "being/playerinfo.h" - -#include "enums/resources/notifytypes.h" - -#include "gui/windows/buydialog.h" - -#include "gui/widgets/createwidget.h" - #include "net/ea/buysellrecv.h" #include "net/eathena/buysellrecv.h" diff --git a/src/net/eathena/buysellrecv.cpp b/src/net/eathena/buysellrecv.cpp index 23786a435..5dfda9937 100644 --- a/src/net/eathena/buysellrecv.cpp +++ b/src/net/eathena/buysellrecv.cpp @@ -34,8 +34,7 @@ #include "net/ea/buysellrecv.h" -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/messagein.h" #include "debug.h" diff --git a/src/net/eathena/buysellrecv.h b/src/net/eathena/buysellrecv.h index 6c524572f..14a4d199e 100644 --- a/src/net/eathena/buysellrecv.h +++ b/src/net/eathena/buysellrecv.h @@ -23,9 +23,10 @@ #ifndef NET_EATHENA_BUYSELLRECV_H #define NET_EATHENA_BUYSELLRECV_H -#include "net/ea/buysellhandler.h" - -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { diff --git a/src/net/eathena/cashshophandler.cpp b/src/net/eathena/cashshophandler.cpp index 7390ae600..53888cf46 100644 --- a/src/net/eathena/cashshophandler.cpp +++ b/src/net/eathena/cashshophandler.cpp @@ -20,12 +20,6 @@ #include "net/eathena/cashshophandler.h" -#include "being/playerinfo.h" - -#include "gui/windows/buydialog.h" - -#include "gui/widgets/createwidget.h" - #include "net/eathena/cashshoprecv.h" #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" diff --git a/src/net/eathena/cashshophandler.h b/src/net/eathena/cashshophandler.h index fd776c923..e5f057663 100644 --- a/src/net/eathena/cashshophandler.h +++ b/src/net/eathena/cashshophandler.h @@ -27,8 +27,6 @@ #include "net/eathena/messagehandler.h" -class BuyDialog; - namespace EAthena { class CashShopHandler final : public MessageHandler, diff --git a/src/net/eathena/cashshoprecv.cpp b/src/net/eathena/cashshoprecv.cpp index a25a44406..3cf22fcec 100644 --- a/src/net/eathena/cashshoprecv.cpp +++ b/src/net/eathena/cashshoprecv.cpp @@ -20,14 +20,15 @@ #include "net/eathena/cashshoprecv.h" +#include "logger.h" + #include "being/playerinfo.h" #include "gui/windows/buydialog.h" #include "gui/widgets/createwidget.h" -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/messagein.h" #include "debug.h" diff --git a/src/net/eathena/cashshoprecv.h b/src/net/eathena/cashshoprecv.h index 1dee0df5f..464fcee51 100644 --- a/src/net/eathena/cashshoprecv.h +++ b/src/net/eathena/cashshoprecv.h @@ -23,9 +23,10 @@ #ifdef EATHENA_SUPPORT -#include "net/cashshophandler.h" - -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} class BuyDialog; diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 83c3c7c4c..1fe9b1268 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -22,18 +22,9 @@ #include "net/eathena/charserverhandler.h" -#include "client.h" -#include "configuration.h" -#include "settings.h" - #include "gui/windows/charcreatedialog.h" -#include "gui/windows/charselectdialog.h" -#include "gui/windows/okdialog.h" - -#include "gui/widgets/createwidget.h" #include "net/character.h" -#include "net/playerhandler.h" #include "net/serverfeatures.h" #include "net/ea/token.h" @@ -41,19 +32,10 @@ #include "net/ea/charserverrecv.h" #include "net/eathena/charserverrecv.h" -#include "net/eathena/gamehandler.h" #include "net/eathena/loginhandler.h" #include "net/eathena/messageout.h" #include "net/eathena/network.h" #include "net/eathena/protocol.h" -#include "net/eathena/sprite.h" - -#include "resources/iteminfo.h" - -#include "resources/db/itemdb.h" - -#include "utils/dtor.h" -#include "utils/gettext.h" #include "debug.h" diff --git a/src/net/eathena/charserverrecv.cpp b/src/net/eathena/charserverrecv.cpp index 62be4a694..2b908e794 100644 --- a/src/net/eathena/charserverrecv.cpp +++ b/src/net/eathena/charserverrecv.cpp @@ -38,6 +38,8 @@ #include "net/ea/token.h" +#include "net/messagein.h" + #include "net/eathena/gamehandler.h" #include "net/eathena/loginhandler.h" #include "net/eathena/messageout.h" diff --git a/src/net/eathena/charserverrecv.h b/src/net/eathena/charserverrecv.h index 1df9a7e5e..b98885be4 100644 --- a/src/net/eathena/charserverrecv.h +++ b/src/net/eathena/charserverrecv.h @@ -23,9 +23,15 @@ #ifndef NET_EATHENA_CHARSERVERRECV_H #define NET_EATHENA_CHARSERVERRECV_H -#include "net/ea/charserverhandler.h" +#include "enums/simpletypes/beingid.h" -#include "net/eathena/messagehandler.h" +#include <string> + +namespace Net +{ + class Character; + class MessageIn; +} namespace EAthena { diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 5501f25ab..9ef9b5d3b 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -22,23 +22,8 @@ #include "net/eathena/chathandler.h" -#include "actormanager.h" -#include "notifymanager.h" - #include "being/localplayer.h" -#include "being/playerinfo.h" -#include "being/playerrelation.h" -#include "being/playerrelations.h" - -#include "enums/resources/notifytypes.h" - -#include "gui/chatconsts.h" -#include "gui/windows/chatwindow.h" - -#include "gui/widgets/tabs/chat/chattab.h" - -#include "net/mercenaryhandler.h" #include "net/serverfeatures.h" #include "net/ea/chatrecv.h" @@ -48,7 +33,7 @@ #include "net/eathena/protocol.h" #include "resources/chatobject.h" -#include "utils/gettext.h" + #include "utils/stringutils.h" #include "debug.h" diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h index 7fd56cd3c..a9a92452e 100644 --- a/src/net/eathena/chathandler.h +++ b/src/net/eathena/chathandler.h @@ -25,8 +25,6 @@ #include "net/ea/chathandler.h" -#include "enums/gui/chatmsgtype.h" - #include "net/eathena/messagehandler.h" namespace EAthena diff --git a/src/net/eathena/chatrecv.cpp b/src/net/eathena/chatrecv.cpp index f058593c9..40281384a 100644 --- a/src/net/eathena/chatrecv.cpp +++ b/src/net/eathena/chatrecv.cpp @@ -38,13 +38,11 @@ #include "gui/widgets/tabs/chat/chattab.h" -#include "net/serverfeatures.h" +#include "net/messagein.h" #include "net/ea/chatrecv.h" #include "net/eathena/mercenaryrecv.h" -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" #include "resources/chatobject.h" #include "utils/gettext.h" @@ -52,8 +50,6 @@ #include "debug.h" -extern Net::ChatHandler *chatHandler; - namespace EAthena { @@ -239,7 +235,7 @@ std::string ChatRecv::extractChannelFromMessage(std::string &chatMsg) } void ChatRecv::processChatContinue(std::string chatMsg, - ChatMsgTypeT own) + ChatMsgTypeT own) { const std::string channel = extractChannelFromMessage(chatMsg); bool allow(true); @@ -466,7 +462,7 @@ void ChatRecv::processJoinChannel(Net::MessageIn &msg) } void ChatRecv::processWhisperContinue(const std::string &nick, - std::string chatMsg) + std::string chatMsg) { // ignoring future whisper messages if (chatMsg.find("\302\202G") == 0 || chatMsg.find("\302\202A") == 0) diff --git a/src/net/eathena/chatrecv.h b/src/net/eathena/chatrecv.h index fcef0085e..d05af44cd 100644 --- a/src/net/eathena/chatrecv.h +++ b/src/net/eathena/chatrecv.h @@ -23,16 +23,17 @@ #ifndef NET_EATHENA_CHATRECV_H #define NET_EATHENA_CHATRECV_H -#include "net/ea/chathandler.h" - #include "enums/gui/chatmsgtype.h" -#include "net/eathena/messagehandler.h" +#include <string> -namespace EAthena +namespace Net { - class MessageOut; + class MessageIn; +} +namespace EAthena +{ namespace ChatRecv { std::string extractChannelFromMessage(std::string &chatMsg); diff --git a/src/net/eathena/elementalhandler.cpp b/src/net/eathena/elementalhandler.cpp index 1ddbb491f..44c1437a8 100644 --- a/src/net/eathena/elementalhandler.cpp +++ b/src/net/eathena/elementalhandler.cpp @@ -20,8 +20,6 @@ #include "net/eathena/elementalhandler.h" -#include "logger.h" - #include "net/eathena/elementalrecv.h" #include "net/eathena/protocol.h" diff --git a/src/net/eathena/elementalrecv.cpp b/src/net/eathena/elementalrecv.cpp index 151e23804..5e07a7752 100644 --- a/src/net/eathena/elementalrecv.cpp +++ b/src/net/eathena/elementalrecv.cpp @@ -22,7 +22,7 @@ #include "logger.h" -#include "net/eathena/protocol.h" +#include "net/messagein.h" #include "debug.h" diff --git a/src/net/eathena/elementalrecv.h b/src/net/eathena/elementalrecv.h index 0b0a2651f..00bbca8e9 100644 --- a/src/net/eathena/elementalrecv.h +++ b/src/net/eathena/elementalrecv.h @@ -21,9 +21,10 @@ #ifndef NET_EATHENA_ELEMENTALRECV_H #define NET_EATHENA_ELEMENTALRECV_H -#include "net/elementalhandler.h" - -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { diff --git a/src/net/eathena/familyhandler.cpp b/src/net/eathena/familyhandler.cpp index b0cf00031..8d4949b4f 100644 --- a/src/net/eathena/familyhandler.cpp +++ b/src/net/eathena/familyhandler.cpp @@ -20,8 +20,6 @@ #include "net/eathena/familyhandler.h" -#include "logger.h" - #include "being/being.h" #include "net/eathena/familyrecv.h" diff --git a/src/net/eathena/familyrecv.cpp b/src/net/eathena/familyrecv.cpp index 76fae2ff2..70919a97b 100644 --- a/src/net/eathena/familyrecv.cpp +++ b/src/net/eathena/familyrecv.cpp @@ -22,10 +22,7 @@ #include "logger.h" -#include "being/being.h" - -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/messagein.h" #include "debug.h" diff --git a/src/net/eathena/familyrecv.h b/src/net/eathena/familyrecv.h index e1f5560e7..51523b6e2 100644 --- a/src/net/eathena/familyrecv.h +++ b/src/net/eathena/familyrecv.h @@ -23,9 +23,10 @@ #ifdef EATHENA_SUPPORT -#include "net/familyhandler.h" - -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { diff --git a/src/net/eathena/friendshandler.cpp b/src/net/eathena/friendshandler.cpp index a2e01bc79..8d07aa94d 100644 --- a/src/net/eathena/friendshandler.cpp +++ b/src/net/eathena/friendshandler.cpp @@ -20,8 +20,6 @@ #include "net/eathena/friendshandler.h" -#include "logger.h" - #include "net/eathena/friendsrecv.h" #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" diff --git a/src/net/eathena/friendsrecv.cpp b/src/net/eathena/friendsrecv.cpp index 41994dd15..4350d31c9 100644 --- a/src/net/eathena/friendsrecv.cpp +++ b/src/net/eathena/friendsrecv.cpp @@ -22,8 +22,7 @@ #include "logger.h" -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/messagein.h" #include "debug.h" diff --git a/src/net/eathena/friendsrecv.h b/src/net/eathena/friendsrecv.h index d502343da..bdd564244 100644 --- a/src/net/eathena/friendsrecv.h +++ b/src/net/eathena/friendsrecv.h @@ -23,9 +23,10 @@ #ifdef EATHENA_SUPPORT -#include "net/friendshandler.h" - -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp index 2d4f7d20f..dde0a10d5 100644 --- a/src/net/eathena/gamehandler.cpp +++ b/src/net/eathena/gamehandler.cpp @@ -23,7 +23,6 @@ #include "net/eathena/gamehandler.h" #include "client.h" -#include "logger.h" #include "being/localplayer.h" diff --git a/src/net/eathena/gamerecv.cpp b/src/net/eathena/gamerecv.cpp index e86411712..43c52ba61 100644 --- a/src/net/eathena/gamerecv.cpp +++ b/src/net/eathena/gamerecv.cpp @@ -27,14 +27,9 @@ #include "being/localplayer.h" -#include "net/serverfeatures.h" +#include "net/messagein.h" -#include "net/ea/token.h" - -#include "net/eathena/loginhandler.h" -#include "net/eathena/messageout.h" #include "net/eathena/network.h" -#include "net/eathena/protocol.h" #include "debug.h" diff --git a/src/net/eathena/gamerecv.h b/src/net/eathena/gamerecv.h index 4fa9aa723..ae19058eb 100644 --- a/src/net/eathena/gamerecv.h +++ b/src/net/eathena/gamerecv.h @@ -23,9 +23,10 @@ #ifndef NET_EATHENA_GAMERECV_H #define NET_EATHENA_GAMERECV_H -#include "net/eathena/messagehandler.h" - -#include "net/ea/gamehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { diff --git a/src/net/eathena/generalrecv.cpp b/src/net/eathena/generalrecv.cpp index bdee78d7d..ff5809028 100644 --- a/src/net/eathena/generalrecv.cpp +++ b/src/net/eathena/generalrecv.cpp @@ -23,53 +23,10 @@ #include "net/eathena/generalrecv.h" #include "client.h" -#include "configuration.h" +#include "logger.h" -#include "gui/windows/skilldialog.h" -#include "gui/windows/socialwindow.h" -#include "gui/windows/statuswindow.h" +#include "net/messagein.h" -#include "gui/widgets/tabs/chat/guildtab.h" -#include "gui/widgets/tabs/chat/partytab.h" - -#include "net/eathena/adminhandler.h" -#include "net/eathena/auctionhandler.h" -#include "net/eathena/bankhandler.h" -#include "net/eathena/beinghandler.h" -#include "net/eathena/buyingstorehandler.h" -#include "net/eathena/buysellhandler.h" -#include "net/eathena/cashshophandler.h" -#include "net/eathena/chathandler.h" -#include "net/eathena/charserverhandler.h" -#include "net/eathena/elementalhandler.h" -#include "net/eathena/familyhandler.h" -#include "net/eathena/friendshandler.h" -#include "net/eathena/gamehandler.h" -#include "net/eathena/guildhandler.h" -#include "net/eathena/homunculushandler.h" -#include "net/eathena/inventoryhandler.h" -#include "net/eathena/itemhandler.h" -#include "net/eathena/loginhandler.h" -#include "net/eathena/mailhandler.h" -#include "net/eathena/markethandler.h" -#include "net/eathena/mercenaryhandler.h" -#include "net/eathena/network.h" -#include "net/eathena/npchandler.h" -#include "net/eathena/partyhandler.h" -#include "net/eathena/pethandler.h" -#include "net/eathena/playerhandler.h" -#include "net/eathena/protocol.h" -#include "net/eathena/roulettehandler.h" -#include "net/eathena/searchstorehandler.h" -#include "net/eathena/serverfeatures.h" -#include "net/eathena/tradehandler.h" -#include "net/eathena/skillhandler.h" -#include "net/eathena/questhandler.h" -#include "net/eathena/vendinghandler.h" - -#include "resources/db/itemdbstat.h" - -#include "utils/delete2.h" #include "utils/gettext.h" #include "debug.h" diff --git a/src/net/eathena/generalrecv.h b/src/net/eathena/generalrecv.h index d18c81a09..0e0770893 100644 --- a/src/net/eathena/generalrecv.h +++ b/src/net/eathena/generalrecv.h @@ -23,9 +23,10 @@ #ifndef NET_EATHENA_GENERALRECV_H #define NET_EATHENA_GENERALRECV_H -#include "net/generalhandler.h" - -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp index d6a07091d..64801f265 100644 --- a/src/net/eathena/guildhandler.cpp +++ b/src/net/eathena/guildhandler.cpp @@ -22,18 +22,10 @@ #include "net/eathena/guildhandler.h" #include "actormanager.h" -#include "configuration.h" #include "being/localplayer.h" #include "being/playerinfo.h" -#include "gui/windows/chatwindow.h" -#include "gui/windows/socialwindow.h" - -#include "gui/widgets/tabs/chat/guildtab.h" - -#include "net/ea/guildrecv.h" - #include "net/ea/guildrecv.h" #include "net/eathena/guildrecv.h" diff --git a/src/net/eathena/guildrecv.cpp b/src/net/eathena/guildrecv.cpp index 007bff852..65b3309a3 100644 --- a/src/net/eathena/guildrecv.cpp +++ b/src/net/eathena/guildrecv.cpp @@ -21,8 +21,8 @@ #include "net/eathena/guildrecv.h" -#include "actormanager.h" #include "configuration.h" +#include "guild.h" #include "being/localplayer.h" #include "being/playerinfo.h" @@ -34,8 +34,9 @@ #include "net/ea/guildrecv.h" -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/messagein.h" + +#include "net/eathena/guildhandler.h" #include "debug.h" diff --git a/src/net/eathena/guildrecv.h b/src/net/eathena/guildrecv.h index 57bb18f49..4a0ea8348 100644 --- a/src/net/eathena/guildrecv.h +++ b/src/net/eathena/guildrecv.h @@ -22,9 +22,13 @@ #ifndef NET_EATHENA_GUILDRECV_H #define NET_EATHENA_GUILDRECV_H -#include "net/ea/guildhandler.h" +namespace Net +{ + class MessageIn; +} -#include "net/eathena/messagehandler.h" +class Guild; +class GuildTab; namespace EAthena { @@ -44,4 +48,6 @@ namespace Ea extern Guild *taGuild; } +extern GuildTab *guildTab; + #endif // NET_EATHENA_GUILDRECV_H diff --git a/src/net/eathena/homunculushandler.cpp b/src/net/eathena/homunculushandler.cpp index 79a4d4f10..53eac18ab 100644 --- a/src/net/eathena/homunculushandler.cpp +++ b/src/net/eathena/homunculushandler.cpp @@ -20,28 +20,14 @@ #include "net/eathena/homunculushandler.h" -#include "actormanager.h" -#include "notifymanager.h" - -#include "being/homunculusinfo.h" #include "being/playerinfo.h" -#include "enums/resources/notifytypes.h" - -#include "gui/windows/skilldialog.h" - #include "net/serverfeatures.h" #include "net/eathena/homunculusrecv.h" #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" -#include "resources/iteminfo.h" - -#include "resources/db/itemdb.h" - -#include "utils/stringutils.h" - #include "debug.h" extern Net::HomunculusHandler *homunculusHandler; diff --git a/src/net/eathena/homunculusrecv.cpp b/src/net/eathena/homunculusrecv.cpp index 1e0cec814..6502d6d14 100644 --- a/src/net/eathena/homunculusrecv.cpp +++ b/src/net/eathena/homunculusrecv.cpp @@ -30,15 +30,12 @@ #include "gui/windows/skilldialog.h" -#include "net/serverfeatures.h" - -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" - #include "resources/iteminfo.h" #include "resources/db/itemdb.h" +#include "net/messagein.h" + #include "utils/stringutils.h" #include "debug.h" diff --git a/src/net/eathena/homunculusrecv.h b/src/net/eathena/homunculusrecv.h index 46c61df47..e1024f08b 100644 --- a/src/net/eathena/homunculusrecv.h +++ b/src/net/eathena/homunculusrecv.h @@ -23,9 +23,10 @@ #ifdef EATHENA_SUPPORT -#include "net/homunculushandler.h" - -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index a6b16c466..32457ae48 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -22,38 +22,18 @@ #include "net/eathena/inventoryhandler.h" -#include "notifymanager.h" -#include "itemcolormanager.h" - -#include "being/localplayer.h" +#include "item.h" #include "enums/equipslot.h" -#include "enums/resources/notifytypes.h" - -#include "gui/popups/itempopup.h" - -#include "gui/widgets/createwidget.h" - -#include "gui/windows/insertcarddialog.h" - -#include "listeners/arrowslistener.h" - #include "net/ea/inventoryrecv.h" #include "net/eathena/inventoryrecv.h" -#include "net/eathena/itemflags.h" #include "net/eathena/menu.h" #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" #include "net/ea/eaprotocol.h" -#include "net/ea/equipbackend.h" - -#include "resources/iteminfo.h" - -#include "utils/gettext.h" -#include "utils/stringutils.h" #include "debug.h" diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp index 186e34cbd..83350a449 100644 --- a/src/net/eathena/inventoryrecv.cpp +++ b/src/net/eathena/inventoryrecv.cpp @@ -27,8 +27,6 @@ #include "being/localplayer.h" -#include "enums/equipslot.h" - #include "enums/resources/notifytypes.h" #include "gui/popups/itempopup.h" @@ -39,10 +37,12 @@ #include "listeners/arrowslistener.h" +#include "net/inventoryhandler.h" + +#include "net/messagein.h" + #include "net/eathena/itemflags.h" #include "net/eathena/menu.h" -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" #include "net/ea/eaprotocol.h" #include "net/ea/equipbackend.h" @@ -903,7 +903,7 @@ void InventoryRecv::processFavoriteItem(Net::MessageIn &msg) void InventoryRecv::processCartAddError(Net::MessageIn &msg) { - switch(msg.readUInt8("flag")) + switch (msg.readUInt8("flag")) { case 0: NotifyManager::notify(NotifyTypes::CART_ADD_WEIGHT_ERROR); diff --git a/src/net/eathena/inventoryrecv.h b/src/net/eathena/inventoryrecv.h index ea0bd71fd..b9dff5359 100644 --- a/src/net/eathena/inventoryrecv.h +++ b/src/net/eathena/inventoryrecv.h @@ -23,9 +23,12 @@ #ifndef NET_EATHENA_INVENTORYRECV_H #define NET_EATHENA_INVENTORYRECV_H -#include "net/ea/inventoryhandler.h" +#include "net/ea/inventoryitem.h" -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { diff --git a/src/net/eathena/itemhandler.cpp b/src/net/eathena/itemhandler.cpp index 2240cf392..d588a9461 100644 --- a/src/net/eathena/itemhandler.cpp +++ b/src/net/eathena/itemhandler.cpp @@ -22,12 +22,6 @@ #include "net/eathena/itemhandler.h" -#include "actormanager.h" -#include "itemcolormanager.h" -#include "logger.h" - -#include "enums/simpletypes/damaged.h" - #include "net/ea/itemrecv.h" #include "net/eathena/itemrecv.h" diff --git a/src/net/eathena/itemrecv.cpp b/src/net/eathena/itemrecv.cpp index c04621aaa..f082ae163 100644 --- a/src/net/eathena/itemrecv.cpp +++ b/src/net/eathena/itemrecv.cpp @@ -26,9 +26,7 @@ #include "itemcolormanager.h" #include "logger.h" -#include "enums/simpletypes/damaged.h" - -#include "net/eathena/protocol.h" +#include "net/messagein.h" #include "debug.h" diff --git a/src/net/eathena/itemrecv.h b/src/net/eathena/itemrecv.h index 274cc0a1a..94d65bf3d 100644 --- a/src/net/eathena/itemrecv.h +++ b/src/net/eathena/itemrecv.h @@ -23,9 +23,10 @@ #ifndef NET_EATHENA_ITEMRECV_H #define NET_EATHENA_ITEMRECV_H -#include "net/eathena/messagehandler.h" - -#include "net/ea/itemhandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp index 698e5854f..cca2a90eb 100644 --- a/src/net/eathena/loginhandler.cpp +++ b/src/net/eathena/loginhandler.cpp @@ -24,10 +24,7 @@ #include "client.h" -#include "gui/windows/logindialog.h" - #include "net/generalhandler.h" -#include "net/logindata.h" #include "net/serverfeatures.h" #include "net/ea/loginrecv.h" @@ -37,9 +34,6 @@ #include "net/eathena/network.h" #include "net/eathena/protocol.h" -#include "utils/gettext.h" -#include "utils/paths.h" - #include "debug.h" extern Net::LoginHandler *loginHandler; diff --git a/src/net/eathena/loginrecv.cpp b/src/net/eathena/loginrecv.cpp index a7ddbf95b..472ce76be 100644 --- a/src/net/eathena/loginrecv.cpp +++ b/src/net/eathena/loginrecv.cpp @@ -26,13 +26,9 @@ #include "gui/windows/logindialog.h" -#include "net/generalhandler.h" #include "net/logindata.h" -#include "net/serverfeatures.h" -#include "net/eathena/messageout.h" -#include "net/eathena/network.h" -#include "net/eathena/protocol.h" +#include "net/messagein.h" #include "utils/gettext.h" #include "utils/paths.h" diff --git a/src/net/eathena/loginrecv.h b/src/net/eathena/loginrecv.h index ccd34b7cc..139dd3fb5 100644 --- a/src/net/eathena/loginrecv.h +++ b/src/net/eathena/loginrecv.h @@ -23,9 +23,10 @@ #ifndef NET_EATHENA_LOGINRECV_H #define NET_EATHENA_LOGINRECV_H -#include "net/ea/loginhandler.h" - -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp index 3474a8b20..654032536 100644 --- a/src/net/eathena/mailhandler.cpp +++ b/src/net/eathena/mailhandler.cpp @@ -20,23 +20,12 @@ #include "net/eathena/mailhandler.h" -#include "notifymanager.h" - -#include "enums/resources/notifytypes.h" - -#include "gui/mailmessage.h" - -#include "gui/windows/mailwindow.h" - #include "net/ea/eaprotocol.h" #include "net/eathena/mailrecv.h" #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" -#include "utils/gettext.h" -#include "utils/stringutils.h" - #include "debug.h" extern Net::MailHandler *mailHandler; diff --git a/src/net/eathena/mailrecv.cpp b/src/net/eathena/mailrecv.cpp index 529f9d9a4..c66be876d 100644 --- a/src/net/eathena/mailrecv.cpp +++ b/src/net/eathena/mailrecv.cpp @@ -28,10 +28,8 @@ #include "gui/windows/mailwindow.h" -#include "net/ea/eaprotocol.h" - -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/mailhandler.h" +#include "net/messagein.h" #include "utils/gettext.h" #include "utils/stringutils.h" diff --git a/src/net/eathena/mailrecv.h b/src/net/eathena/mailrecv.h index a501d214e..f5c8560ad 100644 --- a/src/net/eathena/mailrecv.h +++ b/src/net/eathena/mailrecv.h @@ -21,14 +21,13 @@ #ifndef NET_EATHENA_MAILRECV_H #define NET_EATHENA_MAILRECV_H -#include "net/mailhandler.h" - -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { - class MessageOut; - namespace MailRecv { void processMailOpen(Net::MessageIn &msg); diff --git a/src/net/eathena/maphandler.cpp b/src/net/eathena/maphandler.cpp index 533307e4d..082bb5f3f 100644 --- a/src/net/eathena/maphandler.cpp +++ b/src/net/eathena/maphandler.cpp @@ -20,8 +20,6 @@ #include "net/eathena/maphandler.h" -#include "logger.h" - #include "net/eathena/maprecv.h" #include "net/eathena/protocol.h" diff --git a/src/net/eathena/maprecv.cpp b/src/net/eathena/maprecv.cpp index 9d4f39254..03c660c4c 100644 --- a/src/net/eathena/maprecv.cpp +++ b/src/net/eathena/maprecv.cpp @@ -22,7 +22,7 @@ #include "logger.h" -#include "net/eathena/protocol.h" +#include "net/messagein.h" #include "debug.h" diff --git a/src/net/eathena/maprecv.h b/src/net/eathena/maprecv.h index 14b9f74cd..8a566a218 100644 --- a/src/net/eathena/maprecv.h +++ b/src/net/eathena/maprecv.h @@ -21,9 +21,10 @@ #ifndef NET_EATHENA_MAPRECV_H #define NET_EATHENA_MAPRECV_H -#include "net/maphandler.h" - -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { diff --git a/src/net/eathena/markethandler.cpp b/src/net/eathena/markethandler.cpp index 4e304b4ba..36e45e60e 100644 --- a/src/net/eathena/markethandler.cpp +++ b/src/net/eathena/markethandler.cpp @@ -20,16 +20,6 @@ #include "net/eathena/markethandler.h" -#include "notifymanager.h" - -#include "being/playerinfo.h" - -#include "enums/resources/notifytypes.h" - -#include "gui/windows/buydialog.h" - -#include "gui/widgets/createwidget.h" - #include "net/eathena/marketrecv.h" #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" diff --git a/src/net/eathena/markethandler.h b/src/net/eathena/markethandler.h index 3a843e4fd..aa3db2f7f 100644 --- a/src/net/eathena/markethandler.h +++ b/src/net/eathena/markethandler.h @@ -25,10 +25,9 @@ #include "net/eathena/messagehandler.h" -class BuyDialog; - namespace EAthena { + class MarketHandler final : public MessageHandler, public Net::MarketHandler { diff --git a/src/net/eathena/marketrecv.cpp b/src/net/eathena/marketrecv.cpp index 2c8a448ae..1b2cb689f 100644 --- a/src/net/eathena/marketrecv.cpp +++ b/src/net/eathena/marketrecv.cpp @@ -30,8 +30,7 @@ #include "gui/widgets/createwidget.h" -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/messagein.h" #include "debug.h" diff --git a/src/net/eathena/marketrecv.h b/src/net/eathena/marketrecv.h index 3686e5187..fcab073f8 100644 --- a/src/net/eathena/marketrecv.h +++ b/src/net/eathena/marketrecv.h @@ -21,9 +21,10 @@ #ifndef NET_EATHENA_MARKETRECV_H #define NET_EATHENA_MARKETRECV_H -#include "net/markethandler.h" - -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} class BuyDialog; diff --git a/src/net/eathena/mercenaryhandler.cpp b/src/net/eathena/mercenaryhandler.cpp index c4c6741a7..353777e42 100644 --- a/src/net/eathena/mercenaryhandler.cpp +++ b/src/net/eathena/mercenaryhandler.cpp @@ -20,17 +20,8 @@ #include "net/eathena/mercenaryhandler.h" -#include "actormanager.h" -#include "notifymanager.h" - -#include "being/localplayer.h" -#include "being/mercenaryinfo.h" #include "being/playerinfo.h" -#include "enums/resources/notifytypes.h" - -#include "gui/windows/skilldialog.h" - #include "net/serverfeatures.h" #include "net/eathena/mercenaryrecv.h" diff --git a/src/net/eathena/mercenaryrecv.cpp b/src/net/eathena/mercenaryrecv.cpp index c96340703..d4f494ad9 100644 --- a/src/net/eathena/mercenaryrecv.cpp +++ b/src/net/eathena/mercenaryrecv.cpp @@ -31,10 +31,7 @@ #include "gui/windows/skilldialog.h" -#include "net/serverfeatures.h" - -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/messagein.h" #include "debug.h" diff --git a/src/net/eathena/mercenaryrecv.h b/src/net/eathena/mercenaryrecv.h index e8de53712..1162ed8d1 100644 --- a/src/net/eathena/mercenaryrecv.h +++ b/src/net/eathena/mercenaryrecv.h @@ -21,9 +21,10 @@ #ifndef NET_EATHENA_MERCENARYRECV_H #define NET_EATHENA_MERCENARYRECV_H -#include "net/mercenaryhandler.h" - -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp index 1ed4cb077..6ce6afac2 100644 --- a/src/net/eathena/npchandler.cpp +++ b/src/net/eathena/npchandler.cpp @@ -22,8 +22,6 @@ #include "net/eathena/npchandler.h" -#include "actormanager.h" - #include "being/localplayer.h" #include "gui/windows/npcdialog.h" diff --git a/src/net/eathena/npcrecv.cpp b/src/net/eathena/npcrecv.cpp index 4bc1cf657..f6058e682 100644 --- a/src/net/eathena/npcrecv.cpp +++ b/src/net/eathena/npcrecv.cpp @@ -21,20 +21,14 @@ #include "net/eathena/npcrecv.h" #include "actormanager.h" +#include "logger.h" -#include "being/localplayer.h" +#include "being/being.h" -#include "gui/windows/npcdialog.h" - -#include "gui/widgets/createwidget.h" +#include "net/messagein.h" #include "net/ea/npcrecv.h" -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" - -#include "net/ea/eaprotocol.h" - #include "debug.h" namespace EAthena diff --git a/src/net/eathena/npcrecv.h b/src/net/eathena/npcrecv.h index 865d53f3a..ed2e2f670 100644 --- a/src/net/eathena/npcrecv.h +++ b/src/net/eathena/npcrecv.h @@ -21,9 +21,10 @@ #ifndef NET_EATHENA_NPCRECV_H #define NET_EATHENA_NPCRECV_H -#include "net/ea/npchandler.h" - -#include "net/eathena/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp index 0e0625b4c..47bcf7aef 100644 --- a/src/net/eathena/partyhandler.cpp +++ b/src/net/eathena/partyhandler.cpp @@ -29,11 +29,6 @@ #include "enums/resources/notifytypes.h" -#include "gui/windows/chatwindow.h" -#include "gui/windows/socialwindow.h" - -#include "gui/widgets/tabs/chat/partytab.h" - #include "net/ea/partyrecv.h" #include "net/eathena/messageout.h" diff --git a/src/net/eathena/partyrecv.cpp b/src/net/eathena/partyrecv.cpp index 479433690..a5359aac5 100644 --- a/src/net/eathena/partyrecv.cpp +++ b/src/net/eathena/partyrecv.cpp @@ -34,10 +34,9 @@ #include "gui/widgets/tabs/chat/partytab.h" -#include "net/ea/partyrecv.h" +#include "net/messagein.h" -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/ea/partyrecv.h" #include "debug.h" diff --git a/src/net/eathena/partyrecv.h b/src/net/eathena/partyrecv.h index 623051a4f..432897aa1 100644 --- a/src/net/eathena/partyrecv.h +++ b/src/net/eathena/partyrecv.h @@ -22,9 +22,10 @@ #ifndef NET_EATHENA_PARTYRECV_H #define NET_EATHENA_PARTYRECV_H -#include "net/eathena/messagehandler.h" - -#include "net/ea/partyhandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp index 8911a7978..ea6a0602a 100644 --- a/src/net/eathena/pethandler.cpp +++ b/src/net/eathena/pethandler.cpp @@ -20,34 +20,14 @@ #include "net/eathena/pethandler.h" -#include "actormanager.h" -#include "notifymanager.h" - -#include "being/localplayer.h" -#include "being/petinfo.h" #include "being/playerinfo.h" -#include "enums/resources/notifytypes.h" - -#include "gui/windows/eggselectiondialog.h" - -#include "gui/widgets/createwidget.h" - -#include "gui/widgets/tabs/chat/chattab.h" - -#include "net/inventoryhandler.h" #include "net/serverfeatures.h" -#include "net/ea/eaprotocol.h" - -#include "net/eathena/menu.h" #include "net/eathena/messageout.h" #include "net/eathena/petrecv.h" #include "net/eathena/protocol.h" -#include "utils/gettext.h" -#include "utils/stringutils.h" - #include "debug.h" extern Net::PetHandler *petHandler; diff --git a/src/net/eathena/petrecv.cpp b/src/net/eathena/petrecv.cpp index 4d1dbe279..c22323480 100644 --- a/src/net/eathena/petrecv.cpp +++ b/src/net/eathena/petrecv.cpp @@ -36,13 +36,11 @@ #include "gui/widgets/tabs/chat/chattab.h" #include "net/inventoryhandler.h" -#include "net/serverfeatures.h" +#include "net/messagein.h" #include "net/ea/eaprotocol.h" #include "net/eathena/menu.h" -#include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" #include "utils/gettext.h" #include "utils/stringutils.h" diff --git a/src/net/eathena/petrecv.h b/src/net/eathena/petrecv.h index 81b2258fc..168094616 100644 --- a/src/net/eathena/petrecv.h +++ b/src/net/eathena/petrecv.h @@ -21,9 +21,10 @@ #ifndef NET_EATHENA_PETRECV_H #define NET_EATHENA_PETRECV_H -#include "net/eathena/messagehandler.h" - -#include "net/pethandler.h" +namespace Net +{ + class MessageIn; +} namespace EAthena { diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index d8287205f..cf0df34e4 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -22,37 +22,13 @@ #include "net/tmwa/beinghandler.h" -#include "actormanager.h" -#include "effectmanager.h" -#include "guild.h" -#include "party.h" - -#include "being/localplayer.h" - -#include "particle/particle.h" - -#include "input/keyboardconfig.h" - -#include "gui/windows/outfitwindow.h" -#include "gui/windows/socialwindow.h" - -#include "net/serverfeatures.h" - #include "net/ea/beingrecv.h" #include "net/tmwa/beingrecv.h" -#include "net/tmwa/guildmanager.h" #include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" #include "net/tmwa/sprite.h" -#include "resources/iteminfo.h" - -#include "resources/db/itemdb.h" - -#include "utils/stringutils.h" -#include "utils/timer.h" - #include "debug.h" extern Net::BeingHandler *beingHandler; diff --git a/src/net/tmwa/beingrecv.cpp b/src/net/tmwa/beingrecv.cpp index 6e326ea65..d77a4bffa 100644 --- a/src/net/tmwa/beingrecv.cpp +++ b/src/net/tmwa/beingrecv.cpp @@ -36,13 +36,13 @@ #include "gui/windows/outfitwindow.h" #include "gui/windows/socialwindow.h" +#include "net/beinghandler.h" +#include "net/messagein.h" #include "net/serverfeatures.h" #include "net/ea/beingrecv.h" #include "net/tmwa/guildmanager.h" -#include "net/tmwa/messageout.h" -#include "net/tmwa/protocol.h" #include "net/tmwa/sprite.h" #include "resources/iteminfo.h" @@ -750,7 +750,8 @@ void BeingRecv::processBeingVisible(Net::MessageIn &msg) const uint16_t shield = msg.readInt16("shield"); const uint16_t headTop = msg.readInt16("head top"); const uint16_t headMid = msg.readInt16("head mid"); - const ItemColor hairColor = fromInt(msg.readUInt8("hair color"), ItemColor); + const ItemColor hairColor = fromInt(msg.readUInt8("hair color"), + ItemColor); msg.readUInt8("unused"); const uint16_t shoes = msg.readInt16("shoes / clothes color"); diff --git a/src/net/tmwa/beingrecv.h b/src/net/tmwa/beingrecv.h index 9bc660b4f..adb059a6a 100644 --- a/src/net/tmwa/beingrecv.h +++ b/src/net/tmwa/beingrecv.h @@ -20,12 +20,27 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TMWA_BEING_H -#define NET_TMWA_BEING_H +#ifndef NET_TMWA_BEINGRECV_H +#define NET_TMWA_BEINGRECV_H -#include "net/ea/beinghandler.h" +#if defined(__GXX_EXPERIMENTAL_CXX0X__) +#if defined(__APPLE__) +#include <tr1/cstdint> +#else +#include <cstdint> +#endif +#else +#include <stdint.h> +#endif -#include "net/tmwa/messagehandler.h" +#include "localconsts.h" + +namespace Net +{ + class MessageIn; +} + +class Being; namespace TmwAthena { @@ -63,4 +78,4 @@ namespace TmwAthena } // namespace BeingRecv } // namespace TmwAthena -#endif // NET_TMWA_BEING_H +#endif // NET_TMWA_BEINGRECV_H diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp index 1d15f4ad7..963a40a5f 100644 --- a/src/net/tmwa/buysellhandler.cpp +++ b/src/net/tmwa/buysellhandler.cpp @@ -23,18 +23,10 @@ #include "net/tmwa/buysellhandler.h" #include "configuration.h" -#include "notifymanager.h" -#include "being/playerinfo.h" - -#include "enums/resources/notifytypes.h" - -#include "gui/windows/buydialog.h" #include "gui/windows/chatwindow.h" #include "gui/windows/shopwindow.h" -#include "gui/widgets/createwidget.h" - #include "net/chathandler.h" #include "net/ea/buysellrecv.h" diff --git a/src/net/tmwa/buysellrecv.cpp b/src/net/tmwa/buysellrecv.cpp index 78f55b378..52f04cac2 100644 --- a/src/net/tmwa/buysellrecv.cpp +++ b/src/net/tmwa/buysellrecv.cpp @@ -22,7 +22,6 @@ #include "net/tmwa/buysellrecv.h" -#include "configuration.h" #include "notifymanager.h" #include "being/playerinfo.h" @@ -30,19 +29,13 @@ #include "enums/resources/notifytypes.h" #include "gui/windows/buydialog.h" -#include "gui/windows/chatwindow.h" -#include "gui/windows/shopwindow.h" #include "gui/widgets/createwidget.h" -#include "net/chathandler.h" +#include "net/buysellhandler.h" #include "net/ea/buysellrecv.h" -#include "net/tmwa/protocol.h" - -#include "utils/timer.h" - #include "debug.h" namespace TmwAthena diff --git a/src/net/tmwa/buysellrecv.h b/src/net/tmwa/buysellrecv.h index 577f481e8..d0ba12e88 100644 --- a/src/net/tmwa/buysellrecv.h +++ b/src/net/tmwa/buysellrecv.h @@ -23,9 +23,10 @@ #ifndef NET_TMWA_BUYSELLRECV_H #define NET_TMWA_BUYSELLRECV_H -#include "net/ea/buysellhandler.h" - -#include "net/tmwa/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace TmwAthena { diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 2be2f1250..4666ba7b9 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -23,13 +23,8 @@ #include "net/tmwa/charserverhandler.h" #include "client.h" -#include "configuration.h" -#include "settings.h" #include "gui/windows/charcreatedialog.h" -#include "gui/windows/okdialog.h" - -#include "gui/widgets/createwidget.h" #include "net/character.h" @@ -38,19 +33,13 @@ #include "net/ea/charserverrecv.h" #include "net/tmwa/charserverrecv.h" -#include "net/tmwa/gamehandler.h" #include "net/tmwa/loginhandler.h" #include "net/tmwa/messageout.h" #include "net/tmwa/network.h" #include "net/tmwa/protocol.h" -#include "net/tmwa/sprite.h" - -#include "resources/iteminfo.h" #include "resources/db/chardb.h" -#include "resources/db/itemdb.h" -#include "utils/dtor.h" #include "utils/gettext.h" #include "debug.h" diff --git a/src/net/tmwa/charserverrecv.cpp b/src/net/tmwa/charserverrecv.cpp index fb8ef6f8e..4d9998ab2 100644 --- a/src/net/tmwa/charserverrecv.cpp +++ b/src/net/tmwa/charserverrecv.cpp @@ -32,19 +32,17 @@ #include "gui/widgets/createwidget.h" #include "net/character.h" +#include "net/charserverhandler.h" #include "net/ea/token.h" #include "net/tmwa/gamehandler.h" #include "net/tmwa/loginhandler.h" -#include "net/tmwa/messageout.h" #include "net/tmwa/network.h" -#include "net/tmwa/protocol.h" #include "net/tmwa/sprite.h" #include "resources/iteminfo.h" -#include "resources/db/chardb.h" #include "resources/db/itemdb.h" #include "utils/dtor.h" diff --git a/src/net/tmwa/charserverrecv.h b/src/net/tmwa/charserverrecv.h index fa01d8f95..13812a9da 100644 --- a/src/net/tmwa/charserverrecv.h +++ b/src/net/tmwa/charserverrecv.h @@ -23,9 +23,12 @@ #ifndef NET_TMWA_CHARSERVERRECV_H #define NET_TMWA_CHARSERVERRECV_H -#include "net/ea/charserverhandler.h" +namespace Net +{ + class MessageIn; -#include "net/tmwa/messagehandler.h" + struct Character; +} namespace TmwAthena { diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp index b13e44b91..ad34acb61 100644 --- a/src/net/tmwa/chathandler.cpp +++ b/src/net/tmwa/chathandler.cpp @@ -22,29 +22,20 @@ #include "net/tmwa/chathandler.h" -#include "actormanager.h" -#include "configuration.h" - #include "being/localplayer.h" -#include "being/playerrelation.h" -#include "being/playerrelations.h" #include "gui/chatconsts.h" -#include "gui/widgets/tabs/chat/gmtab.h" - -#include "gui/windows/chatwindow.h" -#include "gui/windows/shopwindow.h" - #include "net/serverfeatures.h" #include "net/ea/chatrecv.h" #include "net/tmwa/chatrecv.h" -#include "net/tmwa/guildmanager.h" #include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" +#include "utils/stringutils.h" + #include "debug.h" extern Net::ChatHandler *chatHandler; diff --git a/src/net/tmwa/chatrecv.cpp b/src/net/tmwa/chatrecv.cpp index de0b9a9ed..561511041 100644 --- a/src/net/tmwa/chatrecv.cpp +++ b/src/net/tmwa/chatrecv.cpp @@ -40,8 +40,9 @@ #include "net/ea/chatrecv.h" +#include "net/messagein.h" + #include "net/tmwa/guildmanager.h" -#include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" #include "debug.h" @@ -63,7 +64,7 @@ void ChatRecv::processChat(Net::MessageIn &msg) } void ChatRecv::processChatContinue(std::string chatMsg, - const std::string &channel) + const std::string &channel) { const size_t pos = chatMsg.find(" : ", 0); @@ -213,7 +214,7 @@ void ChatRecv::processWhisperResponse(Net::MessageIn &msg) } void ChatRecv::processWhisperContinue(const std::string &nick, - std::string chatMsg) + std::string chatMsg) { // ignoring future whisper messages if (chatMsg.find("\302\202G") == 0 || chatMsg.find("\302\202A") == 0) diff --git a/src/net/tmwa/chatrecv.h b/src/net/tmwa/chatrecv.h index 18d56a525..e8a448659 100644 --- a/src/net/tmwa/chatrecv.h +++ b/src/net/tmwa/chatrecv.h @@ -23,14 +23,15 @@ #ifndef NET_TMWA_CHATRECV_H #define NET_TMWA_CHATRECV_H -#include "net/ea/chathandler.h" +#include <string> -#include "net/tmwa/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace TmwAthena { - class MessageOut; - namespace ChatRecv { void processChat(Net::MessageIn &msg); diff --git a/src/net/tmwa/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp index fee70405b..a3af6118b 100644 --- a/src/net/tmwa/gamehandler.cpp +++ b/src/net/tmwa/gamehandler.cpp @@ -23,7 +23,6 @@ #include "net/tmwa/gamehandler.h" #include "client.h" -#include "logger.h" #include "being/localplayer.h" diff --git a/src/net/tmwa/gamerecv.cpp b/src/net/tmwa/gamerecv.cpp index b7cf5175c..ba68d9391 100644 --- a/src/net/tmwa/gamerecv.cpp +++ b/src/net/tmwa/gamerecv.cpp @@ -27,12 +27,9 @@ #include "being/localplayer.h" -#include "net/ea/token.h" +#include "net/messagein.h" -#include "net/tmwa/loginhandler.h" -#include "net/tmwa/messageout.h" #include "net/tmwa/network.h" -#include "net/tmwa/protocol.h" #include "debug.h" diff --git a/src/net/tmwa/gamerecv.h b/src/net/tmwa/gamerecv.h index 75af0b232..ab97ed621 100644 --- a/src/net/tmwa/gamerecv.h +++ b/src/net/tmwa/gamerecv.h @@ -23,9 +23,10 @@ #ifndef NET_TMWA_GAMERECV_H #define NET_TMWA_GAMERECV_H -#include "net/tmwa/messagehandler.h" - -#include "net/ea/gamehandler.h" +namespace Net +{ + class MessageIn; +} namespace TmwAthena { diff --git a/src/net/tmwa/generalrecv.cpp b/src/net/tmwa/generalrecv.cpp index bf84accb3..42fc75350 100644 --- a/src/net/tmwa/generalrecv.cpp +++ b/src/net/tmwa/generalrecv.cpp @@ -23,58 +23,10 @@ #include "net/tmwa/generalrecv.h" #include "client.h" -#include "configuration.h" +#include "logger.h" -#include "gui/windows/skilldialog.h" -#include "gui/windows/socialwindow.h" -#include "gui/windows/statuswindow.h" +#include "net/messagein.h" -#include "gui/widgets/tabs/chat/guildtab.h" -#include "gui/widgets/tabs/chat/partytab.h" - -#include "net/tmwa/adminhandler.h" -#include "net/tmwa/beinghandler.h" -#include "net/tmwa/buysellhandler.h" -#include "net/tmwa/chathandler.h" -#include "net/tmwa/charserverhandler.h" -#include "net/tmwa/gamehandler.h" -#include "net/tmwa/guildhandler.h" -#include "net/tmwa/inventoryhandler.h" -#include "net/tmwa/itemhandler.h" -#include "net/tmwa/loginhandler.h" -#include "net/tmwa/network.h" -#include "net/tmwa/npchandler.h" -#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" -#include "net/tmwa/questhandler.h" - -#ifdef EATHENA_SUPPORT -#include "net/tmwa/auctionhandler.h" -#include "net/tmwa/bankhandler.h" -#include "net/tmwa/battlegroundhandler.h" -#include "net/tmwa/buyingstorehandler.h" -#include "net/tmwa/cashshophandler.h" -#include "net/tmwa/elementalhandler.h" -#include "net/tmwa/familyhandler.h" -#include "net/tmwa/friendshandler.h" -#include "net/tmwa/homunculushandler.h" -#include "net/tmwa/mailhandler.h" -#include "net/tmwa/maphandler.h" -#include "net/tmwa/markethandler.h" -#include "net/tmwa/mercenaryhandler.h" -#include "net/tmwa/roulettehandler.h" -#include "net/tmwa/searchstorehandler.h" -#include "net/tmwa/vendinghandler.h" -#endif - -#include "resources/db/itemdbstat.h" - -#include "utils/delete2.h" #include "utils/gettext.h" #include "debug.h" diff --git a/src/net/tmwa/generalrecv.h b/src/net/tmwa/generalrecv.h index 769fc9dfd..35db369b7 100644 --- a/src/net/tmwa/generalrecv.h +++ b/src/net/tmwa/generalrecv.h @@ -23,9 +23,10 @@ #ifndef NET_TMWA_GENERALRECV_H #define NET_TMWA_GENERALRECV_H -#include "net/generalhandler.h" - -#include "net/tmwa/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace TmwAthena { diff --git a/src/net/tmwa/guildhandler.cpp b/src/net/tmwa/guildhandler.cpp index 40beafcb3..957fe2ace 100644 --- a/src/net/tmwa/guildhandler.cpp +++ b/src/net/tmwa/guildhandler.cpp @@ -22,18 +22,12 @@ #include "net/tmwa/guildhandler.h" #include "actormanager.h" -#include "configuration.h" #include "being/localplayer.h" #include "being/playerinfo.h" -#include "gui/windows/chatwindow.h" -#include "gui/windows/socialwindow.h" - #include "net/serverfeatures.h" -#include "gui/widgets/tabs/chat/guildtab.h" - #include "net/ea/guildrecv.h" #include "net/tmwa/guildrecv.h" diff --git a/src/net/tmwa/guildrecv.cpp b/src/net/tmwa/guildrecv.cpp index 8e547d6b5..0a6a84fc7 100644 --- a/src/net/tmwa/guildrecv.cpp +++ b/src/net/tmwa/guildrecv.cpp @@ -21,8 +21,8 @@ #include "net/tmwa/guildrecv.h" -#include "actormanager.h" #include "configuration.h" +#include "guild.h" #include "being/localplayer.h" #include "being/playerinfo.h" @@ -32,13 +32,14 @@ #include "net/serverfeatures.h" +#include "net/messagein.h" + +#include "net/tmwa/guildhandler.h" + #include "gui/widgets/tabs/chat/guildtab.h" #include "net/ea/guildrecv.h" -#include "net/tmwa/messageout.h" -#include "net/tmwa/protocol.h" - #include "debug.h" namespace TmwAthena diff --git a/src/net/tmwa/guildrecv.h b/src/net/tmwa/guildrecv.h index 83d25bbaa..cabfa3910 100644 --- a/src/net/tmwa/guildrecv.h +++ b/src/net/tmwa/guildrecv.h @@ -22,9 +22,13 @@ #ifndef NET_TMWA_GUILDRECV_H #define NET_TMWA_GUILDRECV_H -#include "net/ea/guildhandler.h" +namespace Net +{ + class MessageIn; +} -#include "net/tmwa/messagehandler.h" +class Guild; +class GuildTab; namespace TmwAthena { diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index 99fda9a23..950a6b492 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -22,16 +22,11 @@ #include "net/tmwa/inventoryhandler.h" -#include "notifymanager.h" +#include "item.h" +#include "logger.h" #include "enums/equipslot.h" -#include "being/localplayer.h" - -#include "enums/resources/notifytypes.h" - -#include "listeners/arrowslistener.h" - #include "net/ea/inventoryrecv.h" #include "net/tmwa/inventoryrecv.h" @@ -39,7 +34,6 @@ #include "net/tmwa/protocol.h" #include "net/ea/eaprotocol.h" -#include "net/ea/equipbackend.h" #include "debug.h" diff --git a/src/net/tmwa/inventoryrecv.cpp b/src/net/tmwa/inventoryrecv.cpp index da3eb3f91..02dd36978 100644 --- a/src/net/tmwa/inventoryrecv.cpp +++ b/src/net/tmwa/inventoryrecv.cpp @@ -24,16 +24,13 @@ #include "notifymanager.h" -#include "enums/equipslot.h" - #include "being/localplayer.h" #include "enums/resources/notifytypes.h" #include "listeners/arrowslistener.h" -#include "net/tmwa/messageout.h" -#include "net/tmwa/protocol.h" +#include "net/messagein.h" #include "net/ea/eaprotocol.h" #include "net/ea/equipbackend.h" diff --git a/src/net/tmwa/inventoryrecv.h b/src/net/tmwa/inventoryrecv.h index 3fe506d3a..091d18ab5 100644 --- a/src/net/tmwa/inventoryrecv.h +++ b/src/net/tmwa/inventoryrecv.h @@ -23,9 +23,10 @@ #ifndef NET_TMWA_INVENTORYRECV_H #define NET_TMWA_INVENTORYRECV_H -#include "net/ea/inventoryhandler.h" - -#include "net/tmwa/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace TmwAthena { diff --git a/src/net/tmwa/itemhandler.cpp b/src/net/tmwa/itemhandler.cpp index 990b91366..8bf6239d9 100644 --- a/src/net/tmwa/itemhandler.cpp +++ b/src/net/tmwa/itemhandler.cpp @@ -22,8 +22,6 @@ #include "net/tmwa/itemhandler.h" -#include "actormanager.h" - #include "net/ea/itemrecv.h" #include "net/tmwa/itemrecv.h" diff --git a/src/net/tmwa/itemrecv.cpp b/src/net/tmwa/itemrecv.cpp index eca928f1b..0ba78fb43 100644 --- a/src/net/tmwa/itemrecv.cpp +++ b/src/net/tmwa/itemrecv.cpp @@ -24,7 +24,7 @@ #include "actormanager.h" -#include "net/tmwa/protocol.h" +#include "net/messagein.h" #include "debug.h" diff --git a/src/net/tmwa/itemrecv.h b/src/net/tmwa/itemrecv.h index 86e8a1a5a..a8e536302 100644 --- a/src/net/tmwa/itemrecv.h +++ b/src/net/tmwa/itemrecv.h @@ -23,9 +23,10 @@ #ifndef NET_TMWA_ITEMRECV_H #define NET_TMWA_ITEMRECV_H -#include "net/tmwa/messagehandler.h" - -#include "net/ea/itemhandler.h" +namespace Net +{ + class MessageIn; +} namespace TmwAthena { diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp index 880e951a9..035f22fa1 100644 --- a/src/net/tmwa/loginhandler.cpp +++ b/src/net/tmwa/loginhandler.cpp @@ -23,7 +23,6 @@ #include "net/tmwa/loginhandler.h" #include "client.h" -#include "logger.h" #include "net/serverfeatures.h" @@ -34,8 +33,6 @@ #include "net/tmwa/network.h" #include "net/tmwa/protocol.h" -#include "utils/gettext.h" - #include "debug.h" extern Net::LoginHandler *loginHandler; diff --git a/src/net/tmwa/loginrecv.cpp b/src/net/tmwa/loginrecv.cpp index fb1a0eee7..772691573 100644 --- a/src/net/tmwa/loginrecv.cpp +++ b/src/net/tmwa/loginrecv.cpp @@ -25,13 +25,9 @@ #include "client.h" #include "logger.h" -#include "net/serverfeatures.h" - #include "net/ea/loginrecv.h" -#include "net/tmwa/messageout.h" -#include "net/tmwa/network.h" -#include "net/tmwa/protocol.h" +#include "net/messagein.h" #include "utils/gettext.h" diff --git a/src/net/tmwa/loginrecv.h b/src/net/tmwa/loginrecv.h index 0945a7066..63940fb3d 100644 --- a/src/net/tmwa/loginrecv.h +++ b/src/net/tmwa/loginrecv.h @@ -23,9 +23,10 @@ #ifndef NET_TMWA_LOGINRECV_H #define NET_TMWA_LOGINRECV_H -#include "net/ea/loginhandler.h" - -#include "net/tmwa/messagehandler.h" +namespace Net +{ + class MessageIn; +} namespace TmwAthena { diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp index 90fbee9d3..46a27b6e9 100644 --- a/src/net/tmwa/partyhandler.cpp +++ b/src/net/tmwa/partyhandler.cpp @@ -29,11 +29,6 @@ #include "enums/resources/notifytypes.h" -#include "gui/windows/chatwindow.h" -#include "gui/windows/socialwindow.h" - -#include "gui/widgets/tabs/chat/partytab.h" - #include "net/ea/partyrecv.h" #include "net/tmwa/messageout.h" diff --git a/src/net/tmwa/partyrecv.cpp b/src/net/tmwa/partyrecv.cpp index eaee64943..5458c8ccc 100644 --- a/src/net/tmwa/partyrecv.cpp +++ b/src/net/tmwa/partyrecv.cpp @@ -34,10 +34,9 @@ #include "gui/widgets/tabs/chat/partytab.h" -#include "net/ea/partyrecv.h" +#include "net/messagein.h" -#include "net/tmwa/messageout.h" -#include "net/tmwa/protocol.h" +#include "net/ea/partyrecv.h" #include "debug.h" diff --git a/src/net/tmwa/partyrecv.h b/src/net/tmwa/partyrecv.h index 0d94cd738..aeda82ea2 100644 --- a/src/net/tmwa/partyrecv.h +++ b/src/net/tmwa/partyrecv.h @@ -22,9 +22,10 @@ #ifndef NET_TMWA_PARTYRECV_H #define NET_TMWA_PARTYRECV_H -#include "net/tmwa/messagehandler.h" - -#include "net/ea/partyhandler.h" +namespace Net +{ + class MessageIn; +} namespace TmwAthena { diff --git a/src/options.h b/src/options.h index 32395fd5d..b087ce9da 100644 --- a/src/options.h +++ b/src/options.h @@ -26,12 +26,11 @@ #include <string> #if defined(__GXX_EXPERIMENTAL_CXX0X__) -# if defined(__APPLE__) -# include <tr1/cstdint> -# else -# include <cstdint> +#if defined(__APPLE__) +#include <tr1/cstdint> +#else +#include <cstdint> #endif - #else #include <stdint.h> #endif diff --git a/src/resources/db/colordb.cpp b/src/resources/db/colordb.cpp index 62f7beef6..8913dab9f 100644 --- a/src/resources/db/colordb.cpp +++ b/src/resources/db/colordb.cpp @@ -99,7 +99,10 @@ void ColorDB::loadHair(const std::string &fileName, node, "id", 0), ItemColor); if (colors.find(id) != colors.end()) - logger->log("ColorDB: Redefinition of dye ID %d", toInt(id, int)); + { + logger->log("ColorDB: Redefinition of dye ID %d", + toInt(id, int)); + } colors[id] = ItemColorData(id, XML::langProperty(node, "name", ""), XML::getProperty(node, "value", "#FFFFFF")); diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index c022b650a..063d82958 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -284,8 +284,10 @@ class ItemInfo final { return mColorsList ? static_cast<int>(mColorsList->size()) : 0; } int getIconColorsSize() const - { return mIconColorsList ? static_cast<int>(mIconColorsList->size()) - : 0; } + { + return mIconColorsList ? static_cast<int>(mIconColorsList->size()) + : 0; + } std::string getColorName(const ItemColor idx) const; std::string getColor(const ItemColor idx) const; diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h index 6557afecf..c7c2cffe1 100644 --- a/src/resources/resourcemanager.h +++ b/src/resources/resourcemanager.h @@ -249,7 +249,7 @@ class ResourceManager final void clearCache(); - void static init(); + static void init(); private: /** |