summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-27 17:31:26 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-27 18:37:33 +0300
commit2433741a77ba0f08f4243a9482d3cf95cfe9edf3 (patch)
tree193fcf05c35fcc5096302482598abfe299270996 /src/resources
parentd3010ba93e3f30b4af2314434c21f114459b8ef7 (diff)
downloadmanaplus-2433741a77ba0f08f4243a9482d3cf95cfe9edf3.tar.gz
manaplus-2433741a77ba0f08f4243a9482d3cf95cfe9edf3.tar.bz2
manaplus-2433741a77ba0f08f4243a9482d3cf95cfe9edf3.tar.xz
manaplus-2433741a77ba0f08f4243a9482d3cf95cfe9edf3.zip
Impliment npc menu skins based on previous commits.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/db/npcdialogdb.cpp8
-rw-r--r--src/resources/db/npcdialogdb.h4
2 files changed, 12 insertions, 0 deletions
diff --git a/src/resources/db/npcdialogdb.cpp b/src/resources/db/npcdialogdb.cpp
index 79918307a..628ee233e 100644
--- a/src/resources/db/npcdialogdb.cpp
+++ b/src/resources/db/npcdialogdb.cpp
@@ -140,3 +140,11 @@ void NpcDialogDB::unload()
mLoaded = false;
}
+
+NpcDialogInfo *NpcDialogDB::getDialog(const std::string &name)
+{
+ DialogsIter it = mDialogs.find(name);
+ if (it == mDialogs.end())
+ return nullptr;
+ return (*it).second;
+}
diff --git a/src/resources/db/npcdialogdb.h b/src/resources/db/npcdialogdb.h
index 8b2caac65..d77826ab3 100644
--- a/src/resources/db/npcdialogdb.h
+++ b/src/resources/db/npcdialogdb.h
@@ -27,6 +27,8 @@
#include "localconsts.h"
+class Widget;
+
/**
* Color information database.
*/
@@ -46,6 +48,8 @@ namespace NpcDialogDB
void deleteDialog(const std::string &name);
+ NpcDialogInfo *getDialog(const std::string &name);
+
typedef std::map<std::string, NpcDialogInfo*> Dialogs;
typedef Dialogs::iterator DialogsIter;