summaryrefslogtreecommitdiff
path: root/src/net/character.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-20 12:47:50 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-20 12:47:50 +0300
commit0ad3a821e42471a052027419336df2132613e9f3 (patch)
tree230b600ec683bf5abb7d9ba3aefe8c6197fc329a /src/net/character.h
parent5e3b654000e75c29d79939684077c7833ecbcead (diff)
downloadmanaplus-0ad3a821e42471a052027419336df2132613e9f3.tar.gz
manaplus-0ad3a821e42471a052027419336df2132613e9f3.tar.bz2
manaplus-0ad3a821e42471a052027419336df2132613e9f3.tar.xz
manaplus-0ad3a821e42471a052027419336df2132613e9f3.zip
Move character into separate file.
Diffstat (limited to 'src/net/character.h')
-rw-r--r--src/net/character.h64
1 files changed, 64 insertions, 0 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