#include <GridNotifiers.hpp>
◆ GridMonsterAIChangeChaseTarget()
187 { }
std::weak_ptr< Horizon::Zone::Units::Monster > _monster
Definition: GridNotifiers.hpp:183
◆ search()
template<class T >
void GridMonsterAIChangeChaseTarget::search |
( |
GridRefManager< T > & |
m | ) |
|
371{
373 return;
374
377 if (iter->source() == nullptr)
378 continue;
379
380 std::shared_ptr<Unit> e = iter->source()->shared_from_this();
381 std::shared_ptr<Monster> m =
_monster.lock();
382
383 if (m == nullptr || e == nullptr)
384 continue;
385
386 std::shared_ptr<AStar::CoordinateList> wp = m->path_to(e);
387
388 if (wp->size() > m->monster_config()->attack_range)
389 continue;
390
391 m->set_target(e);
392
393 break;
394 }
395}
Forward declaration of GridRefManager, the class that manages GridReference.
Definition: GridRefManager.hpp:41
iterator begin()
Definition: GridRefManager.hpp:54
Definition: NPCDefinitions.hpp:54
References _monster, and GridRefManager< OBJECT >::begin().
◆ Visit() [1/10]
◆ Visit() [2/10]
◆ Visit() [3/10]
template<class NOT_INTERESTED >
void GridMonsterAIChangeChaseTarget::Visit |
( |
GridRefManager< NOT_INTERESTED > & |
| ) |
|
|
inline |
◆ Visit() [4/10]
◆ Visit() [5/10]
◆ Visit() [6/10]
◆ Visit() [7/10]
◆ Visit() [8/10]
◆ Visit() [9/10]
◆ Visit() [10/10]
◆ _monster
The documentation for this struct was generated from the following files: