summaryrefslogtreecommitdiff
path: root/src/game-server/monster.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/monster.hpp')
-rw-r--r--src/game-server/monster.hpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/game-server/monster.hpp b/src/game-server/monster.hpp
index 8dc2102b..d99f77d3 100644
--- a/src/game-server/monster.hpp
+++ b/src/game-server/monster.hpp
@@ -76,7 +76,8 @@ class MonsterClass
mTrackRange(1),
mStrollRange(0),
mMutation(0),
- mAttackDistance(0)
+ mAttackDistance(0),
+ mScript("")
{}
/**
@@ -163,6 +164,12 @@ class MonsterClass
/** Returns all attacks of the monster. */
const MonsterAttacks &getAttacks() const { return mAttacks; }
+ /** sets the script file for the monster */
+ void setScript(std::string& filename) { mScript = filename; }
+
+ /** Returns script filename */
+ std::string &getScript() { return mScript; }
+
/**
* Randomly selects a monster drop (may return NULL).
*/
@@ -182,6 +189,7 @@ class MonsterClass
unsigned mMutation;
unsigned mAttackDistance;
MonsterAttacks mAttacks;
+ std::string mScript;
};
/**
@@ -284,7 +292,8 @@ class Monster : public Being
MonsterClass *mSpecy;
/**
- * Stores script for the monster, null if no script exist
+ * Stores individual script for the monster, when NULL the script
+ * from mSpecy is used.
*/
Script *mScript;