diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-05 21:49:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-06 12:12:22 +0300 |
commit | 2bd59adc7c456ce6f377feac8bc838e8011ebfc8 (patch) | |
tree | f2f25428e42e59b9a6d55d7c0be9a99c42e96e40 /src/net | |
parent | ac1ef6b19f5c1405cfaa239ab367a93b17043723 (diff) | |
download | manaverse-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.gz manaverse-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.bz2 manaverse-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.tar.xz manaverse-2bd59adc7c456ce6f377feac8bc838e8011ebfc8.zip |
Fix code style.
Diffstat (limited to 'src/net')
37 files changed, 37 insertions, 84 deletions
diff --git a/src/net/beinghandler.h b/src/net/beinghandler.h index b21af2ae6..e79f26bb3 100644 --- a/src/net/beinghandler.h +++ b/src/net/beinghandler.h @@ -26,8 +26,6 @@ #include "enums/being/rank.h" -#include "enums/simpletypes/beingid.h" - #include "net/messagein.h" namespace Net diff --git a/src/net/character.h b/src/net/character.h index 4f0295660..4e30d18eb 100644 --- a/src/net/character.h +++ b/src/net/character.h @@ -28,9 +28,6 @@ #include "utils/delete2.h" -#include <string> -#include <vector> - #include "localconsts.h" namespace Net diff --git a/src/net/download.cpp b/src/net/download.cpp index 9e86d5ea1..5d84ebedf 100644 --- a/src/net/download.cpp +++ b/src/net/download.cpp @@ -43,6 +43,8 @@ #include "utils/files.h" #endif +#include <sstream> + #include "debug.h" const char *DOWNLOAD_ERROR_MESSAGE_THREAD diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index a80a9d4f6..515deeee7 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -241,6 +241,13 @@ void BeingHandler::processBeingAction(Net::MessageIn &msg) } break; default: + case AttackType::SPLASH: + case AttackType::SKILL: + case AttackType::REPEATE: + case AttackType::MULTI_REFLECT: + case AttackType::TOUCH_SKILL: + case AttackType::MISS: + case AttackType::SKILLMISS: UNIMPLIMENTEDPACKET; break; } diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp index 0e939c217..20d34bc9f 100644 --- a/src/net/ea/buysellhandler.cpp +++ b/src/net/ea/buysellhandler.cpp @@ -27,8 +27,6 @@ #include "being/playerinfo.h" -#include "enums/being/attributes.h" - #include "gui/windows/buydialog.h" #include "gui/windows/buyselldialog.h" #include "gui/windows/npcselldialog.h" diff --git a/src/net/ea/buysellhandler.h b/src/net/ea/buysellhandler.h index 1667332bb..c308bebf3 100644 --- a/src/net/ea/buysellhandler.h +++ b/src/net/ea/buysellhandler.h @@ -23,8 +23,6 @@ #ifndef NET_EA_BUYSELLHANDLER_H #define NET_EA_BUYSELLHANDLER_H -#include "enums/simpletypes/beingid.h" - #include "net/buysellhandler.h" class BuyDialog; diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp index 42c704933..e798467e7 100644 --- a/src/net/ea/charserverhandler.cpp +++ b/src/net/ea/charserverhandler.cpp @@ -24,8 +24,6 @@ #include "client.h" -#include "enums/gui/dialogtype.h" - #include "gui/windows/charcreatedialog.h" #include "gui/windows/okdialog.h" diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp index 583ef3409..2a526f4e9 100644 --- a/src/net/ea/gamehandler.cpp +++ b/src/net/ea/gamehandler.cpp @@ -26,8 +26,6 @@ #include "game.h" #include "notifymanager.h" -#include "enums/gui/dialogtype.h" - #include "gui/windows/okdialog.h" #include "net/messagein.h" diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index e540b9bef..e95f62d3d 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -28,8 +28,6 @@ #include "enums/equipslot.h" -#include "enums/being/attributes.h" - #include "net/messagein.h" #include "net/ea/eaprotocol.h" diff --git a/src/net/ea/network.cpp b/src/net/ea/network.cpp index fd39e218b..a214cc4e5 100644 --- a/src/net/ea/network.cpp +++ b/src/net/ea/network.cpp @@ -28,6 +28,8 @@ #include "utils/gettext.h" #include "utils/sdlhelper.h" +#include <sstream> + #include "debug.h" extern unsigned int mLastHost; diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index 6b0be87e9..cb3498412 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -108,6 +108,7 @@ void PartyHandler::processPartySettingsContinue(Net::MessageIn &msg, NotifyManager::notify(NotifyTypes::PARTY_EXP_SHARE_ERROR); break; default: + case PartyShare::UNKNOWN: UNIMPLIMENTEDPACKET; break; } @@ -133,6 +134,7 @@ void PartyHandler::processPartySettingsContinue(Net::MessageIn &msg, NotifyManager::notify(NotifyTypes::PARTY_ITEM_SHARE_ERROR); break; default: + case PartyShare::UNKNOWN: UNIMPLIMENTEDPACKET; break; } diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index 092dc8ca1..42084e419 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -33,8 +33,6 @@ #include "being/localplayer.h" #include "being/playerinfo.h" -#include "enums/being/attributes.h" - #include "gui/onlineplayer.h" #include "gui/viewport.h" diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 9a678321a..ff12a909d 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -1232,7 +1232,8 @@ void BeingHandler::processBeingMove2(Net::MessageIn &msg) * later versions of eAthena for both mobs and * players */ - Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id")); + Being *const dstBeing = actorManager->findBeing( + msg.readBeingId("being id")); uint16_t srcX, srcY, dstX, dstY; msg.readCoordinatePair(srcX, srcY, dstX, dstY, "move path"); @@ -1347,6 +1348,8 @@ void BeingHandler::processBeingAction2(Net::MessageIn &msg) } break; default: + case AttackType::MISS: + case AttackType::SKILLMISS: UNIMPLIMENTEDPACKET; break; } @@ -1440,7 +1443,8 @@ void BeingHandler::processBeingChangeDirection(Net::MessageIn &msg) return; } - Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id")); + Being *const dstBeing = actorManager->findBeing( + msg.readBeingId("being id")); msg.readInt16("head direction"); @@ -1666,7 +1670,8 @@ void BeingHandler::processPlayerGuilPartyInfo(Net::MessageIn &msg) return; } - Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id")); + Being *const dstBeing = actorManager->findBeing( + msg.readBeingId("being id")); if (dstBeing) { diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp index baaee1aca..5e99994f9 100644 --- a/src/net/eathena/buyingstorehandler.cpp +++ b/src/net/eathena/buyingstorehandler.cpp @@ -25,12 +25,9 @@ #include "notifymanager.h" #include "shopitem.h" -#include "being/being.h" #include "being/localplayer.h" #include "being/playerinfo.h" -#include "enums/being/attributes.h" - #include "gui/windows/buyingstoreselldialog.h" #include "listeners/arrowslistener.h" diff --git a/src/net/eathena/buysellhandler.cpp b/src/net/eathena/buysellhandler.cpp index 26a5a538b..c10978b3d 100644 --- a/src/net/eathena/buysellhandler.cpp +++ b/src/net/eathena/buysellhandler.cpp @@ -26,8 +26,6 @@ #include "being/playerinfo.h" -#include "enums/being/attributes.h" - #include "gui/windows/buydialog.h" #include "net/eathena/messageout.h" diff --git a/src/net/eathena/cashshophandler.cpp b/src/net/eathena/cashshophandler.cpp index c2b872eca..785e3f62a 100644 --- a/src/net/eathena/cashshophandler.cpp +++ b/src/net/eathena/cashshophandler.cpp @@ -20,12 +20,8 @@ #include "net/eathena/cashshophandler.h" -#include "logger.h" - #include "being/playerinfo.h" -#include "enums/being/attributes.h" - #include "gui/windows/buydialog.h" #include "net/eathena/messageout.h" diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 835360c64..63ca3f277 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -26,10 +26,6 @@ #include "configuration.h" #include "settings.h" -#include "enums/being/attributes.h" - -#include "enums/gui/dialogtype.h" - #include "gui/windows/charcreatedialog.h" #include "gui/windows/charselectdialog.h" #include "gui/windows/okdialog.h" diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 3cade553c..db7bb5829 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -47,8 +47,6 @@ #include "utils/gettext.h" #include "utils/stringutils.h" -#include <string> - #include "debug.h" extern Net::ChatHandler *chatHandler; diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp index 7fa94ab48..4902b959f 100644 --- a/src/net/eathena/gamehandler.cpp +++ b/src/net/eathena/gamehandler.cpp @@ -23,6 +23,7 @@ #include "net/eathena/gamehandler.h" #include "client.h" +#include "logger.h" #include "being/localplayer.h" diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp index 072605e78..2f404ce76 100644 --- a/src/net/eathena/generalhandler.cpp +++ b/src/net/eathena/generalhandler.cpp @@ -24,24 +24,17 @@ #include "client.h" #include "configuration.h" -#include "logger.h" -#include "enums/being/attributes.h" - -#include "gui/windows/inventorywindow.h" #include "gui/windows/skilldialog.h" #include "gui/windows/socialwindow.h" #include "gui/windows/statuswindow.h" -#include "net/ea/guildhandler.h" - #include "gui/widgets/tabs/chat/guildtab.h" #include "gui/widgets/tabs/chat/partytab.h" #include "net/eathena/adminhandler.h" #include "net/eathena/auctionhandler.h" #include "net/eathena/bankhandler.h" -#include "net/eathena/battlegroundhandler.h" #include "net/eathena/beinghandler.h" #include "net/eathena/buyingstorehandler.h" #include "net/eathena/buysellhandler.h" @@ -58,7 +51,6 @@ #include "net/eathena/itemhandler.h" #include "net/eathena/loginhandler.h" #include "net/eathena/mailhandler.h" -#include "net/eathena/maphandler.h" #include "net/eathena/markethandler.h" #include "net/eathena/mercenaryhandler.h" #include "net/eathena/network.h" diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp index bffe95b94..31f1edba7 100644 --- a/src/net/eathena/guildhandler.cpp +++ b/src/net/eathena/guildhandler.cpp @@ -512,8 +512,8 @@ void GuildHandler::changeEmblem(std::string emblem) const createOutPacket(CMSG_GUILD_CHANGE_EMBLEM); if (emblem.size() > 200) emblem = emblem.substr(0, 200); - const int sz = emblem.size(); - outMsg.writeInt16(sz + 4, "len"); + const int sz = static_cast<int>(emblem.size()); + outMsg.writeInt16(static_cast<int16_t>(sz + 4), "len"); outMsg.writeString(emblem, sz, "emblem"); } diff --git a/src/net/eathena/homunculushandler.cpp b/src/net/eathena/homunculushandler.cpp index e2441ac14..537ea33d8 100644 --- a/src/net/eathena/homunculushandler.cpp +++ b/src/net/eathena/homunculushandler.cpp @@ -301,7 +301,7 @@ void HomunculusHandler::talk(const std::string &restrict text) const createOutPacket(CMSG_HOMMERC_TALK); outMsg.writeInt16(static_cast<int16_t>(sz + 4 + 1), "len"); - outMsg.writeString(msg, sz, "message"); + outMsg.writeString(msg, static_cast<int>(sz), "message"); outMsg.writeInt8(0, "zero byte"); } diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index ed834c9e8..54204234e 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -26,8 +26,6 @@ #include "enums/equipslot.h" -#include "enums/being/attributes.h" - #include "being/localplayer.h" #include "listeners/arrowslistener.h" diff --git a/src/net/eathena/markethandler.cpp b/src/net/eathena/markethandler.cpp index 12beafd98..ec9e3c095 100644 --- a/src/net/eathena/markethandler.cpp +++ b/src/net/eathena/markethandler.cpp @@ -24,8 +24,6 @@ #include "being/playerinfo.h" -#include "enums/being/attributes.h" - #include "gui/windows/buydialog.h" #include "net/eathena/messageout.h" @@ -127,7 +125,7 @@ void MarketHandler::buyItem(const int itemId, cnt = 100; createOutPacket(CMSG_NPC_MARKET_BUY); - outMsg.writeInt16(4 + 6 * cnt, "len"); + outMsg.writeInt16(static_cast<int16_t>(4 + 6 * cnt), "len"); for (int f = 0; f < cnt; f ++) { outMsg.writeInt16(static_cast<int16_t>(itemId), "item id"); diff --git a/src/net/eathena/mercenaryhandler.cpp b/src/net/eathena/mercenaryhandler.cpp index 82f7b59c2..bbe8cc8bf 100644 --- a/src/net/eathena/mercenaryhandler.cpp +++ b/src/net/eathena/mercenaryhandler.cpp @@ -23,7 +23,6 @@ #include "actormanager.h" #include "notifymanager.h" -#include "being/being.h" #include "being/localplayer.h" #include "being/mercenaryinfo.h" #include "being/playerinfo.h" @@ -90,7 +89,8 @@ void MercenaryHandler::processMercenaryUpdate(Net::MessageIn &msg) void MercenaryHandler::processMercenaryInfo(Net::MessageIn &msg) { // +++ need create if need mercenary being and update stats - Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id")); + Being *const dstBeing = actorManager->findBeing( + msg.readBeingId("being id")); msg.readInt16("atk"); msg.readInt16("matk"); msg.readInt16("hit"); diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp index f89a6d53a..f737ba6a1 100644 --- a/src/net/eathena/pethandler.cpp +++ b/src/net/eathena/pethandler.cpp @@ -21,20 +21,16 @@ #include "net/eathena/pethandler.h" #include "actormanager.h" -#include "inventory.h" #include "notifymanager.h" #include "being/localplayer.h" #include "being/petinfo.h" #include "being/playerinfo.h" -#include "gui/chatconsts.h" - #include "gui/windows/eggselectiondialog.h" #include "gui/widgets/tabs/chat/chattab.h" -#include "net/chathandler.h" #include "net/inventoryhandler.h" #include "net/serverfeatures.h" diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index 83cbec9ba..83f0a44b6 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -24,8 +24,6 @@ #include "being/localplayer.h" -#include "enums/being/attributes.h" - #include "gui/windows/statuswindow.h" #include "input/inputmanager.h" diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp index 1bbe491cf..f53a7b861 100644 --- a/src/net/eathena/vendinghandler.cpp +++ b/src/net/eathena/vendinghandler.cpp @@ -23,9 +23,6 @@ #include "actormanager.h" #include "shopitem.h" -#include "enums/being/attributes.h" - -#include "being/being.h" #include "being/localplayer.h" #include "being/playerinfo.h" diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h index 3cb104d2c..75f726254 100644 --- a/src/net/playerhandler.h +++ b/src/net/playerhandler.h @@ -28,7 +28,6 @@ #include "enums/being/attributes.h" #include "enums/being/beingaction.h" -#include "enums/simpletypes/beingid.h" #include "enums/simpletypes/keep.h" #include "enums/simpletypes/notify.h" diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index 7d13f2a70..a9b324b1e 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -1352,7 +1352,8 @@ void BeingHandler::processBeingMove2(Net::MessageIn &msg) * later versions of eAthena for both mobs and * players */ - Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id")); + Being *const dstBeing = actorManager->findBeing( + msg.readBeingId("being id")); /* * This packet doesn't have enough info to actually @@ -1387,7 +1388,8 @@ void BeingHandler::processBeingChangeDirection(Net::MessageIn &msg) return; } - Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id")); + Being *const dstBeing = actorManager->findBeing( + msg.readBeingId("being id")); if (!dstBeing) { @@ -1525,7 +1527,8 @@ void BeingHandler::processPlayerGuilPartyInfo(Net::MessageIn &msg) return; } - Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id")); + Being *const dstBeing = actorManager->findBeing( + msg.readBeingId("being id")); if (dstBeing) { @@ -1598,7 +1601,8 @@ void BeingHandler::processIpResponse(Net::MessageIn &msg) return; } - Being *const dstBeing = actorManager->findBeing(msg.readBeingId("being id")); + Being *const dstBeing = actorManager->findBeing( + msg.readBeingId("being id")); if (dstBeing) dstBeing->setIp(ipToString(msg.readInt32("ip address"))); BLOCK_END("BeingHandler::processIpResponse") diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp index 28261579e..7ee35c689 100644 --- a/src/net/tmwa/buysellhandler.cpp +++ b/src/net/tmwa/buysellhandler.cpp @@ -27,8 +27,6 @@ #include "being/playerinfo.h" -#include "enums/being/attributes.h" - #include "gui/windows/buydialog.h" #include "gui/windows/chatwindow.h" #include "gui/windows/shopwindow.h" @@ -40,7 +38,6 @@ #include "resources/notifytypes.h" -#include "utils/stringutils.h" #include "utils/timer.h" #include "debug.h" diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 32a09817a..71c56e457 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -26,10 +26,6 @@ #include "configuration.h" #include "settings.h" -#include "enums/being/attributes.h" - -#include "enums/gui/dialogtype.h" - #include "gui/windows/charcreatedialog.h" #include "gui/windows/okdialog.h" diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp index ed3a1318f..70ee87049 100644 --- a/src/net/tmwa/chathandler.cpp +++ b/src/net/tmwa/chathandler.cpp @@ -41,10 +41,6 @@ #include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" -#include "utils/stringutils.h" - -#include <string> - #include "debug.h" extern Net::ChatHandler *chatHandler; diff --git a/src/net/tmwa/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp index 83bc6e966..f1d7cd748 100644 --- a/src/net/tmwa/gamehandler.cpp +++ b/src/net/tmwa/gamehandler.cpp @@ -23,6 +23,7 @@ #include "net/tmwa/gamehandler.h" #include "client.h" +#include "logger.h" #include "being/localplayer.h" diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index e7da97a1d..8c173f248 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -25,8 +25,6 @@ #include "client.h" #include "configuration.h" -#include "enums/being/attributes.h" - #include "gui/windows/skilldialog.h" #include "gui/windows/socialwindow.h" #include "gui/windows/statuswindow.h" diff --git a/src/net/tmwa/guildmanager.cpp b/src/net/tmwa/guildmanager.cpp index bd96ba0f0..a83672f87 100644 --- a/src/net/tmwa/guildmanager.cpp +++ b/src/net/tmwa/guildmanager.cpp @@ -28,8 +28,6 @@ #include "being/localplayer.h" -#include "enums/net/packettype.h" - #include "gui/windows/chatwindow.h" #include "gui/windows/socialwindow.h" diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index 8a730db8f..8707c5212 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -24,8 +24,6 @@ #include "being/localplayer.h" -#include "enums/being/attributes.h" - #include "gui/windows/statuswindow.h" #include "net/tmwa/inventoryhandler.h" |