]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/Monster.h
added monster's attack animation
[l2e.git] / src / battle / Monster.h
index 50a18076d357dff9fc9050caee4fd078c809c1ee..e4d787e741e87856be256f9f626554b78d49263b 100644 (file)
 
 #include <SDL.h>
 
-namespace graphics { class Sprite; }
+namespace common { class Item; }
+namespace graphics {
+       class Animation;
+       class Sprite;
+}
 
 namespace battle {
 
@@ -42,12 +46,17 @@ public:
        Uint16 ExpReward() const { return expReward; }
        Uint16 GoldReward() const { return goldReward; }
 
-       const /* Item */ void *DropItem() const { return dropItem; }
+       const common::Item *DropItem() const { return dropItem; }
        Uint8 DropChance() const { return dropChance; }
 
        const /* Script */ void *AttackScript() { return attackScript; }
        const /* Script */ void *DefenseScript() { return defenseScript; }
 
+       graphics::Animation *AttackAnimation() { return attackAnimation; }
+       const graphics::Animation *AttackAnimation() const { return attackAnimation; }
+       graphics::Animation *SpellAnimation() { return spellAnimation; }
+       const graphics::Animation *SpellAnimation() const { return spellAnimation; }
+
 // temporary setters until loader is implemented
 public:
        void SetName(const char *n) { name = n; }
@@ -60,13 +69,19 @@ public:
        void SetStats(const Stats &s) { stats = s; }
        void SetReward(Uint16 exp, Uint16 gold) { expReward = exp; goldReward = gold; }
 
+       void SetAttackAnimation(graphics::Animation *a) { attackAnimation = a; }
+       void SetSpellAnimation(graphics::Animation *a) { spellAnimation = a; }
+
 private:
        const char *name;
        graphics::Sprite *sprite;
-       /* Item */ void *dropItem;
+       common::Item *dropItem;
        /* Script */ void *attackScript;
        /* Script */ void *defenseScript;
 
+       graphics::Animation *attackAnimation;
+       graphics::Animation *spellAnimation;
+
        Uint16 maxHealth, health;
        Uint16 maxMana, mana;