summaryrefslogtreecommitdiff
path: root/src/game-server/mapcomposite.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-10 14:17:38 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-10 14:17:38 +0000
commitf990980f80ab1523086edba1bed222741d716fa0 (patch)
tree0ce0257ca854ea06949f543227a301a7f553e1a9 /src/game-server/mapcomposite.cpp
parentcb45a65e1020bf129225dd20c57bf64314cef2c8 (diff)
downloadmanaserv-f990980f80ab1523086edba1bed222741d716fa0.tar.gz
manaserv-f990980f80ab1523086edba1bed222741d716fa0.tar.bz2
manaserv-f990980f80ab1523086edba1bed222741d716fa0.tar.xz
manaserv-f990980f80ab1523086edba1bed222741d716fa0.zip
Improved helper functions for Lua scripts. Associated scripts to maps.
Diffstat (limited to 'src/game-server/mapcomposite.cpp')
-rw-r--r--src/game-server/mapcomposite.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/game-server/mapcomposite.cpp b/src/game-server/mapcomposite.cpp
index 6fea9488..eeb65a10 100644
--- a/src/game-server/mapcomposite.cpp
+++ b/src/game-server/mapcomposite.cpp
@@ -28,7 +28,7 @@
#include "game-server/map.hpp"
#include "game-server/mapcomposite.hpp"
#include "game-server/character.hpp"
-
+#include "scripting/script.hpp"
#include "utils/logger.h"
/* TODO: Implement overlapping map zones instead of strict partitioning.
@@ -452,10 +452,17 @@ void MapComposite::setMap(Map *m)
mContent = new MapContent(m);
}
+
+MapComposite::MapComposite(int id, std::string const &name):
+ mMap(NULL), mContent(NULL), mScript(NULL), mName(name), mID(id)
+{
+}
+
MapComposite::~MapComposite()
{
delete mMap;
delete mContent;
+ delete mScript;
}
bool MapContent::allocate(MovingObject *obj)
@@ -658,5 +665,3 @@ std::vector< Thing * > const &MapComposite::getEverything() const
{
return mContent->things;
}
-
-