1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-29 07:37:45 +00:00
sapphire/src/world/Action/EffectResult.h

43 lines
963 B
C
Raw Normal View History

2019-07-25 22:46:10 +10:00
#ifndef SAPPHIRE_EFFECTRESULT_H
#define SAPPHIRE_EFFECTRESULT_H
#include <ForwardsZone.h>
#include <Common.h>
namespace Sapphire::World::Action
{
/*!
* @brief A container for the computed result of an effect on a single actor. Used to apply damage/healing dealt
* at a later point in time.
*/
class EffectResult
{
public:
explicit EffectResult( Entity::CharaPtr target, uint32_t delayMs );
void damage( uint32_t amount, Common::ActionHitSeverityType severity );
void heal( uint32_t amount, Common::ActionHitSeverityType severity );
Entity::CharaPtr getTarget() const;
uint32_t getValue() const;
void setParam( uint8_t param );
2019-07-25 22:46:10 +10:00
Common::EffectEntry buildEffectEntry() const;
private:
uint64_t m_runAfter;
Entity::CharaPtr m_target;
Common::ActionHitSeverityType m_severity;
Common::ActionEffectType m_type;
uint32_t m_value;
uint8_t m_param;
2019-07-25 22:46:10 +10:00
};
}
#endif //SAPPHIRE_EFFECTRESULT_H