From caa35916909ca81defbc03f8825eb582f68c0238 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Tue, 24 Mar 2009 00:39:29 +0100 Subject: Added config option to set default PvP mode --- src/game-server/mapcomposite.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/game-server/mapcomposite.cpp b/src/game-server/mapcomposite.cpp index e7267d08..6145ecc1 100644 --- a/src/game-server/mapcomposite.cpp +++ b/src/game-server/mapcomposite.cpp @@ -23,6 +23,7 @@ #include #include "point.h" +#include "common/configuration.hpp" #include "game-server/map.hpp" #include "game-server/mapcomposite.hpp" #include "game-server/character.hpp" @@ -534,6 +535,8 @@ void MapComposite::setMap(Map *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; -- cgit v1.2.3-60-g2f50