summaryrefslogtreecommitdiff
path: root/src/game-server/being.hpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2008-05-19 15:07:45 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2008-05-19 15:07:45 +0000
commit502d5c892c92b4a71eceae1d275032100d42dd23 (patch)
tree81f29c3ce0bda3d2a4221a485c9695d4e56eb568 /src/game-server/being.hpp
parent4b4b6d0865f5f04f73e04926fb9e6b610f0a71a7 (diff)
downloadmanaserv-502d5c892c92b4a71eceae1d275032100d42dd23.tar.gz
manaserv-502d5c892c92b4a71eceae1d275032100d42dd23.tar.bz2
manaserv-502d5c892c92b4a71eceae1d275032100d42dd23.tar.xz
manaserv-502d5c892c92b4a71eceae1d275032100d42dd23.zip
Implemented NPC names. Implemented the theoretical possibility to have named monsters along the way. Note that the syntax of the LUA functions for creating NPCs has changed.
Diffstat (limited to 'src/game-server/being.hpp')
-rw-r--r--src/game-server/being.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game-server/being.hpp b/src/game-server/being.hpp
index b725bfee..6c7ff398 100644
--- a/src/game-server/being.hpp
+++ b/src/game-server/being.hpp
@@ -218,6 +218,16 @@ class Being : public MovingObject
*/
virtual void modifiedAttribute(int) {}
+ /** Gets the name of the being. */
+ std::string const &
+ getName() const
+ { return mName; }
+
+ /** Sets the name of the being. */
+ void
+ setName(const std::string& name)
+ { mName = name; }
+
protected:
static const int TICKS_PER_HP_REGENERATION = 100;
Action mAction;
@@ -227,6 +237,7 @@ class Being : public MovingObject
Being(Being const &rhs);
Being &operator=(Being const &rhs);
+ std::string mName; /**< Name of the being. */
Hits mHitsTaken; /**< List of punches taken since last update */
AttributeModifiers mModifiers; /**< Currently modified attributes. */
int mHpRegenTimer; /**< timer for hp regeneration*/