diff options
Diffstat (limited to 'src/game-server/mapcomposite.cpp')
-rw-r--r-- | src/game-server/mapcomposite.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game-server/mapcomposite.cpp b/src/game-server/mapcomposite.cpp index 137622d5..4994b901 100644 --- a/src/game-server/mapcomposite.cpp +++ b/src/game-server/mapcomposite.cpp @@ -23,6 +23,7 @@ #include <cassert> #include "point.h" +#include "common/configuration.hpp" #include "game-server/map.hpp" #include "game-server/mapcomposite.hpp" #include "game-server/character.hpp" @@ -539,6 +540,14 @@ void MapComposite::setMap(Map *m) assert(!mMap && m); mMap = m; mContent = new MapContent(m); + + std::string sPvP = m->getProperty ("pvp"); + if (sPvP == "") sPvP = Configuration::getValue("defaultPvp", ""); + + if (sPvP == "free") mPvPRules = PVP_FREE; + else if (sPvP == "none") mPvPRules = PVP_NONE; + else mPvPRules = PVP_NONE; + } void MapComposite::update() |