From 2f9fa7415d501337a32111ef123f361cd6d01cab Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 25 Dec 2013 15:28:50 +0300 Subject: add pet think time. New pet db attribute: thinkTime time in milliseconds. also remove extra pet logic calls. --- src/resources/beinginfo.h | 7 +++++++ src/resources/db/petdb.cpp | 2 ++ 2 files changed, 9 insertions(+) (limited to 'src/resources') diff --git a/src/resources/beinginfo.h b/src/resources/beinginfo.h index 769f796f6..9e0e88112 100644 --- a/src/resources/beinginfo.h +++ b/src/resources/beinginfo.h @@ -260,6 +260,12 @@ class BeingInfo final int getSitOffsetY() const A_WARN_UNUSED { return mSitOffsetY; } + void setThinkTime(const int n) + { mThinkTime = n; } + + int getThinkTime() const A_WARN_UNUSED + { return mThinkTime; } + void setColorsList(const std::string &name); std::string getColor(const int idx) const A_WARN_UNUSED; @@ -296,6 +302,7 @@ class BeingInfo final int mWalkSpeed; int mSitOffsetX; int mSitOffsetY; + int mThinkTime; bool mStaticMaxHP; bool mTargetSelection; }; diff --git a/src/resources/db/petdb.cpp b/src/resources/db/petdb.cpp index 7c84b006b..5f52602fa 100644 --- a/src/resources/db/petdb.cpp +++ b/src/resources/db/petdb.cpp @@ -101,6 +101,8 @@ void PETDB::load() currentInfo->setSitOffsetY(XML::getProperty(petNode, "sitOffsetY", 1)); + currentInfo->setThinkTime(XML::getProperty(petNode, + "thinkTime", 500) / 10); SpriteDisplay display; for_each_xml_child_node(spriteNode, petNode) -- cgit v1.2.3-60-g2f50