tibia-client/src/otclient/core/creature.h

44 lines
1.0 KiB
C
Raw Normal View History

2011-08-15 16:11:24 +02:00
#ifndef CREATURE_H
#define CREATURE_H
#include "thing.h"
2011-08-15 23:02:52 +02:00
struct Outfit {
2011-08-15 16:11:24 +02:00
uint16 type;
uint8 head;
uint8 body;
uint8 legs;
uint8 feet;
uint8 addons;
};
class Creature : public Thing
{
public:
Creature();
2011-08-15 23:02:52 +02:00
virtual ~Creature() { }
2011-08-15 16:11:24 +02:00
2011-08-15 23:02:52 +02:00
virtual void draw(int x, int y);
2011-08-15 16:11:24 +02:00
void setName(const std::string& name) { m_name = name; }
void setHealthPercent(uint8 healthPercent) { m_healthPercent = healthPercent; }
void setDirection(Direction direction) { m_direction = direction; }
2011-08-15 23:02:52 +02:00
void setOutfit(const Outfit& outfit) { m_outfit = outfit; }
2011-08-15 16:11:24 +02:00
Direction getDirection() { return m_direction; }
Outfit getOutfit() { return m_outfit; }
2011-08-15 23:02:52 +02:00
std::string getName() { return m_name; }
uint8 getHealthPercent() { return m_healthPercent; }
const ThingAttributes& getAttributes();
2011-08-15 16:11:24 +02:00
2011-08-15 23:02:52 +02:00
CreaturePtr asCreature() { return std::static_pointer_cast<Creature>(shared_from_this()); }
2011-08-15 16:11:24 +02:00
private:
std::string m_name;
uint8 m_healthPercent;
Direction m_direction;
Outfit m_outfit;
};
2011-08-15 23:02:52 +02:00
#endif