summaryrefslogtreecommitdiff
path: root/src/resources/action.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-23 04:40:34 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-24 03:32:57 +0300
commit8e5861c3cfd41574351547a1a518efcf9007666a (patch)
tree8d941791c1bbd296b7125475fa0abb9581df632f /src/resources/action.h
parent004aa3358c6efeb469045785baa891a449dde5a4 (diff)
downloadmv-8e5861c3cfd41574351547a1a518efcf9007666a.tar.gz
mv-8e5861c3cfd41574351547a1a518efcf9007666a.tar.bz2
mv-8e5861c3cfd41574351547a1a518efcf9007666a.tar.xz
mv-8e5861c3cfd41574351547a1a518efcf9007666a.zip
Add ability to play different animation depend on monster hp.
Disabled for legacy servers because monster hp unknown and compilated hp can be wrong (version <= 0). For usage need add to action tag attribute hp="xx" Example: <action name="stand" hp="50" imageset="base"> ... </action> Here 50 mean 50% of health or less. Default action tag mean hp=100
Diffstat (limited to 'src/resources/action.h')
-rw-r--r--src/resources/action.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/resources/action.h b/src/resources/action.h
index 05b326d8f..9ab6f98d5 100644
--- a/src/resources/action.h
+++ b/src/resources/action.h
@@ -43,10 +43,17 @@ class Action
Animation *getAnimation(int direction) const;
+ unsigned getNumber()
+ { return mNumber; }
+
+ void setNumber(unsigned n)
+ { mNumber = n; }
+
protected:
typedef std::map<int, Animation*> Animations;
typedef Animations::iterator AnimationIterator;
Animations mAnimations;
+ unsigned mNumber;
};
#endif