From 3dec609dc5f343547fad87dbbd3d7c7e2c59dde5 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Thu, 19 Mar 2009 20:10:27 +0100 Subject: Implemented the possibility to have maps with or without PvP combat. PvP is governed by the map property "pvp". Currently it can be either "none" for no PvP combat or "free" for unrestricted PvP combat. "none" is the default value which is used when pvp is undefined. Later addition of more sophisticated PvP modes is possible. --- src/game-server/mapcomposite.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/game-server/mapcomposite.hpp') diff --git a/src/game-server/mapcomposite.hpp b/src/game-server/mapcomposite.hpp index 078842d6..7242fad6 100644 --- a/src/game-server/mapcomposite.hpp +++ b/src/game-server/mapcomposite.hpp @@ -38,6 +38,12 @@ class Thing; struct MapContent; struct MapZone; +enum PvPRules +{ + PVP_NONE, // no PvP on this map + PVP_FREE // unrestricted PvP on this map + // [space for additional PvP modes] +}; /** * Ordered sets of zones of a map. */ @@ -289,6 +295,11 @@ class MapComposite */ void update(); + /** + * Gets the PvP rules on the map + */ + PvPRules getPvP() const { return mPvPRules; } + /** * Gets an iterator on the objects of the whole map. */ @@ -329,6 +340,8 @@ class MapComposite Script *mScript; /**< Script associated to this map. */ std::string mName; /**< Name of the map. */ unsigned short mID; /**< ID of the map. */ + + PvPRules mPvPRules; }; #endif -- cgit v1.2.3-60-g2f50