diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/itemdb.cpp | 4 | ||||
-rw-r--r-- | src/resources/iteminfo.h | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index cf05a28f0..38aa6d958 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -210,7 +210,8 @@ void ItemDB::load() std::string attackAction = XML::getProperty(node, "attack-action", ""); std::string drawBefore = XML::getProperty(node, "drawBefore", ""); std::string drawAfter = XML::getProperty(node, "drawAfter", ""); -// std::string removeSprite = XML::getProperty(node, "removeSprite", ""); + int maxFloorOffset = XML::getIntProperty( + node, "maxFloorOffset", 32, 0, 32); std::string colors; if (serverVersion >= 1) { @@ -307,6 +308,7 @@ void ItemDB::load() itemInfo->setDrawAfter(-1, parseSpriteName(drawAfter)); itemInfo->setDrawPriority(-1, drawPriority); itemInfo->setColorsList(colors); + itemInfo->setMaxFloorOffset(maxFloorOffset); std::string effect; for (size_t i = 0; i < sizeof(fields) / sizeof(fields[0]); ++ i) diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 33727b136..1816b3bf5 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -233,6 +233,12 @@ class ItemInfo bool isRemoveSprites() const { return mIsRemoveSprites; } + void setMaxFloorOffset(int i) + { maxFloorOffset = i; } + + int getMaxFloorOffset() const + { return maxFloorOffset; } + bool isRemoveItemId(int id) const; /** Effects to be shown when weapon attacks - see also effects.xml */ @@ -297,6 +303,7 @@ class ItemInfo std::string mColorList; int mHitEffectId; int mCriticalHitEffectId; + int maxFloorOffset; }; #endif |