Horizon Official Technical Documentation
|
|
#include <Unit.hpp>
Classes | |
struct | s_lockon_after_walk_completed |
Public Member Functions | |
Unit (uint64_t uuid, unit_type type, unit_type_mask type_mask, std::shared_ptr< Map > map, MapCoords map_coords) | |
Unit (uint64_t uuid, unit_type type, unit_type_mask type_mask) | |
virtual | ~Unit () |
bool | initialize () |
virtual bool | finalize () |
bool | is_initialized () const |
bool | is_finalized () const |
void | set_finalized (bool finalized) |
MapCoords const & | dest_coords () const |
Movement. More... | |
virtual bool | walk_to_coordinates (int16_t x, int16_t y) |
virtual bool | walk_to_unit (std::shared_ptr< Unit > unit) |
bool | is_walking () const |
virtual void | stop_movement ()=0 |
bool | stop_walking (bool cancel=false, bool notify=false) |
uint64_t | uuid () const |
Unit Data. More... | |
unit_uuid | s_uuid () const |
void | set_uuid (uint64_t uuid) |
uint32_t | guid () |
uint16_t | job_id () const |
void | set_job_id (uint16_t job_id) |
unit_posture_type | posture () const |
void | set_posture (unit_posture_type posture) |
const std::string & | name () const |
void | set_name (const std::string &name) |
directions | direction () const |
void | set_direction (directions dir) |
std::shared_ptr< Horizon::Zone::Traits::Status > | status () |
void | set_status (std::shared_ptr< Horizon::Zone::Traits::Status > st) |
void | force_movement_stop_internal (bool stop=false) |
std::shared_ptr< Map > | map () |
Map & Map Container. More... | |
void | set_map (std::shared_ptr< Map > map) |
AStar::CoordinateList | get_walk_path () |
unit_type | type () const |
Unit applications. More... | |
unit_type_mask | type_mask () const |
bool | is_of_type (int type_mask) |
template<class T > | |
std::shared_ptr< T > | downcast () |
MapCoords const & | map_coords () const |
Grid applications. More... | |
void | set_map_coords (MapCoords const &coords) |
GridCoords const & | grid_coords () const |
void | set_grid_coords (GridCoords const &coords) |
bool | is_in_range_of (std::shared_ptr< Unit > unit, uint8_t range=MAX_VIEW_RANGE) |
void | notify_nearby_players_of_existence (unit_viewport_notification_type notif_type) |
void | notify_nearby_players_of_spawn () |
void | notify_nearby_players_of_movement (bool new_entry=false) |
void | notify_nearby_players_of_movement_stop (MapCoords stop_coords) |
void | notify_nearby_players_of_skill_use (grid_unit_skill_use_notification_type notification_type, s_unit_skill_use_notifier_config config) |
void | notify_nearby_players_of_basic_attack (s_grid_unit_basic_attack_config config) |
void | notify_nearby_players_of_item_drop (s_grid_notify_item_drop_entry entry) |
std::shared_ptr< Unit > | get_nearby_unit (uint32_t guid) |
uint64_t | get_scheduler_task_id (unit_task_schedule_group group) |
std::map< int16_t, std::shared_ptr< status_change_entry > > & | get_status_effects () |
void | apply_status_change_in_area (std::shared_ptr< Unit > target, s_grid_sc_apply_in_skill_area_config const &config, s_grid_apply_in_area_config const &aoe_config) |
void | remove_status_change_in_area (std::shared_ptr< Unit > target, int sc_type, s_grid_apply_in_area_config const &aoe_config) |
void | execute_skill_in_area (std::shared_ptr< Unit > target, std::shared_ptr< SkillExecution > skill_execution, s_grid_apply_in_area_config const &aoe_config) |
void | execute_skill_in_cell (std::shared_ptr< Unit > target, MapCoords cell, std::shared_ptr< SkillExecution > skill_execution, s_grid_apply_in_area_config const &aoe_config) |
void | use_skill_on_target (int16_t skill_lv, int16_t skill_id, int target_guid) |
void | use_skill_on_ground (int16_t skill_lv, int16_t skill_id, int16_t pos_x, int16_t pos_y) |
void | use_skill_on_ground (int16_t skill_lv, int16_t skill_id, int16_t pos_x, int16_t pos_y, std::string contents) |
bool | status_effect_start (int type, int total_time, int val1, int val2, int val3, int val4) |
Status Effects. More... | |
bool | status_effect_end (int type) |
virtual void | on_status_effect_start (std::shared_ptr< status_change_entry > sce)=0 |
virtual void | on_status_effect_end (std::shared_ptr< status_change_entry > sce)=0 |
virtual void | on_status_effect_change (std::shared_ptr< status_change_entry > sce)=0 |
std::shared_ptr< AStar::CoordinateList > | path_to (std::shared_ptr< Unit > e) |
int | distance_from (std::shared_ptr< Unit > e) |
virtual bool | attack (std::shared_ptr< Unit > target, bool continuous=false) |
virtual bool | stop_attacking () |
bool | target_is_attackable (std::shared_ptr< Unit > target) |
void | set_attacking (bool attacking) |
bool | is_attacking () |
void | on_attack_end () |
bool | is_dead () |
virtual void | on_damage_received (std::shared_ptr< Unit > damage_dealer, int damage) |
virtual void | on_killed (std::shared_ptr< Unit > killer, bool with_drops=false, bool with_exp=false) |
std::shared_ptr< Combat > | combat () |
Combat. More... | |
void | set_combat (std::shared_ptr< Combat > combat) |
void | update (uint64_t tick) |
Extremely time-sensitive functions. More... | |
std::shared_ptr< CombatRegistry > | combat_registry () |
bool | has_damage_walk_delay () |
Walk Delay. More... | |
void | set_damage_walk_delay (bool delay) |
void | set_lockon_after_walk_completed (uint64_t target_guid, bool continuous=false) |
Lockon after walk completed. More... | |
void | clear_lockon_after_walk_completed () |
uint64_t | lockon_after_walk_completed_target_guid () |
Protected Member Functions | |
bool | schedule_walk () |
void | walk () |
virtual void | on_pathfinding_failure ()=0 |
virtual void | on_movement_begin (int32_t time)=0 |
virtual void | on_movement_step ()=0 |
virtual void | on_movement_end ()=0 |
Unit::Unit | ( | uint64_t | uuid, |
unit_type | type, | ||
unit_type_mask | type_mask, | ||
std::shared_ptr< Map > | map, | ||
MapCoords | map_coords | ||
) |
References map(), set_map(), set_uuid(), and uuid().
Unit::Unit | ( | uint64_t | uuid, |
unit_type | type, | ||
unit_type_mask | type_mask | ||
) |
References set_uuid(), and uuid().
|
virtual |
References _combat, and _combat_registry.
void Unit::apply_status_change_in_area | ( | std::shared_ptr< Unit > | target, |
s_grid_sc_apply_in_skill_area_config const & | config, | ||
s_grid_apply_in_area_config const & | aoe_config | ||
) |
References map(), map_coords(), and MAX_VIEW_RANGE.
Referenced by Horizon::Zone::UnitComponent::sync_data_types().
Reimplemented in Horizon::Zone::Units::Player.
References _attackable_time, CBT_RET_DEF, combat(), get_scheduler_task_id(), HLog, is_attacking(), is_in_range_of(), is_walking(), map(), MAX_VIEW_RANGE, on_attack_end(), path_to(), TaskContext::Repeat(), set_attacking(), set_combat(), set_lockon_after_walk_completed(), status(), stop_attacking(), stop_walking(), target_is_attackable(), UNIT_MONSTER, UNIT_SCHEDULE_ATTACK, and walk_to_unit().
Referenced by Horizon::Zone::Units::Player::attack(), Horizon::Zone::Units::Monster::behavior_active(), and walk().
|
inline |
References _lockon_after_walk_completed, and Horizon::Zone::Unit::s_lockon_after_walk_completed::target_guid.
Referenced by walk().
|
inline |
References _combat.
Referenced by attack(), set_combat(), stop_attacking(), and Horizon::Zone::UnitComponent::sync_data_types().
|
inline |
References _combat_registry.
Referenced by Horizon::Zone::UnitComponent::sync_data_types(), and update().
|
inline |
Movement.
References _dest_pos.
Referenced by is_walking(), Horizon::Zone::Units::Player::on_movement_begin(), and Horizon::Zone::UnitComponent::sync_data_types().
|
inline |
References _facing_dir.
Referenced by Horizon::Zone::UnitComponent::sync_data_types().
|
inline |
References path_to().
Referenced by Horizon::Zone::Units::Monster::behavior_active().
|
inline |
void Unit::execute_skill_in_area | ( | std::shared_ptr< Unit > | target, |
std::shared_ptr< SkillExecution > | skill_execution, | ||
s_grid_apply_in_area_config const & | aoe_config | ||
) |
References execute_skill_in_area(), map(), map_coords(), and MAX_VIEW_RANGE.
Referenced by execute_skill_in_area(), and Horizon::Zone::UnitComponent::sync_data_types().
void Unit::execute_skill_in_cell | ( | std::shared_ptr< Unit > | target, |
MapCoords | cell, | ||
std::shared_ptr< SkillExecution > | skill_execution, | ||
s_grid_apply_in_area_config const & | aoe_config | ||
) |
References cell, execute_skill_in_cell(), map(), map_coords(), and MAX_VIEW_RANGE.
Referenced by execute_skill_in_cell(), and Horizon::Zone::UnitComponent::sync_data_types().
|
virtual |
Reimplemented in Horizon::Zone::Units::Item, Horizon::Zone::Units::Monster, and Horizon::Zone::Units::Mob.
References _is_finalized, and set_finalized().
Referenced by Horizon::Zone::Units::Mob::finalize().
|
inline |
References _jump_walk_stop.
Referenced by Horizon::Zone::Units::Player::move_to_map(), Horizon::Zone::UnitComponent::sync_data_types(), and walk().
std::shared_ptr< Unit > Unit::get_nearby_unit | ( | uint32_t | guid | ) |
References GridUnitSearcher::get_result(), guid(), map(), and map_coords().
Referenced by Horizon::Zone::Units::Player::pickup_item(), Horizon::Zone::UnitComponent::sync_data_types(), and walk().
|
inline |
References guid().
Referenced by attack(), Horizon::Zone::Units::Monster::initialize(), status_effect_start(), Horizon::Zone::Units::Player::stop_attack(), stop_attacking(), stop_walking(), and walk().
|
inline |
References _status_effects.
Referenced by status_effect_end(), and status_effect_start().
|
inline |
References _walk_path.
Referenced by Horizon::Zone::UnitComponent::sync_data_types().
|
inline |
References _grid_coords.
Referenced by Horizon::Zone::UnitComponent::sync_data_types().
|
inline |
References _s_uuid, and unit_uuid::guid.
Referenced by get_nearby_unit(), get_scheduler_task_id(), notify_nearby_players_of_movement_stop(), Horizon::Zone::Units::Player::on_status_effect_end(), Horizon::Zone::Units::Player::on_status_effect_start(), Horizon::Zone::Units::Player::pickup_item(), Horizon::Zone::Units::Player::respawn(), Horizon::Zone::Units::Player::set_npc_contact_guid(), Horizon::Zone::Units::Player::stop_movement(), and Horizon::Zone::UnitComponent::sync_data_types().
|
inline |
bool Unit::initialize | ( | ) |
References _combat_registry, _is_initialized, _status, type(), UNIT_ITEM, and UNIT_SKILL.
Referenced by Horizon::Zone::Units::Item::initialize(), Horizon::Zone::Units::Monster::initialize(), Horizon::Zone::Units::NPC::initialize(), Horizon::Zone::Units::Player::initialize(), and Horizon::Zone::Units::Mob::initialize().
|
inline |
References _is_attacking.
Referenced by attack(), Horizon::Zone::Units::Monster::behavior_passive(), stop_attacking(), and walk_to_coordinates().
bool Unit::is_dead | ( | ) |
References status().
Referenced by Horizon::Zone::Units::Player::on_map_enter(), Horizon::Zone::Units::Player::remove_unit_from_viewport(), Horizon::Zone::Units::Player::respawn(), Horizon::Zone::UnitComponent::sync_data_types(), and target_is_attackable().
|
inline |
References _is_finalized.
bool Unit::is_in_range_of | ( | std::shared_ptr< Unit > | unit, |
uint8_t | range = MAX_VIEW_RANGE |
||
) |
References Coordinates< MAX_COORDINATES >::is_within_range(), map(), and map_coords().
Referenced by attack(), and Horizon::Zone::UnitComponent::sync_data_types().
|
inline |
|
inline |
|
inline |
References _changed_dest_pos, and dest_coords().
Referenced by attack(), Horizon::Zone::Units::Monster::behavior_passive(), Horizon::Zone::Units::Player::move_to_map(), and Horizon::Zone::UnitComponent::sync_data_types().
|
inline |
References _job_id.
Referenced by Horizon::Zone::Units::Player::initialize(), Horizon::Zone::Units::Player::job_change(), Horizon::Zone::Units::NPC::NPC(), set_job_id(), and Horizon::Zone::UnitComponent::sync_data_types().
|
inline |
References _lockon_after_walk_completed, and Horizon::Zone::Unit::s_lockon_after_walk_completed::target_guid.
Referenced by walk().
|
inline |
References _map.
Referenced by apply_status_change_in_area(), attack(), Horizon::Zone::Units::Monster::behavior_active(), Horizon::Zone::Units::Monster::behavior_passive(), execute_skill_in_area(), execute_skill_in_cell(), get_nearby_unit(), Horizon::Zone::Units::Item::initialize(), Horizon::Zone::Units::Monster::initialize(), Horizon::Zone::Units::NPC::initialize(), Horizon::Zone::Units::Player::initialize(), is_in_range_of(), Horizon::Zone::Units::Player::load(), Horizon::Zone::Units::Player::move_to_map(), Horizon::Zone::Units::Player::notify_in_area(), notify_nearby_players_of_basic_attack(), notify_nearby_players_of_existence(), notify_nearby_players_of_item_drop(), notify_nearby_players_of_movement(), notify_nearby_players_of_movement_stop(), notify_nearby_players_of_skill_use(), notify_nearby_players_of_spawn(), Horizon::Zone::Units::Monster::on_killed(), Horizon::Zone::Units::Monster::on_movement_step(), Horizon::Zone::Units::NPC::on_movement_step(), Horizon::Zone::Units::Player::on_movement_step(), path_to(), remove_status_change_in_area(), Horizon::Zone::Units::Player::respawn(), Horizon::Zone::Units::Player::save(), schedule_walk(), set_map(), status_effect_start(), Horizon::Zone::Units::Player::stop_attack(), stop_attacking(), stop_walking(), Horizon::Zone::UnitComponent::sync_data_types(), Horizon::Zone::Units::Player::throw_item(), Unit(), Horizon::Zone::Units::Player::update_viewport(), and walk().
|
inline |
Grid applications.
References _map_coords.
Referenced by apply_status_change_in_area(), Horizon::Zone::Units::Monster::behavior_active(), Horizon::Zone::Units::Monster::behavior_passive(), execute_skill_in_area(), execute_skill_in_cell(), get_nearby_unit(), Horizon::Zone::Units::Item::initialize(), Horizon::Zone::Units::Monster::initialize(), Horizon::Zone::Units::NPC::initialize(), Horizon::Zone::Units::Player::initialize(), is_in_range_of(), Horizon::Zone::Units::Player::notify_in_area(), notify_nearby_players_of_basic_attack(), notify_nearby_players_of_existence(), notify_nearby_players_of_item_drop(), notify_nearby_players_of_movement(), notify_nearby_players_of_movement_stop(), notify_nearby_players_of_skill_use(), notify_nearby_players_of_spawn(), Horizon::Zone::Units::Monster::on_killed(), Horizon::Zone::Units::Player::on_movement_begin(), Horizon::Zone::Units::Monster::on_movement_step(), Horizon::Zone::Units::NPC::on_movement_step(), Horizon::Zone::Units::Player::on_movement_step(), path_to(), remove_status_change_in_area(), Horizon::Zone::Units::Player::save(), schedule_walk(), Horizon::Zone::Units::Player::stop_movement(), stop_walking(), Horizon::Zone::UnitComponent::sync_data_types(), Horizon::Zone::Units::Player::throw_item(), and Horizon::Zone::Units::Player::update_viewport().
|
inline |
References _name.
Referenced by Horizon::Zone::Units::Monster::behavior_active(), Horizon::Zone::Units::NPC::NPC(), Horizon::Zone::Units::Player::save(), set_name(), and Horizon::Zone::UnitComponent::sync_data_types().
void Unit::notify_nearby_players_of_basic_attack | ( | s_grid_unit_basic_attack_config | config | ) |
References map(), and map_coords().
void Unit::notify_nearby_players_of_existence | ( | unit_viewport_notification_type | notif_type | ) |
References map(), and map_coords().
Referenced by Horizon::Zone::Units::Player::move_to_map(), on_killed(), Horizon::Zone::UnitComponent::sync_data_types(), and walk().
void Unit::notify_nearby_players_of_item_drop | ( | s_grid_notify_item_drop_entry | entry | ) |
References map(), and map_coords().
Referenced by Horizon::Zone::UnitComponent::sync_data_types().
void Unit::notify_nearby_players_of_movement | ( | bool | new_entry = false | ) |
References map(), and map_coords().
Referenced by schedule_walk(), and Horizon::Zone::UnitComponent::sync_data_types().
void Unit::notify_nearby_players_of_movement_stop | ( | MapCoords | stop_coords | ) |
References guid(), map(), map_coords(), Coordinates< MAX_COORDINATES >::x(), and Coordinates< MAX_COORDINATES >::y().
Referenced by stop_walking().
void Unit::notify_nearby_players_of_skill_use | ( | grid_unit_skill_use_notification_type | notification_type, |
s_unit_skill_use_notifier_config | config | ||
) |
References map(), and map_coords().
Referenced by Horizon::Zone::UnitComponent::sync_data_types().
void Unit::notify_nearby_players_of_spawn | ( | ) |
References map(), and map_coords().
Referenced by Horizon::Zone::Units::Player::on_map_enter(), and Horizon::Zone::UnitComponent::sync_data_types().
void Unit::on_attack_end | ( | ) |
References stop_attacking(), and stop_walking().
Referenced by attack().
|
virtual |
Reimplemented in Horizon::Zone::Units::Monster, Horizon::Zone::Units::Mob, and Horizon::Zone::Units::Player.
References on_killed(), and status().
Referenced by Horizon::Zone::Units::Mob::on_damage_received(), and Horizon::Zone::Units::Player::on_damage_received().
|
virtual |
Reimplemented in Horizon::Zone::Units::Monster, Horizon::Zone::Units::Mob, and Horizon::Zone::Units::Player.
References EVP_NOTIFY_DEAD, notify_nearby_players_of_existence(), stop_attacking(), and stop_walking().
Referenced by on_damage_received(), Horizon::Zone::Units::Mob::on_killed(), and Horizon::Zone::Units::Player::on_killed().
|
protectedpure virtual |
Implemented in Horizon::Zone::Units::Item, Horizon::Zone::Units::Elemental, Horizon::Zone::Units::Homunculus, Horizon::Zone::Units::Mercenary, Horizon::Zone::Units::Pet, Horizon::Zone::Units::Monster, Horizon::Zone::Units::NPC, Horizon::Zone::Units::Player, and Horizon::Zone::Units::Skill.
Referenced by walk().
|
protectedpure virtual |
Implemented in Horizon::Zone::Units::Item, Horizon::Zone::Units::Elemental, Horizon::Zone::Units::Homunculus, Horizon::Zone::Units::Mercenary, Horizon::Zone::Units::Pet, Horizon::Zone::Units::Monster, Horizon::Zone::Units::NPC, Horizon::Zone::Units::Player, and Horizon::Zone::Units::Skill.
Referenced by stop_walking().
|
protectedpure virtual |
Implemented in Horizon::Zone::Units::Item, Horizon::Zone::Units::Elemental, Horizon::Zone::Units::Homunculus, Horizon::Zone::Units::Mercenary, Horizon::Zone::Units::Pet, Horizon::Zone::Units::Monster, Horizon::Zone::Units::NPC, Horizon::Zone::Units::Player, and Horizon::Zone::Units::Skill.
Referenced by walk().
|
protectedpure virtual |
Implemented in Horizon::Zone::Units::Item, Horizon::Zone::Units::Elemental, Horizon::Zone::Units::Homunculus, Horizon::Zone::Units::Mercenary, Horizon::Zone::Units::Pet, Horizon::Zone::Units::Monster, Horizon::Zone::Units::NPC, Horizon::Zone::Units::Player, and Horizon::Zone::Units::Skill.
Referenced by schedule_walk().
|
pure virtual |
Implemented in Horizon::Zone::Units::Item, Horizon::Zone::Units::Elemental, Horizon::Zone::Units::Homunculus, Horizon::Zone::Units::Mercenary, Horizon::Zone::Units::Pet, Horizon::Zone::Units::Monster, Horizon::Zone::Units::NPC, and Horizon::Zone::Units::Player.
Referenced by status_effect_start().
|
pure virtual |
Implemented in Horizon::Zone::Units::Item, Horizon::Zone::Units::Elemental, Horizon::Zone::Units::Homunculus, Horizon::Zone::Units::Mercenary, Horizon::Zone::Units::Pet, Horizon::Zone::Units::Monster, Horizon::Zone::Units::NPC, and Horizon::Zone::Units::Player.
Referenced by status_effect_end().
|
pure virtual |
Implemented in Horizon::Zone::Units::Item, Horizon::Zone::Units::Elemental, Horizon::Zone::Units::Homunculus, Horizon::Zone::Units::Mercenary, Horizon::Zone::Units::Pet, Horizon::Zone::Units::Monster, Horizon::Zone::Units::NPC, and Horizon::Zone::Units::Player.
Referenced by status_effect_start().
std::shared_ptr< AStar::CoordinateList > Unit::path_to | ( | std::shared_ptr< Unit > | e | ) |
References map(), and map_coords().
Referenced by attack(), and distance_from().
|
inline |
References _posture.
Referenced by set_posture(), and Horizon::Zone::UnitComponent::sync_data_types().
void Unit::remove_status_change_in_area | ( | std::shared_ptr< Unit > | target, |
int | sc_type, | ||
s_grid_apply_in_area_config const & | aoe_config | ||
) |
References map(), map_coords(), and MAX_VIEW_RANGE.
Referenced by Horizon::Zone::UnitComponent::sync_data_types().
|
inline |
References _s_uuid.
Referenced by Horizon::Zone::UnitComponent::sync_data_types().
|
protected |
~1us
References _changed_dest_pos, _dest_pos, _type, _walk_path, HLog, map(), map_coords(), notify_nearby_players_of_movement(), on_pathfinding_failure(), UNIT_PLAYER, walk(), Coordinates< MAX_COORDINATES >::x(), and Coordinates< MAX_COORDINATES >::y().
Referenced by walk(), and walk_to_coordinates().
|
inline |
References _is_attacking.
Referenced by attack(), and stop_attacking().
|
inline |
|
inline |
References _damage_walk_delay.
|
inline |
References _facing_dir.
Referenced by Horizon::Zone::Units::Monster::Monster(), and Horizon::Zone::Units::NPC::NPC().
|
inline |
References _is_finalized.
Referenced by finalize().
|
inline |
References _grid_coords.
|
inline |
References _job_id, and job_id().
Referenced by Horizon::Zone::Units::Player::job_change(), Horizon::Zone::Units::Monster::Monster(), and Horizon::Zone::Units::NPC::NPC().
|
inline |
Lockon after walk completed.
References _lockon_after_walk_completed, Horizon::Zone::Unit::s_lockon_after_walk_completed::continuous, and Horizon::Zone::Unit::s_lockon_after_walk_completed::target_guid.
Referenced by attack().
|
inline |
Referenced by Horizon::Zone::Units::Player::load(), Horizon::Zone::Units::Player::move_to_map(), and Unit().
|
inline |
References _map_coords.
Referenced by Horizon::Zone::Units::Player::load(), Horizon::Zone::Units::Player::move_to_map(), and walk().
|
inline |
Referenced by Horizon::Zone::Units::Player::load(), Horizon::Zone::Units::Monster::Monster(), and Horizon::Zone::Units::NPC::NPC().
|
inline |
References _posture, and posture().
Referenced by Horizon::Zone::Units::Player::load(), and Horizon::Zone::UnitComponent::sync_data_types().
|
inline |
void Unit::set_uuid | ( | uint64_t | uuid | ) |
References _s_uuid, _uuid, unit_uuid::guid, sZone, unit_uuid::type, unit_uuid::uid2, unit_uuid::uid3, and uuid().
Referenced by Horizon::Zone::UnitComponent::sync_data_types(), and Unit().
|
inline |
References _status.
Referenced by attack(), Horizon::Zone::Units::NPC::initialize(), Horizon::Zone::Units::Player::initialize(), Horizon::Zone::Units::Mob::initialize(), is_dead(), Horizon::Zone::Units::Player::is_overweight_50(), Horizon::Zone::Units::Player::is_overweight_90(), Horizon::Zone::Units::Player::job_change(), on_damage_received(), Horizon::Zone::Units::Player::on_damage_received(), Horizon::Zone::Units::Player::on_item_equip(), Horizon::Zone::Units::Player::on_item_unequip(), Horizon::Zone::Units::Player::on_map_enter(), Horizon::Zone::Units::Player::respawn(), Horizon::Zone::Units::Player::save(), Horizon::Zone::UnitComponent::sync_data_types(), update(), and walk().
bool Unit::status_effect_end | ( | int | type | ) |
References get_status_effects(), HLog, on_status_effect_end(), and type().
Referenced by status_effect_start(), and Horizon::Zone::UnitComponent::sync_data_types().
bool Unit::status_effect_start | ( | int | type, |
int | total_time, | ||
int | val1, | ||
int | val2, | ||
int | val3, | ||
int | val4 | ||
) |
Status Effects.
References get_scheduler_task_id(), get_status_effects(), map(), on_status_effect_change(), on_status_effect_start(), TaskContext::Repeat(), status_effect_end(), type(), UNIT_SCHEDULE_STATUS_EFFECT_CLEAR, and UNIT_STATUS_EFFECT_CHECK_TIME.
Referenced by Horizon::Zone::UnitComponent::sync_data_types().
|
virtual |
References combat(), get_scheduler_task_id(), is_attacking(), map(), set_attacking(), and UNIT_SCHEDULE_ATTACK.
Referenced by attack(), on_attack_end(), on_killed(), and walk_to_coordinates().
|
pure virtual |
Implemented in Horizon::Zone::Units::Item, Horizon::Zone::Units::Elemental, Horizon::Zone::Units::Homunculus, Horizon::Zone::Units::Mercenary, Horizon::Zone::Units::Pet, Horizon::Zone::Units::Monster, Horizon::Zone::Units::NPC, Horizon::Zone::Units::Player, and Horizon::Zone::Units::Skill.
Referenced by Horizon::Zone::UnitComponent::sync_data_types().
References _changed_dest_pos, _dest_pos, get_scheduler_task_id(), map(), map_coords(), notify_nearby_players_of_movement_stop(), on_movement_end(), and UNIT_SCHEDULE_WALK.
Referenced by attack(), on_attack_end(), on_killed(), and walk().
bool Unit::target_is_attackable | ( | std::shared_ptr< Unit > | target | ) |
References HLog, and is_dead().
Referenced by attack(), and walk().
|
inline |
Unit applications.
References _type.
Referenced by initialize(), Horizon::Zone::Units::Player::notify_in_area(), Horizon::Zone::Units::Player::remove_unit_from_viewport(), status_effect_end(), status_effect_start(), and Horizon::Zone::UnitComponent::sync_data_types().
|
inline |
void Unit::update | ( | uint64_t | tick | ) |
Extremely time-sensitive functions.
Extremely time-sensitive, do not use for any other purpose than to check for very small calculations.
References _combat_registry, combat_registry(), GridTypeListIterator::count(), is_initialized(), and status().
void Unit::use_skill_on_ground | ( | int16_t | skill_lv, |
int16_t | skill_id, | ||
int16_t | pos_x, | ||
int16_t | pos_y | ||
) |
void Unit::use_skill_on_ground | ( | int16_t | skill_lv, |
int16_t | skill_id, | ||
int16_t | pos_x, | ||
int16_t | pos_y, | ||
std::string | contents | ||
) |
void Unit::use_skill_on_target | ( | int16_t | skill_lv, |
int16_t | skill_id, | ||
int | target_guid | ||
) |
|
inline |
Unit Data.
References _uuid.
Referenced by Horizon::Zone::Units::Monster::on_killed(), set_uuid(), Horizon::Zone::UnitComponent::sync_data_types(), and Unit().
|
protected |
References _changed_dest_pos, _dest_pos, _jump_walk_stop, _lockon_after_walk_completed, _type, _walk_path, attack(), clear_lockon_after_walk_completed(), Horizon::Zone::Unit::s_lockon_after_walk_completed::continuous, EVP_NOTIFY_IN_SIGHT, EVP_NOTIFY_OUT_OF_SIGHT, force_movement_stop_internal(), get_nearby_unit(), get_scheduler_task_id(), get_sys_time(), HLog, lockon_after_walk_completed_target_guid(), map(), notify_nearby_players_of_existence(), on_movement_begin(), on_movement_step(), TaskContext::Repeat(), schedule_walk(), set_map_coords(), status(), stop_walking(), target_is_attackable(), UNIT_PLAYER, UNIT_SCHEDULE_WALK, Coordinates< MAX_COORDINATES >::x(), and Coordinates< MAX_COORDINATES >::y().
Referenced by schedule_walk().
|
virtual |
References _changed_dest_pos, _dest_pos, _type, HLog, is_attacking(), schedule_walk(), stop_attacking(), UNIT_PLAYER, Coordinates< MAX_COORDINATES >::x(), and Coordinates< MAX_COORDINATES >::y().
Referenced by Horizon::Zone::Units::Monster::behavior_passive(), Horizon::Zone::UnitComponent::sync_data_types(), and walk_to_unit().
|
virtual |
References walk_to_coordinates().
Referenced by attack().
|
private |
Referenced by attack().
|
private |
Referenced by is_walking(), schedule_walk(), stop_walking(), walk(), and walk_to_coordinates().
|
private |
Referenced by combat(), set_combat(), and ~Unit().
|
private |
Referenced by combat_registry(), initialize(), update(), and ~Unit().
|
private |
Referenced by has_damage_walk_delay(), and set_damage_walk_delay().
|
private |
Referenced by dest_coords(), schedule_walk(), stop_walking(), walk(), and walk_to_coordinates().
|
private |
Referenced by direction(), and set_direction().
|
private |
Referenced by grid_coords(), and set_grid_coords().
|
private |
Referenced by is_attacking(), and set_attacking().
|
private |
Referenced by finalize(), is_finalized(), and set_finalized().
|
private |
Referenced by initialize(), and is_initialized().
|
private |
Referenced by job_id(), and set_job_id().
|
private |
Referenced by force_movement_stop_internal(), and walk().
|
private |
|
private |
Referenced by map_coords(), and set_map_coords().
|
private |
Referenced by name(), and set_name().
|
private |
Referenced by posture(), and set_posture().
|
private |
Referenced by guid(), s_uuid(), and set_uuid().
|
private |
Referenced by initialize(), set_status(), and status().
|
private |
Referenced by get_status_effects().
|
private |
Referenced by schedule_walk(), type(), walk(), and walk_to_coordinates().
|
private |
Referenced by is_of_type(), and type_mask().
|
private |
Referenced by set_uuid(), and uuid().
|
private |
Referenced by get_walk_path(), schedule_walk(), and walk().
|
private |
|
private |