2017-08-08 13:53:47 +02:00
|
|
|
#ifndef _STATUSEFFECT_H_
|
|
|
|
#define _STATUSEFFECT_H_
|
|
|
|
|
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
|
|
|
|
#include "Forwards.h"
|
|
|
|
|
|
|
|
namespace Core
|
|
|
|
{
|
|
|
|
namespace StatusEffect
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
class StatusEffect
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
StatusEffect( uint32_t id, Entity::ActorPtr sourceActor, Entity::ActorPtr targetActor,
|
|
|
|
uint32_t duration, uint32_t tickRate );
|
|
|
|
|
|
|
|
~StatusEffect();
|
|
|
|
|
|
|
|
void onTick();
|
|
|
|
void applyStatus();
|
|
|
|
void removeStatus();
|
|
|
|
|
|
|
|
uint32_t getId() const;
|
|
|
|
uint32_t getDuration() const;
|
|
|
|
uint32_t getTickRate() const;
|
|
|
|
uint32_t getSrcActorId() const;
|
|
|
|
uint32_t getTargetActorId() const;
|
|
|
|
uint64_t getLastTickMs() const;
|
|
|
|
uint64_t getStartTimeMs() const;
|
2017-08-12 22:11:56 -03:00
|
|
|
uint16_t getPower() const;
|
|
|
|
uint16_t getPower_2() const;
|
2017-08-08 13:53:47 +02:00
|
|
|
void setLastTick( uint64_t lastTick );
|
2017-08-12 22:11:56 -03:00
|
|
|
void setPower( uint16_t power );
|
|
|
|
void setPower_2( uint16_t power );
|
2017-08-08 13:53:47 +02:00
|
|
|
const std::string& getName() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
uint32_t m_id;
|
|
|
|
Entity::ActorPtr m_sourceActor;
|
|
|
|
Entity::ActorPtr m_targetActor;
|
|
|
|
uint32_t m_duration;
|
|
|
|
uint64_t m_startTime;
|
|
|
|
uint32_t m_tickRate;
|
|
|
|
uint64_t m_lastTick;
|
2017-08-12 22:11:56 -03:00
|
|
|
uint16_t m_unkpower1;
|
|
|
|
uint16_t m_unkpower2; //Figure out what this actually is supposed to be
|
2017-08-08 13:53:47 +02:00
|
|
|
std::string m_name;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|