summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-12 01:53:54 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-12 01:53:54 +0300
commitfca4273667f15afba055d3c296094f2f41c7ae91 (patch)
treed2a24602a4a60814a5927384570d2873bed83225 /src/client.cpp
parent44e80c70513022b6c378f64d6bf5d25dda7b0e7f (diff)
downloadplus-fca4273667f15afba055d3c296094f2f41c7ae91.tar.gz
plus-fca4273667f15afba055d3c296094f2f41c7ae91.tar.bz2
plus-fca4273667f15afba055d3c296094f2f41c7ae91.tar.xz
plus-fca4273667f15afba055d3c296094f2f41c7ae91.zip
Add ability to add comments to npcs.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 092f81a93..022bc07d5 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -240,6 +240,7 @@ Client::Client(const Options &options):
mOptions(options),
mServerConfigDir(""),
mUsersDir(""),
+ mNpcsDir(""),
mRootDir(""),
mCurrentDialog(0),
mQuitDialog(0),
@@ -1917,6 +1918,13 @@ void Client::initUsersDir()
logger->error(strprintf(_("%s doesn't exist and can't be created! "
"Exiting."), mUsersDir.c_str()));
}
+
+ mNpcsDir = Client::getServerConfigDirectory() + "/npcs/";
+ if (mkdir_r(mNpcsDir.c_str()))
+ {
+ logger->error(strprintf(_("%s doesn't exist and can't be created! "
+ "Exiting."), mNpcsDir.c_str()));
+ }
}
void Client::initPacketLimiter()
@@ -2137,6 +2145,11 @@ const std::string Client::getUsersDirectory()
return instance()->mUsersDir;
}
+const std::string Client::getNpcsDirectory()
+{
+ return instance()->mNpcsDir;
+}
+
void Client::setGuiAlpha(float n)
{
instance()->mGuiAlpha = n;