diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-06 18:02:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-06 18:02:33 +0300 |
commit | 088ce632451aef33f28801029aaded8c5a4c9dac (patch) | |
tree | 4cdb30ea2f785591172a422ad6ed5459d0c22f66 | |
parent | 0ca80e1e00996eb0ad8cb431d5de2b816a134182 (diff) | |
download | manaplus-088ce632451aef33f28801029aaded8c5a4c9dac.tar.gz manaplus-088ce632451aef33f28801029aaded8c5a4c9dac.tar.bz2 manaplus-088ce632451aef33f28801029aaded8c5a4c9dac.tar.xz manaplus-088ce632451aef33f28801029aaded8c5a4c9dac.zip |
Move pckettypes enum into separate file.
-rw-r--r-- | src/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/actormanager.cpp | 2 | ||||
-rw-r--r-- | src/being/being.cpp | 2 | ||||
-rw-r--r-- | src/being/localplayer.cpp | 2 | ||||
-rw-r--r-- | src/dropshortcut.cpp | 2 | ||||
-rw-r--r-- | src/enums/net/packettypes.h | 42 | ||||
-rw-r--r-- | src/gui/windows/npcdialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/whoisonline.cpp | 2 | ||||
-rw-r--r-- | src/guildmanager.cpp | 2 | ||||
-rw-r--r-- | src/net/packetlimiter.cpp | 2 | ||||
-rw-r--r-- | src/net/packetlimiter.h | 18 |
12 files changed, 60 insertions, 18 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b8f7a2bfb..f41093291 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -539,6 +539,7 @@ SET(SRCS net/download.cpp net/download.h enums/net/downloadstatus.h + enums/net/packettypes.h net/gamehandler.h net/generalhandler.h net/guildhandler.h diff --git a/src/Makefile.am b/src/Makefile.am index 1baa9a521..236247095 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -669,6 +669,7 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \ net/download.cpp \ net/download.h \ enums/net/downloadstatus.h \ + enums/net/packettypes.h \ net/gamehandler.h \ net/generalhandler.h \ net/guildhandler.h \ diff --git a/src/actormanager.cpp b/src/actormanager.cpp index 499471b02..7a1ec6126 100644 --- a/src/actormanager.cpp +++ b/src/actormanager.cpp @@ -31,6 +31,8 @@ #include "being/playerinfo.h" #include "being/playerrelations.h" +#include "enums/net/packettypes.h" + #include "gui/viewport.h" #include "gui/widgets/tabs/chat/chattab.h" diff --git a/src/being/being.cpp b/src/being/being.cpp index f85460c79..ebf7ee566 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -39,6 +39,8 @@ #include "being/beingspeech.h" #include "being/playerrelations.h" +#include "enums/net/packettypes.h" + #include "particle/particle.h" #include "particle/particleinfo.h" diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 30d32c085..53189f531 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -41,6 +41,8 @@ #include "being/playerinfo.h" #include "being/playerrelations.h" +#include "enums/net/packettypes.h" + #include "particle/particle.h" #include "input/keyboardconfig.h" diff --git a/src/dropshortcut.cpp b/src/dropshortcut.cpp index 2b39ce672..66a58c6bd 100644 --- a/src/dropshortcut.cpp +++ b/src/dropshortcut.cpp @@ -29,6 +29,8 @@ #include "being/localplayer.h" #include "being/playerinfo.h" +#include "enums/net/packettypes.h" + #include "net/packetlimiter.h" #include "debug.h" diff --git a/src/enums/net/packettypes.h b/src/enums/net/packettypes.h new file mode 100644 index 000000000..b1349b216 --- /dev/null +++ b/src/enums/net/packettypes.h @@ -0,0 +1,42 @@ +/* + * The ManaPlus Client + * 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 ENUMS_NET_PACKETLIMITER_H +#define ENUMS_NET_PACKETLIMITER_H + +enum PacketTypes +{ + PACKET_CHAT = 0, + PACKET_PICKUP = 1, + PACKET_DROP = 2, + PACKET_NPC_NEXT = 3, + PACKET_NPC_TALK = 4, + PACKET_NPC_INPUT = 5, + PACKET_EMOTE = 6, + PACKET_SIT = 7, + PACKET_DIRECTION = 8, + PACKET_ATTACK = 9, + PACKET_STOPATTACK = 10, + PACKET_ONLINELIST = 11, + PACKET_WHISPER = 12, + PACKET_SIZE +}; + +#endif // ENUMS_NET_PACKETLIMITER_H diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp index a6a15b794..6eeb3153f 100644 --- a/src/gui/windows/npcdialog.cpp +++ b/src/gui/windows/npcdialog.cpp @@ -32,6 +32,8 @@ #include "being/being.h" +#include "enums/net/packettypes.h" + #include "gui/gui.h" #include "gui/viewport.h" diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp index 7ad387cfe..54e82c846 100644 --- a/src/gui/windows/whoisonline.cpp +++ b/src/gui/windows/whoisonline.cpp @@ -46,6 +46,8 @@ #include "being/localplayer.h" #include "being/playerrelations.h" +#include "enums/net/packettypes.h" + #include "net/download.h" #include "net/packetlimiter.h" #include "net/playerhandler.h" diff --git a/src/guildmanager.cpp b/src/guildmanager.cpp index a5186c681..0e9999977 100644 --- a/src/guildmanager.cpp +++ b/src/guildmanager.cpp @@ -28,6 +28,8 @@ #include "being/localplayer.h" +#include "enums/net/packettypes.h" + #include "gui/windows/chatwindow.h" #include "gui/windows/socialwindow.h" diff --git a/src/net/packetlimiter.cpp b/src/net/packetlimiter.cpp index 80e1226d2..d4411c50a 100644 --- a/src/net/packetlimiter.cpp +++ b/src/net/packetlimiter.cpp @@ -23,6 +23,8 @@ #include "configuration.h" #include "settings.h" +#include "enums/net/packettypes.h" + #include "utils/timer.h" #include <fstream> diff --git a/src/net/packetlimiter.h b/src/net/packetlimiter.h index 2c2de56ef..f0d8a78df 100644 --- a/src/net/packetlimiter.h +++ b/src/net/packetlimiter.h @@ -25,24 +25,6 @@ #include "localconsts.h" -enum PacketTypes -{ - PACKET_CHAT = 0, - PACKET_PICKUP = 1, - PACKET_DROP = 2, - PACKET_NPC_NEXT = 3, - PACKET_NPC_TALK = 4, - PACKET_NPC_INPUT = 5, - PACKET_EMOTE = 6, - PACKET_SIT = 7, - PACKET_DIRECTION = 8, - PACKET_ATTACK = 9, - PACKET_STOPATTACK = 10, - PACKET_ONLINELIST = 11, - PACKET_WHISPER = 12, - PACKET_SIZE -}; - namespace PacketLimiter { void initPacketLimiter(); |