summaryrefslogtreecommitdiff
path: root/src/resources/db/npcdialogdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-30 23:57:54 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-30 23:57:54 +0300
commit382d24526919eafc08df19169046fdae190e10da (patch)
tree5eee2825a6a0dd282990c1a6a2f4a8e924c8083d /src/resources/db/npcdialogdb.cpp
parentbe1962973deaa161491b6592cbf21eb3e6700cc9 (diff)
downloadplus-382d24526919eafc08df19169046fdae190e10da.tar.gz
plus-382d24526919eafc08df19169046fdae190e10da.tar.bz2
plus-382d24526919eafc08df19169046fdae190e10da.tar.xz
plus-382d24526919eafc08df19169046fdae190e10da.zip
Add support for npc dialog inventory theming from npc skin.
Diffstat (limited to 'src/resources/db/npcdialogdb.cpp')
-rw-r--r--src/resources/db/npcdialogdb.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/resources/db/npcdialogdb.cpp b/src/resources/db/npcdialogdb.cpp
index 5d704b001..365ed018e 100644
--- a/src/resources/db/npcdialogdb.cpp
+++ b/src/resources/db/npcdialogdb.cpp
@@ -119,6 +119,14 @@ static void loadNpcDialogMenu(NpcDialogInfo *const dialog,
}
}
+static void loadNpcDialogInventory(NpcDialogInfo *const dialog,
+ XmlNodePtrConst node)
+{
+ dialog->inventory.cell = XML::getProperty(node, "cell", "");
+ dialog->inventory.columns = XML::getIntProperty(
+ node, "columns", 10000, 1, 10000);
+}
+
static void loadNpcDialog(NpcDialogInfo *const dialog,
const XmlNodePtrConst node)
{
@@ -128,6 +136,10 @@ static void loadNpcDialog(NpcDialogInfo *const dialog,
{
loadNpcDialogMenu(dialog, childNode);
}
+ else if (xmlNameEqual(childNode, "inventory"))
+ {
+ loadNpcDialogInventory(dialog, childNode);
+ }
}
}