1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-30 08:07:46 +00:00
sapphire/src/world/Action/ActionResult.h

43 lines
1.2 KiB
C
Raw Normal View History

#pragma once
2019-07-25 22:46:10 +10:00
#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 ActionResult
2019-07-25 22:46:10 +10:00
{
public:
explicit ActionResult( Entity::CharaPtr target, uint64_t delayMs );
2019-07-25 22:46:10 +10:00
void damage( uint32_t amount, Common::ActionHitSeverityType severity, Common::ActionResultFlag flag = Common::ActionResultFlag::None );
void heal( uint32_t amount, Common::ActionHitSeverityType severity, Common::ActionResultFlag flag = Common::ActionResultFlag::None );
void restoreMP( uint32_t amount, Common::ActionResultFlag flag = Common::ActionResultFlag::None );
2020-01-05 17:09:27 +09:00
void startCombo( uint16_t actionId );
2020-01-05 20:49:50 +09:00
void comboSucceed();
2020-01-06 19:25:01 +09:00
void applyStatusEffect( uint16_t statusId, uint8_t param );
2020-01-26 21:16:41 +11:00
void mount( uint16_t mountId );
2019-07-25 22:46:10 +10:00
Entity::CharaPtr getTarget() const;
uint64_t getDelay();
const Common::CalcResultParam& getCalcResultParam() const;
2019-07-25 22:46:10 +10:00
void execute();
2019-07-25 22:46:10 +10:00
private:
uint64_t m_delayMs;
2019-07-25 22:46:10 +10:00
Entity::CharaPtr m_target;
Common::CalcResultParam m_result;
2020-01-08 17:21:01 +09:00
2019-07-25 22:46:10 +10:00
};
using ActionResultList = std::vector< ActionResultPtr >;
}