diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-07-04 22:15:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-07-04 22:15:48 +0300 |
commit | 5c30a24b51538c8a0656977caeeced94277aa5b8 (patch) | |
tree | 574a680074cf5f69522b79ef48430d57b8be0787 /src/resources | |
parent | 146e9182d8c930e62fbcc281615b96c95319a5ea (diff) | |
download | mv-5c30a24b51538c8a0656977caeeced94277aa5b8.tar.gz mv-5c30a24b51538c8a0656977caeeced94277aa5b8.tar.bz2 mv-5c30a24b51538c8a0656977caeeced94277aa5b8.tar.xz mv-5c30a24b51538c8a0656977caeeced94277aa5b8.zip |
Add option to items.xml to set max floor item pixel offset.
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 |