diff options
author | Philipp Sehmisch <crush@themanaworld.org> | 2009-03-24 00:39:29 +0100 |
---|---|---|
committer | Philipp Sehmisch <crush@themanaworld.org> | 2009-03-24 00:39:29 +0100 |
commit | caa35916909ca81defbc03f8825eb582f68c0238 (patch) | |
tree | 6ad000891bfd352665247e0f66897ed8162c9e00 | |
parent | 3dec609dc5f343547fad87dbbd3d7c7e2c59dde5 (diff) | |
download | manaserv-caa35916909ca81defbc03f8825eb582f68c0238.tar.gz manaserv-caa35916909ca81defbc03f8825eb582f68c0238.tar.bz2 manaserv-caa35916909ca81defbc03f8825eb582f68c0238.tar.xz manaserv-caa35916909ca81defbc03f8825eb582f68c0238.zip |
Added config option to set default PvP mode
-rw-r--r-- | src/game-server/mapcomposite.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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 <cassert> #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; |