Horizon Official Technical Documentation
Horizon::Zone::Units::Monster Class Reference

#include <Monster.hpp>

+ Inheritance diagram for Horizon::Zone::Units::Monster:
+ Collaboration diagram for Horizon::Zone::Units::Monster:

Public Member Functions

 Monster (int16_t spawn_dataset_id, int8_t spawn_id, std::shared_ptr< Map > map, MapCoords mcoords, std::shared_ptr< const monster_config_data > md, std::shared_ptr< std::vector< std::shared_ptr< const monster_skill_config_data > > > mskd)
 
 ~Monster () override
 
bool initialize ()
 
virtual bool finalize () override
 
virtual void stop_movement () override
 
virtual void on_pathfinding_failure () override
 
virtual void on_movement_begin (int32_t time) override
 
virtual void on_movement_step () override
 
virtual void on_movement_end () override
 
void on_damage_received (std::shared_ptr< Unit > damage_dealer, int damage) override
 
void on_killed (std::shared_ptr< Unit > killer, bool with_drops=false, bool with_exp=false) override
 
void set_spotted (bool spotted)
 
bool was_spotted_once ()
 
std::shared_ptr< const monster_config_datamonster_config ()
 
void set_monster_config (std::shared_ptr< const monster_config_data > md)
 
void on_status_effect_start (std::shared_ptr< status_change_entry > sce) override
 Status Effect. More...
 
void on_status_effect_end (std::shared_ptr< status_change_entry > sce) override
 
void on_status_effect_change (std::shared_ptr< status_change_entry > sce) override
 
void behavior_passive ()
 
void behavior_active (std::shared_ptr< Player > pl)
 
void set_next_walk_time (int walk_time)
 
int next_walk_time ()
 
void set_target (std::shared_ptr< Unit > &target)
 
std::shared_ptr< Unittarget ()
 
void unlock_target ()
 
- Public Member Functions inherited from Horizon::Zone::Units::Mob
 Mob (uint64_t uuid, unit_type type, unit_type_mask type_mask, std::shared_ptr< Map > map, MapCoords mcoords)
 
 ~Mob () override
 
bool initialize (std::shared_ptr< const monster_config_data > md)
 
virtual bool finalize () override
 
virtual void on_damage_received (std::shared_ptr< Unit > damage_dealer, int damage) override
 
virtual void on_killed (std::shared_ptr< Unit > killer, bool with_drops=false, bool with_exp=false) override
 
- Public Member Functions inherited from Horizon::Zone::Unit
 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::Statusstatus ()
 
void set_status (std::shared_ptr< Horizon::Zone::Traits::Status > st)
 
void force_movement_stop_internal (bool stop=false)
 
std::shared_ptr< Mapmap ()
 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< Unitget_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::CoordinateListpath_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< Combatcombat ()
 Combat. More...
 
void set_combat (std::shared_ptr< Combat > combat)
 
void update (uint64_t tick)
 Extremely time-sensitive functions. More...
 
std::shared_ptr< CombatRegistrycombat_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 ()
 
- Public Member Functions inherited from Horizon::Zone::GridObject< Monster >
virtual ~GridObject ()
 
bool has_valid_grid_reference () const
 
void add_grid_reference (GridRefManager< Monster > &m)
 
void remove_grid_reference ()
 
GridReference< Monster > & get_reference ()
 

Private Attributes

bool _was_spotted_once {false}
 
int _next_walk_time {0}
 
int _last_spotted_time {0}
 
int _last_think_time {0}
 
std::weak_ptr< const monster_config_data_wmd_data
 
std::weak_ptr< std::vector< std::shared_ptr< const monster_skill_config_data > > > _wms_data
 
std::shared_ptr< Unit_target {nullptr}
 

Additional Inherited Members

- Protected Member Functions inherited from Horizon::Zone::Unit
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
 

Constructor & Destructor Documentation

◆ Monster()

Monster::Monster ( int16_t  spawn_dataset_id,
int8_t  spawn_id,
std::shared_ptr< Map map,
MapCoords  mcoords,
std::shared_ptr< const monster_config_data md,
std::shared_ptr< std::vector< std::shared_ptr< const monster_skill_config_data > > >  mskd 
)
explicit
48: Mob(sZone->to_uuid((uint8_t) UNIT_MONSTER, ++_last_np_unit_guid, spawn_dataset_id, spawn_id), UNIT_MONSTER, UNIT_MASK_MONSTER, map, mcoords), _wmd_data(md), _wms_data(mskd)
49{
50 set_name(md->name);
51 set_job_id(md->monster_id);
53}
@ UNIT_MONSTER
Definition: UnitDefinitions.hpp:50
@ UNIT_MASK_MONSTER
Definition: UnitDefinitions.hpp:65
@ DIR_SOUTH
Definition: UnitDefinitions.hpp:80
static std::atomic< int32_t > _last_np_unit_guid(NPC_START_GUID)
#define sZone
Definition: Zone.hpp:247
std::shared_ptr< Map > map()
Map & Map Container.
Definition: Unit.hpp:165
void set_job_id(uint16_t job_id)
Definition: Unit.hpp:147
void set_direction(directions dir)
Definition: Unit.hpp:156
void set_name(const std::string &name)
Definition: Unit.hpp:153
Mob(uint64_t uuid, unit_type type, unit_type_mask type_mask, std::shared_ptr< Map > map, MapCoords mcoords)
Definition: Mob.cpp:40
std::weak_ptr< const monster_config_data > _wmd_data
Definition: Monster.hpp:92
std::weak_ptr< std::vector< std::shared_ptr< const monster_skill_config_data > > > _wms_data
Definition: Monster.hpp:93

References DIR_SOUTH, Horizon::Zone::Unit::set_direction(), Horizon::Zone::Unit::set_job_id(), and Horizon::Zone::Unit::set_name().

+ Here is the call graph for this function:

◆ ~Monster()

Monster::~Monster ( )
override
56{
57}

Member Function Documentation

◆ behavior_active()

void Monster::behavior_active ( std::shared_ptr< Player pl)
117{
118 set_spotted(true);
119
120 int can_move = monster_config()->mode & MONSTER_MODE_MASK_CANMOVE;
121
123 GridMonsterAIActiveSearchTarget target_search(shared_from_this()->downcast<Monster>());
125
126 map()->visit_in_range(map_coords(), ai_executor_caller);
127 } else if (monster_config()->mode & MONSTER_MODE_MASK_CHANGECHASE) {
128 GridMonsterAIChangeChaseTarget target_search(shared_from_this()->downcast<Monster>());
130
131 map()->visit_in_range(map_coords(), ai_executor_caller);
132 }
133
134 // BL_ITEM
135
136 // Attempt to attack
137 if (_target != nullptr) {
138 HLog(debug) << "Monster " << name() << " is attempting to attack target " << _target->name() << " (guid: ." << _target->guid() << ", distance: " << distance_from(_target) << ", attack_range: " << monster_config()->attack_range << ")";
140 }
141}
#define HLog(type)
Definition: Logger.hpp:122
@ MONSTER_MODE_MASK_CHANGECHASE
Definition: MonsterDefinitions.hpp:101
@ MONSTER_MODE_MASK_AGGRESSIVE
Definition: MonsterDefinitions.hpp:93
@ MONSTER_MODE_MASK_CANMOVE
Definition: MonsterDefinitions.hpp:91
Definition: GridReferenceContainerVisitor.hpp:70
virtual bool attack(std::shared_ptr< Unit > target, bool continuous=false)
Definition: Unit.cpp:514
const std::string & name() const
Definition: Unit.hpp:152
MapCoords const & map_coords() const
Grid applications.
Definition: Unit.hpp:186
int distance_from(std::shared_ptr< Unit > e)
Definition: Unit.hpp:228
void set_spotted(bool spotted)
Definition: Monster.hpp:66
std::shared_ptr< Unit > _target
Definition: Monster.hpp:95
std::shared_ptr< const monster_config_data > monster_config()
Definition: Monster.hpp:69
Definition: GridNotifiers.hpp:162
Definition: GridNotifiers.hpp:182

References _target, Horizon::Zone::Unit::attack(), Horizon::Zone::Unit::distance_from(), HLog, Horizon::Zone::Unit::map(), Horizon::Zone::Unit::map_coords(), monster_config(), MONSTER_MODE_MASK_AGGRESSIVE, MONSTER_MODE_MASK_CANMOVE, MONSTER_MODE_MASK_CHANGECHASE, Horizon::Zone::Unit::name(), and set_spotted().

+ Here is the call graph for this function:

◆ behavior_passive()

void Monster::behavior_passive ( )
93{
95 && (next_walk_time() - std::time(nullptr) < 0)
96 && !is_walking()
97 && !is_attacking()) {
98 try {
99 MapCoords move_c = map()->get_random_coordinates_in_walkable_range(map_coords().x(), map_coords().y(), 5, 7);
100 std::chrono::steady_clock::time_point start = std::chrono::steady_clock::now();
101 if (walk_to_coordinates(move_c.x(), move_c.y()) == false) {
102 //HLog(error) << "Monster (" << guid() << ") " << name() << " could not move to coordinates.";
103 return;
104 }
105 std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();
106 std::chrono::microseconds duration = std::chrono::duration_cast<std::chrono::microseconds>(end - start);
107 //HLog(debug) << "Monster::behavior_passive: behavior invocation time " << duration.count() << "us";
108 //HLog(debug) << "Monster::behavior_passive: Monster (" << guid() << ") " << name() << " is walking to (" << move_c.x() << ", " << move_c.y() << ").";
109 set_next_walk_time(std::time(nullptr) + std::rand() % (MIN_RANDOM_TRAVEL_TIME / 1000) + 1);
110 } catch (sol::error &e) {
111 HLog(error) << "Monster::behavior_passive: " << e.what();
112 }
113 }
114}
#define MIN_RANDOM_TRAVEL_TIME
Definition: Unit.hpp:46
int16_t y() const
Definition: Coordinates.hpp:120
int16_t x() const
Definition: Coordinates.hpp:119
bool is_walking() const
Definition: Unit.hpp:121
virtual bool walk_to_coordinates(int16_t x, int16_t y)
Definition: Unit.cpp:269
bool is_attacking()
Definition: Unit.hpp:235
void set_next_walk_time(int walk_time)
Definition: Monster.hpp:82
int next_walk_time()
Definition: Monster.hpp:83

References HLog, Horizon::Zone::Unit::is_attacking(), Horizon::Zone::Unit::is_walking(), Horizon::Zone::Unit::map(), Horizon::Zone::Unit::map_coords(), MIN_RANDOM_TRAVEL_TIME, monster_config(), MONSTER_MODE_MASK_CANMOVE, next_walk_time(), set_next_walk_time(), Horizon::Zone::Unit::walk_to_coordinates(), Coordinates< MAX_COORDINATES >::x(), and Coordinates< MAX_COORDINATES >::y().

Referenced by initialize().

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

◆ finalize()

bool Monster::finalize ( )
overridevirtual

Reimplemented from Horizon::Zone::Units::Mob.

81{
82 if (!Mob::finalize())
83 return false;
84
87
88 return true;
89}
bool has_valid_grid_reference() const
Definition: GridObject.hpp:46
void remove_grid_reference()
Definition: GridObject.hpp:48
virtual bool finalize() override
Definition: Mob.cpp:63

References Horizon::Zone::Units::Mob::finalize(), Horizon::Zone::GridObject< Monster >::has_valid_grid_reference(), and Horizon::Zone::GridObject< Monster >::remove_grid_reference().

+ Here is the call graph for this function:

◆ initialize()

bool Monster::initialize ( )
60{
61 std::shared_ptr<const monster_config_data> md = _wmd_data.lock();
62
63 if (Mob::initialize(md) == false)
64 return false;
65
66 map()->ensure_grid_for_unit(this, map_coords());
67
68 map()->container()->getScheduler().Schedule(
69 Seconds(0),
71 [this] (TaskContext context)
72 {
75 });
76
77 return true;
78}
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition: TaskScheduler.hpp:34
std::chrono::milliseconds Milliseconds
Definition: TaskScheduler.hpp:31
#define MOB_MIN_THINK_TIME_LAZY
Definition: Unit.hpp:49
@ UNIT_SCHEDULE_AI_THINK
Definition: Unit.hpp:55
bool initialize()
Definition: Unit.cpp:72
uint64_t get_scheduler_task_id(unit_task_schedule_group group)
Definition: Unit.hpp:204
void behavior_passive()
Definition: Monster.cpp:92
Definition: TaskScheduler.hpp:487
TaskContext & Repeat(std::chrono::duration< _Rep, _Period > const &duration)
Repeats the event and sets a new duration. std::chrono::seconds(5) for example. This will consume the...
Definition: TaskScheduler.hpp:560

References _wmd_data, behavior_passive(), Horizon::Zone::Unit::get_scheduler_task_id(), Horizon::Zone::Unit::initialize(), Horizon::Zone::Unit::map(), Horizon::Zone::Unit::map_coords(), MOB_MIN_THINK_TIME_LAZY, TaskContext::Repeat(), and UNIT_SCHEDULE_AI_THINK.

+ Here is the call graph for this function:

◆ monster_config()

std::shared_ptr< const monster_config_data > Horizon::Zone::Units::Monster::monster_config ( )
inline
69{ return _wmd_data.lock(); }

References _wmd_data.

Referenced by behavior_active(), and behavior_passive().

+ Here is the caller graph for this function:

◆ next_walk_time()

int Horizon::Zone::Units::Monster::next_walk_time ( )
inline
83{ return _next_walk_time; }
int _next_walk_time
Definition: Monster.hpp:91

References _next_walk_time.

Referenced by behavior_passive().

+ Here is the caller graph for this function:

◆ on_damage_received()

void Monster::on_damage_received ( std::shared_ptr< Unit damage_dealer,
int  damage 
)
overridevirtual

Reimplemented from Horizon::Zone::Units::Mob.

182{
183 Mob::on_damage_received(damage_dealer, damage);
184}
virtual void on_damage_received(std::shared_ptr< Unit > damage_dealer, int damage) override
Definition: Mob.cpp:71

References Horizon::Zone::Units::Mob::on_damage_received().

+ Here is the call graph for this function:

◆ on_killed()

void Monster::on_killed ( std::shared_ptr< Unit killer,
bool  with_drops = false,
bool  with_exp = false 
)
overridevirtual

Reimplemented from Horizon::Zone::Units::Mob.

187{
188 Mob::on_killed(killer, with_drops, with_exp);
189
190 std::shared_ptr<const monster_config_data> md = _wmd_data.lock();
191
192 if (md == nullptr)
193 return;
194
195 switch (killer->type())
196 {
197 case UNIT_PLAYER:
198 {
199 std::shared_ptr<Player> player = killer->downcast<Player>();
200
201 try {
202 std::string script_root_path = sZone->config().get_script_root_path().string();
203 sol::load_result fx = player->lua_state()->load_file(script_root_path + "internal/on_monster_killed.lua");
204 sol::protected_function_result result = fx(player, shared_from_this()->downcast<Monster>(), with_drops, with_exp);
205 if (!result.valid()) {
206 sol::error err = result;
207 HLog(error) << "Monster::on_killed: " << err.what();
208 }
209 }
210 catch (sol::error& e) {
211 HLog(error) << "Monster::on_killed: " << e.what();
212 }
213 }
214 break;
215 default:
216 HLog(warning) << "Monster::on_killed: Unknown unit type killed monster " << uuid() << " at " << map()->get_name() << " (" << map_coords().x() << ", " << map_coords().y() << ").";
217 break;
218 }
219
220 map()->container()->get_resource_manager().remove<RESOURCE_PRIORITY_TERTIARY>(uuid());
221 return;
222}
@ RESOURCE_PRIORITY_TERTIARY
Definition: Server.hpp:81
@ UNIT_PLAYER
Definition: UnitDefinitions.hpp:45
uint64_t uuid() const
Unit Data.
Definition: Unit.hpp:140
virtual void on_killed(std::shared_ptr< Unit > killer, bool with_drops=false, bool with_exp=false) override
Definition: Mob.cpp:76
Definition: Player.hpp:62

References _wmd_data, HLog, Horizon::Zone::Unit::map(), Horizon::Zone::Unit::map_coords(), Horizon::Zone::Units::Mob::on_killed(), RESOURCE_PRIORITY_TERTIARY, sZone, UNIT_PLAYER, Horizon::Zone::Unit::uuid(), Coordinates< MAX_COORDINATES >::x(), and Coordinates< MAX_COORDINATES >::y().

+ Here is the call graph for this function:

◆ on_movement_begin()

void Monster::on_movement_begin ( int32_t  time)
overridevirtual

Implements Horizon::Zone::Unit.

153{
154
155}

◆ on_movement_end()

void Monster::on_movement_end ( )
overridevirtual

Implements Horizon::Zone::Unit.

163{
164}

◆ on_movement_step()

void Monster::on_movement_step ( )
overridevirtual

Implements Horizon::Zone::Unit.

158{
159 map()->ensure_grid_for_unit(this, map_coords());
160}

References Horizon::Zone::Unit::map(), and Horizon::Zone::Unit::map_coords().

+ Here is the call graph for this function:

◆ on_pathfinding_failure()

void Monster::on_pathfinding_failure ( )
overridevirtual

Implements Horizon::Zone::Unit.

148{
149 //HLog(debug) << "Monster " << name() << " has failed to find path from (" << map_coords().x() << "," << map_coords().y() << ") to (" << dest_coords().x() << ", " << dest_coords().y() << ").";
150}

◆ on_status_effect_change()

void Monster::on_status_effect_change ( std::shared_ptr< status_change_entry sce)
overridevirtual

Implements Horizon::Zone::Unit.

177{
178
179}

◆ on_status_effect_end()

void Monster::on_status_effect_end ( std::shared_ptr< status_change_entry sce)
overridevirtual

Implements Horizon::Zone::Unit.

172{
173
174}

◆ on_status_effect_start()

void Monster::on_status_effect_start ( std::shared_ptr< status_change_entry sce)
overridevirtual

Status Effect.

Implements Horizon::Zone::Unit.

167{
168
169}

◆ set_monster_config()

void Horizon::Zone::Units::Monster::set_monster_config ( std::shared_ptr< const monster_config_data md)
inline
70{ _wmd_data = md; }

References _wmd_data.

◆ set_next_walk_time()

void Horizon::Zone::Units::Monster::set_next_walk_time ( int  walk_time)
inline
82{ _next_walk_time = walk_time; }

References _next_walk_time.

Referenced by behavior_passive().

+ Here is the caller graph for this function:

◆ set_spotted()

void Horizon::Zone::Units::Monster::set_spotted ( bool  spotted)
inline
66{ _was_spotted_once = spotted; }
bool _was_spotted_once
Definition: Monster.hpp:90

References _was_spotted_once.

Referenced by behavior_active().

+ Here is the caller graph for this function:

◆ set_target()

void Horizon::Zone::Units::Monster::set_target ( std::shared_ptr< Unit > &  target)
inline
85{ _target = target; }
std::shared_ptr< Unit > target()
Definition: Monster.hpp:86

References _target, and target().

+ Here is the call graph for this function:

◆ stop_movement()

void Monster::stop_movement ( )
overridevirtual

Implements Horizon::Zone::Unit.

144{
145}

◆ target()

std::shared_ptr< Unit > Horizon::Zone::Units::Monster::target ( )
inline
86{ return _target; }

References _target.

Referenced by set_target().

+ Here is the caller graph for this function:

◆ unlock_target()

void Horizon::Zone::Units::Monster::unlock_target ( )
inline
87{ _target = nullptr; }

References _target.

◆ was_spotted_once()

bool Horizon::Zone::Units::Monster::was_spotted_once ( )
inline
67{ return _was_spotted_once; }

References _was_spotted_once.

Member Data Documentation

◆ _last_spotted_time

int Horizon::Zone::Units::Monster::_last_spotted_time {0}
private

◆ _last_think_time

int Horizon::Zone::Units::Monster::_last_think_time {0}
private

◆ _next_walk_time

int Horizon::Zone::Units::Monster::_next_walk_time {0}
private

◆ _target

std::shared_ptr<Unit> Horizon::Zone::Units::Monster::_target {nullptr}
private

◆ _was_spotted_once

bool Horizon::Zone::Units::Monster::_was_spotted_once {false}
private

Referenced by set_spotted(), and was_spotted_once().

◆ _wmd_data

std::weak_ptr<const monster_config_data> Horizon::Zone::Units::Monster::_wmd_data
private

◆ _wms_data

std::weak_ptr<std::vector<std::shared_ptr<const monster_skill_config_data> > > Horizon::Zone::Units::Monster::_wms_data
private

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