diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-12-18 16:10:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-12-18 16:10:08 +0300 |
commit | 3fb675aa416170395d80eb51435a0d09161baf36 (patch) | |
tree | ebc15a0ad412d8680b897d6e54c49c607077a9f2 | |
parent | 120e0b5b384566c89984aeea86ae517909ebaac1 (diff) | |
download | manaverse-3fb675aa416170395d80eb51435a0d09161baf36.tar.gz manaverse-3fb675aa416170395d80eb51435a0d09161baf36.tar.bz2 manaverse-3fb675aa416170395d80eb51435a0d09161baf36.tar.xz manaverse-3fb675aa416170395d80eb51435a0d09161baf36.zip |
Move inventory index related constants into separate file.
-rw-r--r-- | src/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/const/net/inventory.h | 29 | ||||
-rw-r--r-- | src/net/ea/buysellrecv.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/eaprotocol.h | 3 | ||||
-rw-r--r-- | src/net/ea/inventoryrecv.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/auctionhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/buyingstorehandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/buyingstorerecv.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/inventoryhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/inventoryrecv.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/mailhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/npchandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/petrecv.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/tradehandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/vendinghandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/inventoryhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/inventoryrecv.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/npchandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/tradehandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/traderecv.cpp | 2 |
21 files changed, 65 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9b5f58718..58472028d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -557,6 +557,7 @@ SET(SRCS net/npchandler.h net/net.cpp net/net.h + const/net/inventory.h const/net/net.h net/partyhandler.h enums/net/partyshare.h diff --git a/src/Makefile.am b/src/Makefile.am index 2841837c7..10677e7b6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1227,6 +1227,7 @@ manaplus_SOURCES += main.cpp \ net/messageout.h \ net/net.cpp \ net/net.h \ + const/net/inventory.h \ const/net/net.h \ net/npchandler.h \ net/partyhandler.h \ diff --git a/src/const/net/inventory.h b/src/const/net/inventory.h new file mode 100644 index 000000000..37ef8ab74 --- /dev/null +++ b/src/const/net/inventory.h @@ -0,0 +1,29 @@ +/* + * 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 + * + * 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 CONST_NET_INVENTORY_H +#define CONST_NET_INVENTORY_H + +static const int INVENTORY_OFFSET = 2; +static const int STORAGE_OFFSET = 1; + +#endif // CONST_NET_INVENTORY_H diff --git a/src/net/ea/buysellrecv.cpp b/src/net/ea/buysellrecv.cpp index 28c0409f8..27e74ba6d 100644 --- a/src/net/ea/buysellrecv.cpp +++ b/src/net/ea/buysellrecv.cpp @@ -28,6 +28,8 @@ #include "being/playerinfo.h" +#include "const/net/inventory.h" + #include "enums/resources/notifytypes.h" #include "gui/windows/buydialog.h" diff --git a/src/net/ea/eaprotocol.h b/src/net/ea/eaprotocol.h index 48a7d9262..90b2b37af 100644 --- a/src/net/ea/eaprotocol.h +++ b/src/net/ea/eaprotocol.h @@ -102,7 +102,4 @@ enum EA_SPRITE_VECTOREND }; -static const int INVENTORY_OFFSET = 2; -static const int STORAGE_OFFSET = 1; - #endif // NET_EA_EAPROTOCOL_H diff --git a/src/net/ea/inventoryrecv.cpp b/src/net/ea/inventoryrecv.cpp index bda53bab3..65ba9078d 100644 --- a/src/net/ea/inventoryrecv.cpp +++ b/src/net/ea/inventoryrecv.cpp @@ -26,6 +26,8 @@ #include "being/localplayer.h" +#include "const/net/inventory.h" + #include "enums/equipslot.h" #include "enums/resources/notifytypes.h" diff --git a/src/net/eathena/auctionhandler.cpp b/src/net/eathena/auctionhandler.cpp index 0db4518d0..79d72ebc0 100644 --- a/src/net/eathena/auctionhandler.cpp +++ b/src/net/eathena/auctionhandler.cpp @@ -22,6 +22,8 @@ #include "item.h" +#include "const/net/inventory.h" + #include "net/ea/eaprotocol.h" #include "net/eathena/messageout.h" diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp index 27743db7b..682cc68cb 100644 --- a/src/net/eathena/buyingstorehandler.cpp +++ b/src/net/eathena/buyingstorehandler.cpp @@ -25,6 +25,8 @@ #include "being/being.h" #include "being/playerinfo.h" +#include "const/net/inventory.h" + #include "net/ea/eaprotocol.h" #include "net/eathena/messageout.h" diff --git a/src/net/eathena/buyingstorerecv.cpp b/src/net/eathena/buyingstorerecv.cpp index 5094abfef..0dd2096c1 100644 --- a/src/net/eathena/buyingstorerecv.cpp +++ b/src/net/eathena/buyingstorerecv.cpp @@ -28,6 +28,8 @@ #include "being/localplayer.h" #include "being/playerinfo.h" +#include "const/net/inventory.h" + #include "enums/resources/notifytypes.h" #include "gui/windows/buyingstoreselldialog.h" diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 05d8c77ca..76dc02800 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -24,6 +24,8 @@ #include "item.h" +#include "const/net/inventory.h" + #include "enums/equipslot.h" #include "net/eathena/inventoryrecv.h" diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp index 044b4a9d3..91dd66fb9 100644 --- a/src/net/eathena/inventoryrecv.cpp +++ b/src/net/eathena/inventoryrecv.cpp @@ -27,6 +27,8 @@ #include "being/localplayer.h" +#include "const/net/inventory.h" + #include "enums/resources/notifytypes.h" #include "enums/net/deleteitemreason.h" diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp index 013ac9107..14fa96073 100644 --- a/src/net/eathena/mailhandler.cpp +++ b/src/net/eathena/mailhandler.cpp @@ -20,6 +20,8 @@ #include "net/eathena/mailhandler.h" +#include "const/net/inventory.h" + #include "net/ea/eaprotocol.h" #include "net/eathena/messageout.h" diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp index 9b09d8799..7ec98f382 100644 --- a/src/net/eathena/npchandler.cpp +++ b/src/net/eathena/npchandler.cpp @@ -26,6 +26,8 @@ #include "being/localplayer.h" +#include "const/net/inventory.h" + #include "gui/windows/npcdialog.h" #include "gui/widgets/createwidget.h" diff --git a/src/net/eathena/petrecv.cpp b/src/net/eathena/petrecv.cpp index a801b2a3a..474c0315b 100644 --- a/src/net/eathena/petrecv.cpp +++ b/src/net/eathena/petrecv.cpp @@ -27,6 +27,8 @@ #include "being/petinfo.h" #include "being/playerinfo.h" +#include "const/net/inventory.h" + #include "enums/resources/notifytypes.h" #include "gui/windows/eggselectiondialog.h" diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp index 99c670437..801cdc51e 100644 --- a/src/net/eathena/tradehandler.cpp +++ b/src/net/eathena/tradehandler.cpp @@ -26,6 +26,8 @@ #include "being/playerinfo.h" +#include "const/net/inventory.h" + #include "net/eathena/messageout.h" #include "net/eathena/protocolout.h" #include "net/eathena/traderecv.h" diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp index fed7b66ca..6e387317d 100644 --- a/src/net/eathena/vendinghandler.cpp +++ b/src/net/eathena/vendinghandler.cpp @@ -25,6 +25,8 @@ #include "being/being.h" #include "being/playerinfo.h" +#include "const/net/inventory.h" + #include "net/ea/eaprotocol.h" #include "net/eathena/messageout.h" diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index f4af144ea..189eae351 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -24,6 +24,8 @@ #include "item.h" +#include "const/net/inventory.h" + #include "enums/equipslot.h" #include "net/tmwa/messageout.h" diff --git a/src/net/tmwa/inventoryrecv.cpp b/src/net/tmwa/inventoryrecv.cpp index 815e4333c..ee5323095 100644 --- a/src/net/tmwa/inventoryrecv.cpp +++ b/src/net/tmwa/inventoryrecv.cpp @@ -26,6 +26,8 @@ #include "being/localplayer.h" +#include "const/net/inventory.h" + #include "enums/resources/notifytypes.h" #include "listeners/arrowslistener.h" diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp index 71b5ce1d2..eac7c883d 100644 --- a/src/net/tmwa/npchandler.cpp +++ b/src/net/tmwa/npchandler.cpp @@ -24,6 +24,8 @@ #include "being/localplayer.h" +#include "const/net/inventory.h" + #include "gui/windows/npcdialog.h" #include "gui/widgets/createwidget.h" diff --git a/src/net/tmwa/tradehandler.cpp b/src/net/tmwa/tradehandler.cpp index 14e407bb9..7a4161388 100644 --- a/src/net/tmwa/tradehandler.cpp +++ b/src/net/tmwa/tradehandler.cpp @@ -26,6 +26,8 @@ #include "being/playerinfo.h" +#include "const/net/inventory.h" + #include "net/tmwa/messageout.h" #include "net/tmwa/protocolout.h" diff --git a/src/net/tmwa/traderecv.cpp b/src/net/tmwa/traderecv.cpp index e616313c0..d5e6ab586 100644 --- a/src/net/tmwa/traderecv.cpp +++ b/src/net/tmwa/traderecv.cpp @@ -30,6 +30,8 @@ #include "being/playerrelation.h" #include "being/playerrelations.h" +#include "const/net/inventory.h" + #include "enums/resources/notifytypes.h" #include "gui/windows/tradewindow.h" |