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

#include <Combat.hpp>

Public Member Functions

 CombatStage (int priority)
 
 ~CombatStage ()
 
void add_operation (CombatOperation *operation)
 
AttributeOperationpush_attribute_operation (std::shared_ptr< Unit > source, std::shared_ptr< Unit > target, std::shared_ptr< Traits::Attribute > attribute, CombatRegistry::AttributeOperation::attribute_operation_type operation_type, int value)
 
StatusOperationpush_status_add_operation (std::shared_ptr< Unit > source, std::shared_ptr< Unit > target, CombatRegistry::StatusOperation::StatusOperand::s_combat_status_operation_config config)
 
StatusOperationpush_status_remove_operation (std::shared_ptr< Unit > source, std::shared_ptr< Unit > target, CombatRegistry::StatusOperation::StatusOperand::s_combat_status_operation_config config)
 
SkillExecutionOperationpush_skill_execution_operation (std::shared_ptr< Unit > source, std::shared_ptr< Unit > target, CombatRegistry::SkillExecutionOperation::SkillExecutionOperand::s_skill_execution_operation_config config, CombatRegistry::SkillExecutionOperation::skill_execution_operation_type operation_type)
 
SkillResultOperationpush_skill_result_damage_operation (std::shared_ptr< Unit > source, std::shared_ptr< Unit > target, CombatRegistry::SkillResultOperation::SkillResultOperand::s_skill_result_operation_config config, combat_damage value_config)
 
SkillResultOperationpush_skill_result_healing_operation (std::shared_ptr< Unit > source, std::shared_ptr< Unit > target, CombatRegistry::SkillResultOperation::SkillResultOperand::s_skill_result_operation_config config, combat_healing value_config)
 
MeleeExecutionOperationpush_melee_execution_operation (std::shared_ptr< Unit > source, std::shared_ptr< Unit > target, CombatRegistry::MeleeExecutionOperation::MeleeExecutionOperand::s_melee_execution_operation_config config, CombatRegistry::MeleeExecutionOperation::melee_execution_operation_type operation_type)
 
MeleeResultOperationpush_melee_result_damage_operation (std::shared_ptr< Unit > source, std::shared_ptr< Unit > target, combat_damage value_config)
 
MeleeResultOperationpush_melee_result_healing_operation (std::shared_ptr< Unit > source, std::shared_ptr< Unit > target, combat_healing value_config)
 
int get_priority ()
 
void set_priority (int priority)
 
bool has_operations ()
 
bool has_next_operation ()
 
const CombatOperationget_next_operation ()
 
void pop_queue ()
 

Private Attributes

int _priority { 0 }
 
std::priority_queue< CombatOperation *, std::vector< CombatOperation * >, CompareCombatOperation_operation_queue
 

Constructor & Destructor Documentation

◆ CombatStage()

Horizon::Zone::CombatRegistry::CombatStage::CombatStage ( int  priority)
inline
601: _priority(priority) { }
int _priority
Definition: Combat.hpp:625

◆ ~CombatStage()

Horizon::Zone::CombatRegistry::CombatStage::~CombatStage ( )
inline
602{ }

Member Function Documentation

◆ add_operation()

void Horizon::Zone::CombatRegistry::CombatStage::add_operation ( CombatOperation operation)
inline
604{ _operation_queue.push(operation); }
std::priority_queue< CombatOperation *, std::vector< CombatOperation * >, CompareCombatOperation > _operation_queue
Definition: Combat.hpp:626

References _operation_queue.

Referenced by Horizon::Zone::ZoneClientInterface::action_request(), push_attribute_operation(), Horizon::Zone::ZoneClientInterface::use_skill_on_target(), and Horizon::Zone::Combat::weapon_attack().

+ Here is the caller graph for this function:

◆ get_next_operation()

const CombatOperation * Horizon::Zone::CombatRegistry::CombatStage::get_next_operation ( )
inline
622{ return _operation_queue.top(); }

References _operation_queue.

Referenced by Horizon::Zone::CombatRegistry::process_queue().

+ Here is the caller graph for this function:

◆ get_priority()

int Horizon::Zone::CombatRegistry::CombatStage::get_priority ( )
inline
616{ return _priority; }

References _priority.

Referenced by Horizon::Zone::CombatRegistry::CompareCombatStage::operator()(), and Horizon::Zone::CombatComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ has_next_operation()

bool Horizon::Zone::CombatRegistry::CombatStage::has_next_operation ( )
inline
620{ return has_operations(); }
bool has_operations()
Definition: Combat.hpp:619

References has_operations().

+ Here is the call graph for this function:

◆ has_operations()

bool Horizon::Zone::CombatRegistry::CombatStage::has_operations ( )
inline
619{ return !_operation_queue.empty(); }

References _operation_queue.

Referenced by has_next_operation(), and Horizon::Zone::CombatRegistry::process_queue().

+ Here is the caller graph for this function:

◆ pop_queue()

void Horizon::Zone::CombatRegistry::CombatStage::pop_queue ( )
inline
623{ _operation_queue.pop(); }

References _operation_queue.

Referenced by Horizon::Zone::CombatRegistry::process_queue().

+ Here is the caller graph for this function:

◆ push_attribute_operation()

CombatRegistry::AttributeOperation * CombatRegistry::CombatStage::push_attribute_operation ( std::shared_ptr< Unit source,
std::shared_ptr< Unit target,
std::shared_ptr< Traits::Attribute attribute,
CombatRegistry::AttributeOperation::attribute_operation_type  operation_type,
int  value 
)
307{
310 CombatRegistry::AttributeOperation *operation = new CombatRegistry::AttributeOperation(operand, operation_type, combat_value);
311 this->add_operation(operation);
312 return operation;
313}
void add_operation(CombatOperation *operation)
Definition: Combat.hpp:604

References add_operation().

Referenced by Horizon::Zone::CombatComponent::sync_data_types().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ push_melee_execution_operation()

CombatRegistry::MeleeExecutionOperation * CombatRegistry::CombatStage::push_melee_execution_operation ( std::shared_ptr< Unit source,
std::shared_ptr< Unit target,
CombatRegistry::MeleeExecutionOperation::MeleeExecutionOperand::s_melee_execution_operation_config  config,
CombatRegistry::MeleeExecutionOperation::melee_execution_operation_type  operation_type 
)

Referenced by Horizon::Zone::CombatComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ push_melee_result_damage_operation()

CombatRegistry::MeleeResultOperation * CombatRegistry::CombatStage::push_melee_result_damage_operation ( std::shared_ptr< Unit source,
std::shared_ptr< Unit target,
combat_damage  value_config 
)
366{
369 CombatRegistry::MeleeResultOperation *operation = new CombatRegistry::MeleeResultOperation(operand, CombatRegistry::MeleeResultOperation::melee_result_operation_type::MELEE_RESULT_OPERATION_DAMAGE, combat_value);
370 this->add_operation(operation);
371 return operation;
372}

Referenced by Horizon::Zone::CombatComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ push_melee_result_healing_operation()

CombatRegistry::MeleeResultOperation * CombatRegistry::CombatStage::push_melee_result_healing_operation ( std::shared_ptr< Unit source,
std::shared_ptr< Unit target,
combat_healing  value_config 
)
375{
378 CombatRegistry::MeleeResultOperation *operation = new CombatRegistry::MeleeResultOperation(operand, CombatRegistry::MeleeResultOperation::melee_result_operation_type::MELEE_RESULT_OPERATION_HEALING, combat_value);
379 this->add_operation(operation);
380 return operation;
381}

Referenced by Horizon::Zone::CombatComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ push_skill_execution_operation()

CombatRegistry::SkillExecutionOperation * CombatRegistry::CombatStage::push_skill_execution_operation ( std::shared_ptr< Unit source,
std::shared_ptr< Unit target,
CombatRegistry::SkillExecutionOperation::SkillExecutionOperand::s_skill_execution_operation_config  config,
CombatRegistry::SkillExecutionOperation::skill_execution_operation_type  operation_type 
)

Referenced by Horizon::Zone::CombatComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ push_skill_result_damage_operation()

CombatRegistry::SkillResultOperation * CombatRegistry::CombatStage::push_skill_result_damage_operation ( std::shared_ptr< Unit source,
std::shared_ptr< Unit target,
CombatRegistry::SkillResultOperation::SkillResultOperand::s_skill_result_operation_config  config,
combat_damage  value_config 
)
340{
343 CombatRegistry::SkillResultOperation *operation = new CombatRegistry::SkillResultOperation(operand, CombatRegistry::SkillResultOperation::skill_result_operation_type::SKILL_RESULT_OPERATION_DAMAGE, combat_value);
344 this->add_operation(operation);
345 return operation;
346}

Referenced by Horizon::Zone::CombatComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ push_skill_result_healing_operation()

CombatRegistry::SkillResultOperation * CombatRegistry::CombatStage::push_skill_result_healing_operation ( std::shared_ptr< Unit source,
std::shared_ptr< Unit target,
CombatRegistry::SkillResultOperation::SkillResultOperand::s_skill_result_operation_config  config,
combat_healing  value_config 
)
349{
352 CombatRegistry::SkillResultOperation *operation = new CombatRegistry::SkillResultOperation(operand, CombatRegistry::SkillResultOperation::skill_result_operation_type::SKILL_RESULT_OPERATION_HEALING, combat_value);
353 this->add_operation(operation);
354 return operation;
355}

Referenced by Horizon::Zone::CombatComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ push_status_add_operation()

CombatRegistry::StatusOperation * CombatRegistry::CombatStage::push_status_add_operation ( std::shared_ptr< Unit source,
std::shared_ptr< Unit target,
CombatRegistry::StatusOperation::StatusOperand::s_combat_status_operation_config  config 
)
316{
318 CombatRegistry::StatusOperation *operation = new CombatRegistry::StatusOperation(operand, CombatRegistry::StatusOperation::status_operation_type::STATUS_OPERATION_ADD);
319 this->add_operation(operation);
320 return operation;
321}

Referenced by Horizon::Zone::CombatComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ push_status_remove_operation()

CombatRegistry::StatusOperation * CombatRegistry::CombatStage::push_status_remove_operation ( std::shared_ptr< Unit source,
std::shared_ptr< Unit target,
CombatRegistry::StatusOperation::StatusOperand::s_combat_status_operation_config  config 
)
324{
326 CombatRegistry::StatusOperation *operation = new CombatRegistry::StatusOperation(operand, CombatRegistry::StatusOperation::status_operation_type::STATUS_OPERATION_REMOVE);
327 this->add_operation(operation);
328 return operation;
329}

Referenced by Horizon::Zone::CombatComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ set_priority()

void Horizon::Zone::CombatRegistry::CombatStage::set_priority ( int  priority)
inline
617{ _priority = priority; }

References _priority.

Member Data Documentation

◆ _operation_queue

std::priority_queue<CombatOperation *, std::vector<CombatOperation *>, CompareCombatOperation> Horizon::Zone::CombatRegistry::CombatStage::_operation_queue
private

◆ _priority

int Horizon::Zone::CombatRegistry::CombatStage::_priority { 0 }
private

Referenced by get_priority(), and set_priority().


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