void PacketBroadcaster::Visit(CameraMapType& m) { for (CameraMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { if (_dist && !_source.IsWithinDist(iter->getSource()->GetBody(), _dist)) continue; BroadcastPacketTo(iter->getSource()->GetOwner()); } }
void ObjectMessageDistDeliverer::Visit(CameraMapType& m) { for (CameraMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { if (!i_dist || iter->getSource()->GetBody()->IsWithinDist(&i_object, i_dist)) { if (WorldSession* session = iter->getSource()->GetOwner()->GetSession()) session->SendPacket(i_message); } } }
void ObjectMessageDeliverer::Visit(CameraMapType& m) { for (CameraMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { if (!iter->getSource()->GetBody()->InSamePhase(i_phaseMask)) continue; if (WorldSession* session = iter->getSource()->GetOwner()->GetSession()) session->SendPacket(i_message); } }
void MessageDistDeliverer::Visit(CameraMapType& m) { for (CameraMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { Player* owner = iter->getSource()->GetOwner(); if ((i_toSelf || owner != &i_player) && (!i_ownTeamOnly || owner->GetTeam() == i_player.GetTeam()) && (!i_dist || iter->getSource()->GetBody()->IsWithinDist(&i_player, i_dist))) { if (WorldSession* session = owner->GetSession()) session->SendPacket(i_message); } } }
void VisibleChangesNotifier::Visit(CameraMapType& m) { for (CameraMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { iter->getSource()->UpdateVisibilityOf(&i_object); } }
void MessageDeliverer::Visit(CameraMapType& m) { for (CameraMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { Player* owner = iter->getSource()->GetOwner(); if (i_toSelf || owner != &i_player) { if (!i_player.InSamePhase(iter->getSource()->GetBody())) continue; if (WorldSession* session = owner->GetSession()) session->SendPacket(i_message); } } }
void MessageDelivererExcept::Visit(CameraMapType &m) { for(CameraMapType::iterator it = m.begin(); it!= m.end(); ++it) { Player* player = it->getSource()->getOwner(); if(!player->InSamePhase(i_phaseMask) || player == i_skipped_receiver) continue; if (WorldSession* session = player->GetSession()) session->SendPacket(i_message); } }
void MessageDelivererExcept::Visit(CameraMapType& m) { for (CameraMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { Player* owner = iter->getSource()->GetOwner(); if (owner == i_skipped_receiver) continue; if (WorldSession* session = owner->GetSession()) session->SendPacket(i_message); } }