-/*
- * Hero.h
- *
- * Created on: Oct 7, 2012
- * Author: holy
- */
-
#ifndef COMMON_HERO_H_
#define COMMON_HERO_H_
-#include "fwd.h"
+namespace common {
+ class Item;
+ class Spell;
+}
+namespace graphics {
+ class Animation;
+ class Sprite;
+}
+
#include "Stats.h"
-#include "../graphics/fwd.h"
#include "../map/Entity.h"
#include <vector>
bool CanEquip(const Item &) const;
bool CanInvoke(const Spell &) const;
- Item *Equipment(EquipSlot i) { return equipment[i]; }
const Item *Equipment(EquipSlot i) const { return equipment[i]; }
bool Equipped(EquipSlot i) const { return equipment[i]; }
void RemoveEquipment(EquipSlot i) { equipment[i] = 0; }
- void SetEquipment(EquipSlot i, Item *item) { equipment[i] = item; }
+ void SetEquipment(EquipSlot i, const Item *item) { equipment[i] = item; }
std::vector<const Spell *> &Spells() { return spells; }
const std::vector<const Spell *> &Spells() const { return spells; }
int useMask;
- Item *equipment[EQUIP_COUNT];
+ const Item *equipment[EQUIP_COUNT];
// TODO: vector does not seem to be a good choice
std::vector<const Spell *> spells;
}
-#endif /* COMMON_HERO_H_ */
+#endif