]> git.localhorst.tv Git - l2e.git/blobdiff - src/map/Trigger.h
moved map data to maps.l2s
[l2e.git] / src / map / Trigger.h
index 47f933be42263dc529ed3a7c6d203575a4edf26f..eb174607d00e76a04c4cd8b68201f3da1ff097c9 100644 (file)
@@ -8,7 +8,9 @@
 #ifndef MAP_TRIGGER_H_
 #define MAP_TRIGGER_H_
 
+#include "Entity.h"
 #include "fwd.h"
+#include "../common/Script.h"
 #include "../geometry/Vector.h"
 
 namespace map {
@@ -19,20 +21,34 @@ public:
        Trigger();
        ~Trigger() { }
 
+       enum Type {
+               TYPE_NORTH = Entity::ORIENTATION_NORTH,
+               TYPE_EAST = Entity::ORIENTATION_EAST,
+               TYPE_SOUTH = Entity::ORIENTATION_SOUTH,
+               TYPE_WEST = Entity::ORIENTATION_WEST,
+               TYPE_CONTACT = 4,
+       };
+
 public:
        const geometry::Vector<int> &TilePosition() const { return tilePosition; }
+       Type GetType() const { return Type(type); }
+       bool HasScript() const { return script; }
+       common::Script &GetScript() { return *script; }
+       const common::Script &GetScript() const { return *script; }
+
+       static void CreateTypeDescription();
+       static void Construct(void *);
 
 // temporary setters
 public:
        void SetTilePosition(const geometry::Vector<int> &p) { tilePosition = p; }
+       void SetType(Type t) { type = t; }
+       void SetScript(common::Script *s) { script = s; }
 
 private:
+       common::Script *script;
        geometry::Vector<int> tilePosition;
-
-// temporary members until scripting is implemented
-public:
-       Map *map;
-       geometry::Vector<int> target;
+       int type;
 
 };