diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-10 12:43:12 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-10 12:43:12 +0300 |
commit | b4de7c68b240dd1b63ac1b78feb0721977cdb171 (patch) | |
tree | 83a96195df384fd0a9535d3e477f76879934b6c9 /src/resources/db | |
parent | 248c845b6a09c436f3d8d69a859f1c34d91b7508 (diff) | |
download | manaplus-b4de7c68b240dd1b63ac1b78feb0721977cdb171.tar.gz manaplus-b4de7c68b240dd1b63ac1b78feb0721977cdb171.tar.bz2 manaplus-b4de7c68b240dd1b63ac1b78feb0721977cdb171.tar.xz manaplus-b4de7c68b240dd1b63ac1b78feb0721977cdb171.zip |
Add default npc menu items if missing in configuration.
Diffstat (limited to 'src/resources/db')
-rw-r--r-- | src/resources/db/npcdb.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/resources/db/npcdb.cpp b/src/resources/db/npcdb.cpp index 542724e27..5f7c48b0b 100644 --- a/src/resources/db/npcdb.cpp +++ b/src/resources/db/npcdb.cpp @@ -22,6 +22,7 @@ #include "resources/db/npcdb.h" +#include "configuration.h" #include "logger.h" #include "resources/beingcommon.h" @@ -29,7 +30,7 @@ #include "resources/spritereference.h" #include "utils/dtor.h" -#include "configuration.h" +#include "utils/gettext.h" #include "debug.h" @@ -137,6 +138,12 @@ void NPCDB::loadXmlFile(const std::string &fileName) } currentInfo->setDisplay(display); + if (currentInfo->getMenu().empty()) + { + currentInfo->addMenu(_("Talk"), "/talk <NPCNAME>"); + currentInfo->addMenu(_("Buy"), "/buy <NPCNAME>"); + currentInfo->addMenu(_("Sell"), "/sell <NPCNAME>"); + } mNPCInfos[id] = currentInfo; } } |