diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/character.h | 64 | ||||
-rw-r--r-- | src/net/charserverhandler.h | 24 | ||||
-rw-r--r-- | src/net/ea/charserverhandler.cpp | 1 | ||||
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 1 | ||||
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 1 |
5 files changed, 68 insertions, 23 deletions
diff --git a/src/net/character.h b/src/net/character.h new file mode 100644 index 000000000..89789335c --- /dev/null +++ b/src/net/character.h @@ -0,0 +1,64 @@ +/* + * The ManaPlus Client + * Copyright (C) 2009 The Mana World Development Team + * Copyright (C) 2009-2010 The Mana Developers + * Copyright (C) 2011-2014 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_CHARACTER_H +#define NET_CHARACTER_H + +#include "utils/delete2.h" + +#include <string> +#include <vector> + +class LocalPlayer; + +struct PlayerInfoBackend; + +namespace Net +{ + +/** + * A structure to hold information about a character. + */ +struct Character final +{ + Character() : + slot(0), + dummy(nullptr), + data() + { + } + + A_DELETE_COPY(Character) + + ~Character() + { + delete2(dummy); + } + + int slot; /**< The index in the list of characters */ + LocalPlayer *dummy; /**< A dummy representing this character */ + PlayerInfoBackend data; +}; + +} // namespace Net + +#endif // NET_CHARACTER_H diff --git a/src/net/charserverhandler.h b/src/net/charserverhandler.h index 095558cec..744ee685b 100644 --- a/src/net/charserverhandler.h +++ b/src/net/charserverhandler.h @@ -37,29 +37,7 @@ class CharSelectDialog; namespace Net { -/** - * A structure to hold information about a character. - */ -struct Character final -{ - Character() : - slot(0), - dummy(nullptr), - data() - { - } - - A_DELETE_COPY(Character) - - ~Character() - { - delete2(dummy); - } - - int slot; /**< The index in the list of characters */ - LocalPlayer *dummy; /**< A dummy representing this character */ - PlayerInfoBackend data; -}; +struct Character; typedef std::list<Character*> Characters; diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp index 067d9119f..2f285269a 100644 --- a/src/net/ea/charserverhandler.cpp +++ b/src/net/ea/charserverhandler.cpp @@ -33,6 +33,7 @@ #include "net/ea/gamehandler.h" #include "net/ea/network.h" +#include "net/character.h" #include "net/messagein.h" #include "net/net.h" diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index fdcf2ed22..cd7496086 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -27,6 +27,7 @@ #include "being/attributes.h" +#include "net/character.h" #include "net/logindata.h" #include "net/net.h" diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 7bd057231..47a55561e 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -27,6 +27,7 @@ #include "being/attributes.h" +#include "net/character.h" #include "net/logindata.h" #include "net/net.h" |