From fca4273667f15afba055d3c296094f2f41c7ae91 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 12 Aug 2011 01:53:54 +0300 Subject: Add ability to add comments to npcs. --- src/client.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/client.cpp') 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; -- cgit v1.2.3-70-g09d2