summaryrefslogtreecommitdiff
path: root/src/game-server/character.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/character.cpp')
-rw-r--r--src/game-server/character.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game-server/character.cpp b/src/game-server/character.cpp
index 4d04c227..3e5d9193 100644
--- a/src/game-server/character.cpp
+++ b/src/game-server/character.cpp
@@ -24,6 +24,8 @@
#include "defines.h"
#include "game-server/character.hpp"
+#include "game-server/mapcomposite.hpp"
+#include "game-server/mapmanager.hpp"
#include "net/messagein.hpp"
#include "net/messageout.hpp"
#include "serialize/characterdata.hpp"
@@ -110,3 +112,13 @@ Character::writeAttributeUpdateMessage(MessageOut &msg)
mAttributesChanged = false;
}
+
+int Character::getMapId() const
+{
+ return getMap()->getID();
+}
+
+void Character::setMapId(int id)
+{
+ setMap(mapManager->getMap(id));
+}