Horizon Official Technical Documentation
Horizon::Zone::CombatRegistry::StatusOperation Class Reference

#include <Combat.hpp>

+ Inheritance diagram for Horizon::Zone::CombatRegistry::StatusOperation:
+ Collaboration diagram for Horizon::Zone::CombatRegistry::StatusOperation:

Classes

class  StatusOperand
 

Public Types

enum  status_operation_type { STATUS_OPERATION_ADD = 0 , STATUS_OPERATION_REMOVE }
 
- Public Types inherited from Horizon::Zone::CombatRegistry::CombatOperation
enum  combat_operation_type {
  COMBAT_OPERATION_ATTRIBUTE , COMBAT_OPERATION_APPEARANCE , COMBAT_OPERATION_STATUS , COMBAT_OPERATION_SKILL_EXECUTION ,
  COMBAT_OPERATION_MELEE_EXECUTION , COMBAT_OPERATION_SKILL_RESULT , COMBAT_OPERATION_MELEE_RESULT , COMBAT_OPERATION_MAX
}
 

Public Member Functions

 StatusOperation ()=delete
 
 StatusOperation (StatusOperand *operand, status_operation_type operation_type)
 
 ~StatusOperation ()
 
void execute () const override
 
- Public Member Functions inherited from Horizon::Zone::CombatRegistry::CombatOperation
 CombatOperation ()=delete
 
 CombatOperation (const CombatOperation &right)=delete
 
 CombatOperation (CombatOperation &&right)=delete
 
 CombatOperation (CombatOperand *operand, int operation_type, int operation_sub_type, CombatOperationValue *value)
 
 CombatOperation (CombatOperand *operand, int operation_type, int operation_sub_type)
 
virtual ~CombatOperation ()
 
virtual CombatOperandget_operand () const
 
int get_operation_type () const
 
int get_operation_sub_type () const
 
virtual CombatOperationValueget_operation_value () const
 
int get_priority ()
 
void set_priority (int priority)
 
virtual void execute () const =0
 
void operator= (const CombatOperation &operation)=delete
 

Additional Inherited Members

- Protected Attributes inherited from Horizon::Zone::CombatRegistry::CombatOperation
CombatOperand_operand {nullptr}
 
int _operation_type { 0 }
 
int _operation_sub_type { 0 }
 
CombatOperationValue_operation_value {nullptr}
 
int _priority { 0 }
 

Member Enumeration Documentation

◆ status_operation_type

Enumerator
STATUS_OPERATION_ADD 
STATUS_OPERATION_REMOVE 
378 {
381 };
@ STATUS_OPERATION_REMOVE
Definition: Combat.hpp:380
@ STATUS_OPERATION_ADD
Definition: Combat.hpp:379

Constructor & Destructor Documentation

◆ StatusOperation() [1/2]

Horizon::Zone::CombatRegistry::StatusOperation::StatusOperation ( )
delete

◆ StatusOperation() [2/2]

Horizon::Zone::CombatRegistry::StatusOperation::StatusOperation ( StatusOperand operand,
status_operation_type  operation_type 
)
inline
408 : CombatOperation(operand, COMBAT_OPERATION_STATUS, (int) operation_type) { }
@ COMBAT_OPERATION_STATUS
Definition: Combat.hpp:291

◆ ~StatusOperation()

Horizon::Zone::CombatRegistry::StatusOperation::~StatusOperation ( )
inline
410{ }

Member Function Documentation

◆ execute()

void CombatRegistry::StatusOperation::execute ( ) const
overridevirtual

Implements Horizon::Zone::CombatRegistry::CombatOperation.

436{
439 std::shared_ptr<Unit> target = operand->get_target();
440
442 target->status_effect_end(config.type);
443 else
444 target->status_effect_start(config.type, config.total_time, config.val1, config.val2, config.val3, config.val4);
445}
std::shared_ptr< Unit > get_target()
Definition: Combat.hpp:263
int get_operation_sub_type() const
Definition: Combat.hpp:319
virtual CombatOperand * get_operand() const
Definition: Combat.hpp:317
s_combat_status_operation_config get_config()
Definition: Combat.hpp:395

References Horizon::Zone::CombatRegistry::StatusOperation::StatusOperand::get_config(), Horizon::Zone::CombatRegistry::CombatOperand::get_target(), Horizon::Zone::CombatRegistry::StatusOperation::StatusOperand::s_combat_status_operation_config::total_time, Horizon::Zone::CombatRegistry::StatusOperation::StatusOperand::s_combat_status_operation_config::type, Horizon::Zone::CombatRegistry::StatusOperation::StatusOperand::s_combat_status_operation_config::val1, Horizon::Zone::CombatRegistry::StatusOperation::StatusOperand::s_combat_status_operation_config::val2, Horizon::Zone::CombatRegistry::StatusOperation::StatusOperand::s_combat_status_operation_config::val3, and Horizon::Zone::CombatRegistry::StatusOperation::StatusOperand::s_combat_status_operation_config::val4.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: