]> git.localhorst.tv Git - l2e.git/blobdiff - src/map/Entity.h
lousy implementation of "array of identifiers" type
[l2e.git] / src / map / Entity.h
index 8d5c6a5bbb2b8b1d825211e4328e0e9356ad9f6e..d1746c71a3cd73ff77dc37fb03de899796bdcf6f 100644 (file)
@@ -1,10 +1,3 @@
-/*
- * Entity.h
- *
- *  Created on: Sep 29, 2012
- *      Author: holy
- */
-
 #ifndef MAP_ENTITY_H_
 #define MAP_ENTITY_H_
 
@@ -23,6 +16,9 @@ namespace map {
 /// interact with the player.
 class Entity {
 
+public:
+       static const int TYPE_ID = 605;
+
 public:
        Entity();
        ~Entity() { }
@@ -114,9 +110,9 @@ public:
 
        /// Add monsters. This will cause the entity to be Hostile() and result in a
        /// battle scene with given monsters when touched.
-       void SetMonsters(battle::Monster *m, int num) { monsters = m; numMonsters = num; }
-       battle::Monster *MonstersBegin() { return monsters; }
-       battle::Monster *MonstersEnd() { return monsters + numMonsters; }
+       void SetMonsters(battle::Monster **m, int num) { monsters = m; numMonsters = num; }
+       battle::Monster **MonstersBegin() { return monsters; }
+       battle::Monster **MonstersEnd() { return monsters + numMonsters; }
 
        /// Get an entity that should follow in this one's steps or 0 if none.
        Entity *Follower() { return follower; }
@@ -147,7 +143,7 @@ private:
        const graphics::Animation *animation;
        const graphics::Sprite *sprite;
        battle::PartyLayout *partyLayout;
-       battle::Monster *monsters;
+       battle::Monster **monsters;
        int numMonsters;
        graphics::AnimationRunner runner;
        geometry::Vector<int> spriteOffset;