121{
123
125 return;
126
127 std::shared_ptr<Horizon::Zone::Unit> src_unit =
_unit.lock();
128
130 if (iter->source() == nullptr)
131 continue;
132
133 std::shared_ptr<Player> tpl = iter->source()->template downcast<Player>();
134
135 if (src_unit == nullptr || src_unit->guid() == tpl->guid())
136 continue;
137
138 if (tpl->get_session() == nullptr || tpl->get_session()->clif() == nullptr)
139 continue;
140
141 bool is_in_range = tpl->is_in_range_of(src_unit);
142
144 if (tpl->unit_is_in_viewport(src_unit))
145 continue;
146
147
148 tpl->add_unit_to_viewport(src_unit);
150 if (!tpl->unit_is_in_viewport(src_unit))
151 continue;
152
154 }
156 if (!tpl->unit_is_in_viewport(src_unit))
157 continue;
158
159 tpl->remove_unit_from_viewport(src_unit,
_notif_type);
160 }
161 }
162}
@ EVP_NOTIFY_IN_SIGHT
Definition: UnitDefinitions.hpp:837
@ EVP_NOTIFY_OUT_OF_SIGHT
Definition: UnitDefinitions.hpp:838
Forward declaration of GridRefManager, the class that manages GridReference.
Definition: GridRefManager.hpp:41
iterator begin()
Definition: GridRefManager.hpp:54
uint32_t get_size() const
returns the number of Elements in the list (not including the head and tail Elements or the first and...
Definition: Head.hpp:69
Definition: GameLogicProcess.hpp:43