Пример #1
0
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());
    }
}
Пример #2
0
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);
        }
    }
}
Пример #3
0
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);
    }
}
Пример #4
0
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);
        }
    }
}
Пример #5
0
void VisibleChangesNotifier::Visit(CameraMapType& m)
{
    for (CameraMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
    {
        iter->getSource()->UpdateVisibilityOf(&i_object);
    }
}
Пример #6
0
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);
        }
    }
}
Пример #7
0
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);
    }
}
Пример #8
0
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);
    }
}