diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-07 19:26:12 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-07 19:26:12 +0300 |
commit | 6e2a02c73e54648c7eefe2cb8cfc99a285fed868 (patch) | |
tree | 6f5a47590d861bbbb8065a203de054b1f9503303 /src/net/eathena | |
parent | e06101a4c8633a43d813d4a62bde2d9f49c128bf (diff) | |
download | plus-6e2a02c73e54648c7eefe2cb8cfc99a285fed868.tar.gz plus-6e2a02c73e54648c7eefe2cb8cfc99a285fed868.tar.bz2 plus-6e2a02c73e54648c7eefe2cb8cfc99a285fed868.tar.xz plus-6e2a02c73e54648c7eefe2cb8cfc99a285fed868.zip |
Split protocol.h into protocolin.h and protocolout.h
Diffstat (limited to 'src/net/eathena')
32 files changed, 66 insertions, 40 deletions
diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp index abb15365f..be909ed24 100644 --- a/src/net/eathena/adminhandler.cpp +++ b/src/net/eathena/adminhandler.cpp @@ -25,7 +25,7 @@ #include "being/being.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/auctionhandler.cpp b/src/net/eathena/auctionhandler.cpp index 742253423..0db4518d0 100644 --- a/src/net/eathena/auctionhandler.cpp +++ b/src/net/eathena/auctionhandler.cpp @@ -25,7 +25,7 @@ #include "net/ea/eaprotocol.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/bankhandler.cpp b/src/net/eathena/bankhandler.cpp index 1ff63fe1f..1c5a35056 100644 --- a/src/net/eathena/bankhandler.cpp +++ b/src/net/eathena/bankhandler.cpp @@ -21,7 +21,7 @@ #include "net/eathena/bankhandler.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/battlegroundhandler.cpp b/src/net/eathena/battlegroundhandler.cpp index 544f51f76..22f3accda 100644 --- a/src/net/eathena/battlegroundhandler.cpp +++ b/src/net/eathena/battlegroundhandler.cpp @@ -21,7 +21,7 @@ #include "net/eathena/battlegroundhandler.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 683f5ec0d..ddee2d6fa 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -23,7 +23,7 @@ #include "net/eathena/beinghandler.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "net/eathena/sprite.h" #include "debug.h" diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp index e59954968..27743db7b 100644 --- a/src/net/eathena/buyingstorehandler.cpp +++ b/src/net/eathena/buyingstorehandler.cpp @@ -28,7 +28,7 @@ #include "net/ea/eaprotocol.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/buysellhandler.cpp b/src/net/eathena/buysellhandler.cpp index 7de9b1bdb..eac9f994f 100644 --- a/src/net/eathena/buysellhandler.cpp +++ b/src/net/eathena/buysellhandler.cpp @@ -25,7 +25,7 @@ #include "net/ea/buysellrecv.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/cashshophandler.cpp b/src/net/eathena/cashshophandler.cpp index 058dedfdc..5bb54b119 100644 --- a/src/net/eathena/cashshophandler.cpp +++ b/src/net/eathena/cashshophandler.cpp @@ -22,7 +22,7 @@ #include "net/eathena/cashshoprecv.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 4a0010529..0b6ffa1bb 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -33,7 +33,7 @@ #include "net/eathena/loginhandler.h" #include "net/eathena/messageout.h" #include "net/eathena/network.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/charserverrecv.cpp b/src/net/eathena/charserverrecv.cpp index 62be4a694..1939749b0 100644 --- a/src/net/eathena/charserverrecv.cpp +++ b/src/net/eathena/charserverrecv.cpp @@ -42,7 +42,7 @@ #include "net/eathena/loginhandler.h" #include "net/eathena/messageout.h" #include "net/eathena/network.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "net/eathena/sprite.h" #include "resources/iteminfo.h" diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 2721bb3fb..c3f8bf039 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -30,7 +30,7 @@ #include "net/eathena/chatrecv.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "resources/chatobject.h" diff --git a/src/net/eathena/familyhandler.cpp b/src/net/eathena/familyhandler.cpp index 37c6cd079..b91758a40 100644 --- a/src/net/eathena/familyhandler.cpp +++ b/src/net/eathena/familyhandler.cpp @@ -24,7 +24,7 @@ #include "net/eathena/familyrecv.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/friendshandler.cpp b/src/net/eathena/friendshandler.cpp index 1e13b196e..873618b2b 100644 --- a/src/net/eathena/friendshandler.cpp +++ b/src/net/eathena/friendshandler.cpp @@ -21,7 +21,7 @@ #include "net/eathena/friendshandler.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp index 9c23c1435..1b5b1bc3a 100644 --- a/src/net/eathena/gamehandler.cpp +++ b/src/net/eathena/gamehandler.cpp @@ -35,7 +35,7 @@ #include "net/eathena/loginhandler.h" #include "net/eathena/messageout.h" #include "net/eathena/network.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp index 98adedbc4..4f0f4f483 100644 --- a/src/net/eathena/guildhandler.cpp +++ b/src/net/eathena/guildhandler.cpp @@ -29,7 +29,7 @@ #include "net/ea/guildrecv.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/homunculushandler.cpp b/src/net/eathena/homunculushandler.cpp index 359b0a856..a2806d6e4 100644 --- a/src/net/eathena/homunculushandler.cpp +++ b/src/net/eathena/homunculushandler.cpp @@ -25,7 +25,7 @@ #include "net/serverfeatures.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index dd5c655b3..1b781c3be 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -29,7 +29,7 @@ #include "net/eathena/inventoryrecv.h" #include "net/eathena/menu.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "net/ea/eaprotocol.h" diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp index 52435cf24..71bf67245 100644 --- a/src/net/eathena/loginhandler.cpp +++ b/src/net/eathena/loginhandler.cpp @@ -29,7 +29,7 @@ #include "net/eathena/messageout.h" #include "net/eathena/network.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp index 8ab0fc9d8..013ac9107 100644 --- a/src/net/eathena/mailhandler.cpp +++ b/src/net/eathena/mailhandler.cpp @@ -23,7 +23,7 @@ #include "net/ea/eaprotocol.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/markethandler.cpp b/src/net/eathena/markethandler.cpp index 5c71b3032..b96e5b588 100644 --- a/src/net/eathena/markethandler.cpp +++ b/src/net/eathena/markethandler.cpp @@ -22,7 +22,7 @@ #include "net/eathena/marketrecv.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/mercenaryhandler.cpp b/src/net/eathena/mercenaryhandler.cpp index a7b9c957c..227626304 100644 --- a/src/net/eathena/mercenaryhandler.cpp +++ b/src/net/eathena/mercenaryhandler.cpp @@ -25,7 +25,7 @@ #include "net/serverfeatures.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp index 00afb763b..74474b08f 100644 --- a/src/net/eathena/npchandler.cpp +++ b/src/net/eathena/npchandler.cpp @@ -34,7 +34,8 @@ #include "net/ea/npcrecv.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolin.h" +#include "net/eathena/protocolout.h" #include "debug.h" @@ -197,6 +198,7 @@ void NpcHandler::selectAutoSpell(const int skillId) const BeingId NpcHandler::getNpc(Net::MessageIn &msg) { + // +++ must be removed SMSG_* if (msg.getId() == SMSG_NPC_CHOICE || msg.getId() == SMSG_NPC_MESSAGE || msg.getId() == SMSG_NPC_CHANGETITLE) @@ -209,11 +211,13 @@ BeingId NpcHandler::getNpc(Net::MessageIn &msg) const NpcDialogs::const_iterator diag = NpcDialog::mNpcDialogs.find(npcId); Ea::NpcRecv::mDialog = nullptr; + // +++ must be removed SMSG_* if (msg.getId() == SMSG_NPC_VIEWPOINT) return npcId; if (diag == NpcDialog::mNpcDialogs.end()) { + // +++ must be removed SMSG_* // Empty dialogs don't help if (msg.getId() == SMSG_NPC_CLOSE) { diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp index 18c0c3517..3aaefe7ce 100644 --- a/src/net/eathena/partyhandler.cpp +++ b/src/net/eathena/partyhandler.cpp @@ -32,7 +32,7 @@ #include "net/ea/partyrecv.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp index 8a005d265..7ebc11a9e 100644 --- a/src/net/eathena/pethandler.cpp +++ b/src/net/eathena/pethandler.cpp @@ -25,7 +25,7 @@ #include "net/serverfeatures.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index 28fa63a27..59184c415 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -25,7 +25,7 @@ #include "being/playerinfo.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "net/eathena/inventoryhandler.h" #include "debug.h" diff --git a/src/net/eathena/protocolin.h b/src/net/eathena/protocolin.h new file mode 100644 index 000000000..7c2f7d4c8 --- /dev/null +++ b/src/net/eathena/protocolin.h @@ -0,0 +1,28 @@ +/* + * The ManaPlus Client + * Copyright (C) 2015 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef NET_EATHENA_PROTOCOLIN_H +#define NET_EATHENA_PROTOCOLIN_H + +#include "net/protocolindefine.h" +#include "net/eathena/packetsin.inc" +#undef packet + +#endif // NET_EATHENA_PROTOCOLIN_H diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocolout.h index ddf3f08fd..13376bcfb 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocolout.h @@ -1,8 +1,6 @@ /* * The ManaPlus Client - * Copyright (C) 2004-2009 The Mana World Development Team - * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2015 The ManaPlus Developers + * Copyright (C) 2015 The ManaPlus Developers * * This file is part of The ManaPlus Client. * @@ -20,15 +18,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_EATHENA_PROTOCOL_H -#define NET_EATHENA_PROTOCOL_H - -#include "net/protocolindefine.h" -#include "net/eathena/packetsin.inc" -#undef packet +#ifndef NET_EATHENA_PROTOCOLOUT_H +#define NET_EATHENA_PROTOCOLOUT_H #include "net/protocoloutdefine.h" #include "net/eathena/packetsout.inc" #undef packet -#endif // NET_EATHENA_PROTOCOL_H +#endif // NET_EATHENA_PROTOCOLOUT_H diff --git a/src/net/eathena/questhandler.cpp b/src/net/eathena/questhandler.cpp index f1c77aa1a..d6d36e5eb 100644 --- a/src/net/eathena/questhandler.cpp +++ b/src/net/eathena/questhandler.cpp @@ -21,7 +21,7 @@ #include "net/eathena/questhandler.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/searchstorehandler.cpp b/src/net/eathena/searchstorehandler.cpp index 871807f62..fcea736aa 100644 --- a/src/net/eathena/searchstorehandler.cpp +++ b/src/net/eathena/searchstorehandler.cpp @@ -21,7 +21,7 @@ #include "net/eathena/searchstorehandler.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp index 82eab62c7..edf8ebbc5 100644 --- a/src/net/eathena/skillhandler.cpp +++ b/src/net/eathena/skillhandler.cpp @@ -23,7 +23,7 @@ #include "net/eathena/skillhandler.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "debug.h" diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp index 8a59b6739..99c670437 100644 --- a/src/net/eathena/tradehandler.cpp +++ b/src/net/eathena/tradehandler.cpp @@ -27,7 +27,7 @@ #include "being/playerinfo.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "net/eathena/traderecv.h" #include "net/ea/eaprotocol.h" diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp index f56ad677c..fed7b66ca 100644 --- a/src/net/eathena/vendinghandler.cpp +++ b/src/net/eathena/vendinghandler.cpp @@ -28,7 +28,7 @@ #include "net/ea/eaprotocol.h" #include "net/eathena/messageout.h" -#include "net/eathena/protocol.h" +#include "net/eathena/protocolout.h" #include "net/eathena/vendingrecv.h" #include "debug.h" |