From 8e5861c3cfd41574351547a1a518efcf9007666a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 23 Nov 2011 04:40:34 +0300 Subject: 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: ... Here 50 mean 50% of health or less. Default action tag mean hp=100 --- src/resources/action.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/resources/action.h') 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 Animations; typedef Animations::iterator AnimationIterator; Animations mAnimations; + unsigned mNumber; }; #endif -- cgit v1.2.3-70-g09d2