19 #ifndef TRINITY_GRIDNOTIFIERSIMPL_H
20 #define TRINITY_GRIDNOTIFIERSIMPL_H
36 vis_guids.erase(iter->GetSource()->GetGUID());
57 if (!itr->GetSource()->IsInPhase(_searcher))
60 if (i_check(itr->GetSource()))
62 i_object = itr->GetSource();
80 if (!itr->GetSource()->IsInPhase(_searcher))
83 if (i_check(itr->GetSource()))
85 i_object = itr->GetSource();
103 if (!itr->GetSource()->IsInPhase(_searcher))
106 if (i_check(itr->GetSource()))
108 i_object = itr->GetSource();
114 template<
class Check>
126 if (!itr->GetSource()->IsInPhase(_searcher))
129 if (i_check(itr->GetSource()))
131 i_object = itr->GetSource();
137 template<
class Check>
149 if (!itr->GetSource()->IsInPhase(_searcher))
152 if (i_check(itr->GetSource()))
154 i_object = itr->GetSource();
160 template<
class Check>
172 if (!itr->GetSource()->IsInPhase(_searcher))
175 if (i_check(itr->GetSource()))
177 i_object = itr->GetSource();
183 template<
class Check>
191 if (!itr->GetSource()->IsInPhase(_searcher))
194 if (i_check(itr->GetSource()))
195 i_object = itr->GetSource();
199 template<
class Check>
207 if (!itr->GetSource()->IsInPhase(_searcher))
210 if (i_check(itr->GetSource()))
211 i_object = itr->GetSource();
215 template<
class Check>
223 if (!itr->GetSource()->IsInPhase(_searcher))
226 if (i_check(itr->GetSource()))
227 i_object = itr->GetSource();
231 template<
class Check>
239 if (!itr->GetSource()->IsInPhase(_searcher))
242 if (i_check(itr->GetSource()))
243 i_object = itr->GetSource();
247 template<
class Check>
255 if (!itr->GetSource()->IsInPhase(_searcher))
258 if (i_check(itr->GetSource()))
259 i_object = itr->GetSource();
263 template<
class Check>
271 if (!itr->GetSource()->IsInPhase(_searcher))
274 if (i_check(itr->GetSource()))
275 i_object = itr->GetSource();
279 template<
class Check>
286 if (i_check(itr->GetSource()))
287 i_objects.push_back(itr->GetSource());
290 template<
class Check>
297 if (i_check(itr->GetSource()))
298 i_objects.push_back(itr->GetSource());
301 template<
class Check>
308 if (i_check(itr->GetSource()))
309 i_objects.push_back(itr->GetSource());
312 template<
class Check>
319 if (i_check(itr->GetSource()))
320 i_objects.push_back(itr->GetSource());
323 template<
class Check>
330 if (i_check(itr->GetSource()))
331 i_objects.push_back(itr->GetSource());
334 template<
class Check>
341 if (i_check(itr->GetSource()))
342 i_objects.push_back(itr->GetSource());
347 template<
class Check>
356 if (!itr->GetSource()->IsInPhase(_searcher))
359 if (i_check(itr->GetSource()))
361 i_object = itr->GetSource();
367 template<
class Check>
372 if (!itr->GetSource()->IsInPhase(_searcher))
375 if (i_check(itr->GetSource()))
376 i_object = itr->GetSource();
380 template<
class Check>
384 if (itr->GetSource()->IsInPhase(_searcher))
385 if (i_check(itr->GetSource()))
386 i_objects.push_back(itr->GetSource());
391 template<
class Check>
400 if (!itr->GetSource()->IsInPhase(_searcher))
403 if (i_check(itr->GetSource()))
405 i_object = itr->GetSource();
411 template<
class Check>
420 if (!itr->GetSource()->IsInPhase(_searcher))
423 if (i_check(itr->GetSource()))
425 i_object = itr->GetSource();
431 template<
class Check>
436 if (!itr->GetSource()->IsInPhase(_searcher))
439 if (i_check(itr->GetSource()))
440 i_object = itr->GetSource();
444 template<
class Check>
449 if (!itr->GetSource()->IsInPhase(_searcher))
452 if (i_check(itr->GetSource()))
453 i_object = itr->GetSource();
457 template<
class Check>
461 if (itr->GetSource()->IsInPhase(_searcher))
462 if (i_check(itr->GetSource()))
463 i_objects.push_back(itr->GetSource());
466 template<
class Check>
470 if (itr->GetSource()->IsInPhase(_searcher))
471 if (i_check(itr->GetSource()))
472 i_objects.push_back(itr->GetSource());
477 template<
class Check>
486 if (!itr->GetSource()->IsInPhase(_searcher))
489 if (i_check(itr->GetSource()))
491 i_object = itr->GetSource();
497 template<
class Check>
502 if (!itr->GetSource()->IsInPhase(_searcher))
505 if (i_check(itr->GetSource()))
506 i_object = itr->GetSource();
510 template<
class Check>
514 if (itr->GetSource()->IsInPhase(_searcher))
515 if (i_check(itr->GetSource()))
516 i_objects.push_back(itr->GetSource());
519 template<
class Check>
523 if (itr->GetSource()->IsInPhase(_searcher))
524 if (i_check(itr->GetSource()))
525 i_objects.push_back(itr->GetSource());
528 template<
class Check>
537 if (!itr->GetSource()->IsInPhase(_searcher))
540 if (i_check(itr->GetSource()))
542 i_object = itr->GetSource();
548 template<
class Check>
553 if (!itr->GetSource()->IsInPhase(_searcher))
556 if (i_check(itr->GetSource()))
557 i_object = itr->GetSource();
561 template<
class Builder>
564 LocaleConstant loc_idx = p->GetSession()->GetSessionDbLocaleIndex();
565 uint32 cache_idx = loc_idx+1;
569 if (i_data_cache.size() < cache_idx + 1 || !i_data_cache[cache_idx])
571 if (i_data_cache.size() < cache_idx + 1)
572 i_data_cache.resize(cache_idx + 1);
574 data = i_builder(loc_idx);
580 i_data_cache[cache_idx] = data;
583 data = i_data_cache[cache_idx];
588 template<
class Builder>
591 LocaleConstant loc_idx = p->GetSession()->GetSessionDbLocaleIndex();
592 uint32 cache_idx = loc_idx+1;
596 if (i_data_cache.size() < cache_idx+1 || i_data_cache[cache_idx].empty())
598 if (i_data_cache.size() < cache_idx+1)
599 i_data_cache.resize(cache_idx+1);
601 data_list = &i_data_cache[cache_idx];
603 i_builder(*data_list, loc_idx);
606 data_list = &i_data_cache[cache_idx];
608 for (
size_t i = 0; i < data_list->size(); ++i)
609 p->SendDirectMessage((*data_list)[i]->GetRawPacket());
612 #endif // TRINITY_GRIDNOTIFIERSIMPL_H
Definition: GridDefines.h:78
UpdateData i_data
Definition: GridNotifiers.h:46
void Visit(PlayerMapType &m)
Definition: GridNotifiersImpl.h:549
void Visit(CreatureMapType &m)
Definition: GridNotifiersImpl.h:498
Definition: GridDefines.h:77
void Visit(CreatureMapType &m)
Definition: GridNotifiersImpl.h:511
void Visit(PlayerMapType &m)
Definition: GridNotifiersImpl.h:458
std::vector< WorldPackets::Packet * > WorldPacketList
Definition: GridNotifiers.h:1422
void Visit(GameObjectMapType &m)
Definition: GridNotifiersImpl.h:348
void Visit(CreatureMapType &m)
Definition: GridNotifiersImpl.h:432
void Visit(GameObjectMapType &m)
Definition: GridNotifiersImpl.h:46
Definition: GridDefines.h:76
void Visit(GameObjectMapType &m)
Definition: GridNotifiersImpl.h:184
void Visit(GridRefManager< T > &m)
Definition: GridNotifiersImpl.h:32
LocaleConstant
Definition: Common.h:115
void operator()(Player *p)
Definition: GridNotifiersImpl.h:562
void Visit(PlayerMapType &m)
Definition: GridNotifiersImpl.h:529
WorldPacket const * GetRawPacket() const
Definition: Packet.h:38
Definition: GridDefines.h:75
uint32_t uint32
Definition: Define.h:150
Definition: LinkedList.h:141
Player & i_player
Definition: GridNotifiers.h:45
void operator()(Player *p)
Definition: GridNotifiersImpl.h:589
iterator begin()
Definition: GridRefManager.h:36
size_t GetSize() const
Definition: Packet.h:39
void Visit(PlayerMapType &m)
Definition: GridNotifiersImpl.h:520
void Visit(GameObjectMapType &m)
Definition: GridNotifiersImpl.h:381
virtual WorldPacket const * Write()=0
void Visit(CreatureMapType &m)
Definition: GridNotifiersImpl.h:392
#define ASSERT
Definition: Errors.h:55
std::set< Unit * > i_visibleNow
Definition: GridNotifiers.h:47
GuidUnorderedSet vis_guids
Definition: GridNotifiers.h:48
Definition: GridDefines.h:74
iterator end()
Definition: GridRefManager.h:37
void Visit(PlayerMapType &m)
Definition: GridNotifiersImpl.h:280
void Visit(CreatureMapType &m)
Definition: GridNotifiersImpl.h:478
Definition: GridDefines.h:73
void Visit(GameObjectMapType &m)
Definition: GridNotifiersImpl.h:368