diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/beinginfo.cpp | 3 | ||||
-rw-r--r-- | src/resources/beinginfo.h | 7 | ||||
-rw-r--r-- | src/resources/db/npcdb.cpp | 3 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp index 6c082d85f..6e28e37be 100644 --- a/src/resources/beinginfo.cpp +++ b/src/resources/beinginfo.cpp @@ -106,7 +106,8 @@ BeingInfo::BeingInfo() : mQuickActionEffectId(-1), mStaticMaxHP(false), mTargetSelection(true), - mAllowDelete(true) + mAllowDelete(true), + mAllowEquipment(false) { SpriteDisplay display; display.sprites.push_back(SpriteReference::Empty); diff --git a/src/resources/beinginfo.h b/src/resources/beinginfo.h index bd60131c8..b4139d0b4 100644 --- a/src/resources/beinginfo.h +++ b/src/resources/beinginfo.h @@ -320,6 +320,12 @@ class BeingInfo final int getAllowDelete() const noexcept2 A_WARN_UNUSED { return static_cast<int>(mAllowDelete); } + void setAllowEquipment(const bool b) + { mAllowEquipment = b; } + + bool getAllowEquipment() const noexcept2 A_WARN_UNUSED + { return mAllowEquipment; } + void setQuickActionEffectId(const int n) { mQuickActionEffectId = n; } @@ -396,6 +402,7 @@ class BeingInfo final bool mStaticMaxHP; bool mTargetSelection; bool mAllowDelete; + bool mAllowEquipment; }; typedef std::map<BeingTypeId, BeingInfo*> BeingInfos; diff --git a/src/resources/db/npcdb.cpp b/src/resources/db/npcdb.cpp index 26034de12..3432ed4b5 100644 --- a/src/resources/db/npcdb.cpp +++ b/src/resources/db/npcdb.cpp @@ -118,6 +118,9 @@ void NPCDB::loadXmlFile(const std::string &fileName, currentInfo->setAllowDelete(XML::getBoolProperty(npcNode, "allowDelete", true)); + currentInfo->setAllowEquipment(XML::getBoolProperty(npcNode, + "allowEquipment", false)); + const std::string currency = XML::getProperty(npcNode, "currency", "default"); if (UnitsDb::existsCurrency(currency) == false) |