diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-20 00:15:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-20 00:15:42 +0300 |
commit | f96919885dd0e5ae0de4a8517e76419304ca8d36 (patch) | |
tree | 2c39f6da9bd97c45d77c77f1b9ee0505f38be0e6 /src/net | |
parent | 1dbf1cf1d87a38a327673b69c184ad662bd12cc4 (diff) | |
download | manaplus-f96919885dd0e5ae0de4a8517e76419304ca8d36.tar.gz manaplus-f96919885dd0e5ae0de4a8517e76419304ca8d36.tar.bz2 manaplus-f96919885dd0e5ae0de4a8517e76419304ca8d36.tar.xz manaplus-f96919885dd0e5ae0de4a8517e76419304ca8d36.zip |
Fix code style.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/inventoryhandler.cpp | 1 | ||||
-rw-r--r-- | src/net/ea/inventoryhandler.h | 5 | ||||
-rw-r--r-- | src/net/ea/loginhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/loginhandler.h | 4 | ||||
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/gamehandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/inventoryhandler.cpp | 3 | ||||
-rw-r--r-- | src/net/eathena/network.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/playerhandler.cpp | 1 | ||||
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/gamehandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/inventoryhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/network.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/playerhandler.cpp | 1 | ||||
-rw-r--r-- | src/net/tmwa/tradehandler.cpp | 7 |
16 files changed, 31 insertions, 11 deletions
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index 44b73928f..2a9d56ae2 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -33,6 +33,7 @@ #include "net/messagein.h" #include "net/ea/eaprotocol.h" +#include "net/ea/equipbackend.h" #include "utils/delete2.h" diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h index 6050baaff..fa2f2d0b2 100644 --- a/src/net/ea/inventoryhandler.h +++ b/src/net/ea/inventoryhandler.h @@ -25,9 +25,10 @@ #include "localconsts.h" +#include "enums/simpletypes/beingid.h" + #include "net/inventoryhandler.h" -#include "net/ea/equipbackend.h" #include "net/ea/inventoryitem.h" #include <queue> @@ -40,6 +41,8 @@ namespace Net namespace Ea { +class EquipBackend; + typedef std::vector<InventoryItem> InventoryItems; typedef std::queue<BeingId> PickupQueue; diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp index 396eb1480..0ad5a91af 100644 --- a/src/net/ea/loginhandler.cpp +++ b/src/net/ea/loginhandler.cpp @@ -37,6 +37,8 @@ #include "net/logindata.h" #include "net/messagein.h" +#include "net/ea/token.h" + #include "debug.h" namespace Ea diff --git a/src/net/ea/loginhandler.h b/src/net/ea/loginhandler.h index 1dbf97b1c..9bb41ec18 100644 --- a/src/net/ea/loginhandler.h +++ b/src/net/ea/loginhandler.h @@ -27,10 +27,10 @@ #include "net/registrationoptions.h" -#include "net/ea/token.h" - class LoginData; +struct Token; + namespace Net { class MessageIn; diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 58e302c8a..a898d3162 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -36,6 +36,8 @@ #include "net/playerhandler.h" #include "net/serverfeatures.h" +#include "net/ea/token.h" + #include "net/eathena/gamehandler.h" #include "net/eathena/loginhandler.h" #include "net/eathena/messageout.h" diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp index 4902b959f..ea8342ae3 100644 --- a/src/net/eathena/gamehandler.cpp +++ b/src/net/eathena/gamehandler.cpp @@ -29,6 +29,8 @@ #include "net/serverfeatures.h" +#include "net/ea/token.h" + #include "net/eathena/loginhandler.h" #include "net/eathena/messageout.h" #include "net/eathena/network.h" diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 54204234e..8406575bd 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -22,11 +22,13 @@ #include "net/eathena/inventoryhandler.h" +#include "item.h" #include "notifymanager.h" #include "enums/equipslot.h" #include "being/localplayer.h" +#include "being/playerinfo.h" #include "listeners/arrowslistener.h" @@ -36,6 +38,7 @@ #include "net/eathena/protocol.h" #include "net/ea/eaprotocol.h" +#include "net/ea/equipbackend.h" #include "resources/notifytypes.h" diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp index 1eed8b439..80f0f579b 100644 --- a/src/net/eathena/network.cpp +++ b/src/net/eathena/network.cpp @@ -52,7 +52,7 @@ Network::Network() : Network::~Network() { clearHandlers(); - delete2(mMessageHandlers); + delete2Arr(mMessageHandlers); mInstance = nullptr; } diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index 83f0a44b6..b7f83ead1 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -23,6 +23,7 @@ #include "net/eathena/playerhandler.h" #include "being/localplayer.h" +#include "being/playerinfo.h" #include "gui/windows/statuswindow.h" diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index 80fda81be..8f482047f 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -1624,7 +1624,7 @@ void BeingHandler::processPvpSet(Net::MessageIn &msg) if (dstBeing) { dstBeing->setPvpRank(rank); - dstBeing->setTeamId(teamId); + dstBeing->setTeamId(static_cast<uint16_t>(teamId)); dstBeing->addToCache(); } } diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 859be0bed..959e51289 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -34,6 +34,8 @@ #include "net/character.h" #include "net/serverfeatures.h" +#include "net/ea/token.h" + #include "net/tmwa/gamehandler.h" #include "net/tmwa/loginhandler.h" #include "net/tmwa/messageout.h" diff --git a/src/net/tmwa/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp index f1d7cd748..75fffc77a 100644 --- a/src/net/tmwa/gamehandler.cpp +++ b/src/net/tmwa/gamehandler.cpp @@ -27,6 +27,8 @@ #include "being/localplayer.h" +#include "net/ea/token.h" + #include "net/tmwa/loginhandler.h" #include "net/tmwa/messageout.h" #include "net/tmwa/network.h" diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index 7f81ac461..40bb9a70f 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -22,11 +22,14 @@ #include "net/tmwa/inventoryhandler.h" +#include "item.h" + #include "notifymanager.h" #include "enums/equipslot.h" #include "being/localplayer.h" +#include "being/playerinfo.h" #include "listeners/arrowslistener.h" @@ -36,6 +39,7 @@ #include "net/tmwa/protocol.h" #include "net/ea/eaprotocol.h" +#include "net/ea/equipbackend.h" #include "resources/notifytypes.h" diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp index edaabcc4d..28760d2cc 100644 --- a/src/net/tmwa/network.cpp +++ b/src/net/tmwa/network.cpp @@ -52,7 +52,7 @@ Network::Network() : Network::~Network() { clearHandlers(); - delete2(mMessageHandlers); + delete2Arr(mMessageHandlers); mInstance = nullptr; } diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index 8707c5212..6e638687a 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -23,6 +23,7 @@ #include "net/tmwa/playerhandler.h" #include "being/localplayer.h" +#include "being/playerinfo.h" #include "gui/windows/statuswindow.h" diff --git a/src/net/tmwa/tradehandler.cpp b/src/net/tmwa/tradehandler.cpp index f43c5b266..e48536874 100644 --- a/src/net/tmwa/tradehandler.cpp +++ b/src/net/tmwa/tradehandler.cpp @@ -30,7 +30,6 @@ #include "being/playerrelation.h" #include "being/playerrelations.h" -#include "gui/windows/confirmdialog.h" #include "gui/windows/tradewindow.h" #include "net/serverfeatures.h" @@ -49,7 +48,6 @@ extern Net::TradeHandler *tradeHandler; extern std::string tradePartnerName; -extern ConfirmDialog *confirmDlg; namespace TmwAthena { @@ -277,9 +275,8 @@ void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg) void TradeHandler::processTradeResponse(Net::MessageIn &msg) { - if (confirmDlg || tradePartnerName.empty() - || !player_relations.hasPermission(tradePartnerName, - PlayerRelation::TRADE)) + if (tradePartnerName.empty() || + !player_relations.hasPermission(tradePartnerName, PlayerRelation::TRADE)) { tradeHandler->respond(false); return; |