diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-12-25 14:54:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-12-25 14:54:25 +0300 |
commit | 3e43345f804886a3a6ed7c0e378612612de4f4a5 (patch) | |
tree | ea7e36388a7ac1cc57ced5b33651b919302b3804 /src/resources | |
parent | db67d909cfa5d6a53552bbdb80c215fb382f00d5 (diff) | |
download | manaverse-3e43345f804886a3a6ed7c0e378612612de4f4a5.tar.gz manaverse-3e43345f804886a3a6ed7c0e378612612de4f4a5.tar.bz2 manaverse-3e43345f804886a3a6ed7c0e378612612de4f4a5.tar.xz manaverse-3e43345f804886a3a6ed7c0e378612612de4f4a5.zip |
add support for pet offsets if owner is sitting.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/beinginfo.cpp | 2 | ||||
-rw-r--r-- | src/resources/beinginfo.h | 14 | ||||
-rw-r--r-- | src/resources/db/petdb.cpp | 4 |
3 files changed, 20 insertions, 0 deletions
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp index 752b9a5dc..fc23bf231 100644 --- a/src/resources/beinginfo.cpp +++ b/src/resources/beinginfo.cpp @@ -64,6 +64,8 @@ BeingInfo::BeingInfo() : mFollowDist(1), mWarpDist(11), mWalkSpeed(0), + mSitOffsetX(0), + mSitOffsetY(0), mStaticMaxHP(false), mTargetSelection(true) { diff --git a/src/resources/beinginfo.h b/src/resources/beinginfo.h index d27704aaf..769f796f6 100644 --- a/src/resources/beinginfo.h +++ b/src/resources/beinginfo.h @@ -248,6 +248,18 @@ class BeingInfo final int getWarpDist() const A_WARN_UNUSED { return mWarpDist; } + void setSitOffsetX(const int n) + { mSitOffsetX = n; } + + int getSitOffsetX() const A_WARN_UNUSED + { return mSitOffsetX; } + + void setSitOffsetY(const int n) + { mSitOffsetY = n; } + + int getSitOffsetY() const A_WARN_UNUSED + { return mSitOffsetY; } + void setColorsList(const std::string &name); std::string getColor(const int idx) const A_WARN_UNUSED; @@ -282,6 +294,8 @@ class BeingInfo final int mFollowDist; int mWarpDist; int mWalkSpeed; + int mSitOffsetX; + int mSitOffsetY; bool mStaticMaxHP; bool mTargetSelection; }; diff --git a/src/resources/db/petdb.cpp b/src/resources/db/petdb.cpp index d50c44dc7..7c84b006b 100644 --- a/src/resources/db/petdb.cpp +++ b/src/resources/db/petdb.cpp @@ -96,6 +96,10 @@ void PETDB::load() "offsetX", 0)); currentInfo->setTargetOffsetY(XML::getProperty(petNode, "offsetY", 1)); + currentInfo->setSitOffsetX(XML::getProperty(petNode, + "sitOffsetX", 0)); + currentInfo->setSitOffsetY(XML::getProperty(petNode, + "sitOffsetY", 1)); SpriteDisplay display; |