summaryrefslogtreecommitdiff
path: root/src/game-server/triggerareacomponent.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/triggerareacomponent.h')
-rw-r--r--src/game-server/triggerareacomponent.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/game-server/triggerareacomponent.h b/src/game-server/triggerareacomponent.h
index 3d2a8412..5857e55a 100644
--- a/src/game-server/triggerareacomponent.h
+++ b/src/game-server/triggerareacomponent.h
@@ -50,6 +50,39 @@ class WarpAction : public TriggerAction
Point mTargetPoint;
};
+class AutowarpAction: public TriggerAction
+{
+ public:
+ enum ExitDirection {
+ ExitNorth,
+ ExitEast,
+ ExitSouth,
+ ExitWest
+ };
+
+ AutowarpAction(MapComposite *m,
+ const Rectangle &sourceArea,
+ const Rectangle &targetArea,
+ ExitDirection direction)
+ : mMap(m),
+ mSourceArea(sourceArea),
+ mTargetArea(targetArea),
+ mDirection(direction)
+ {}
+
+ virtual void process(Entity *obj);
+
+ private:
+ /** Target map */
+ MapComposite *mMap;
+ /** Source area - used to calculate warp offset and warp direction */
+ Rectangle mSourceArea;
+ /** Target area */
+ Rectangle mTargetArea;
+ /** The direction to exit target area */
+ ExitDirection mDirection;
+};
+
class ScriptAction : public TriggerAction
{
public: