当前位置: 首页>>代码示例>>C++>>正文


C++ PlayerMapType::begin方法代码示例

本文整理汇总了C++中PlayerMapType::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerMapType::begin方法的具体用法?C++ PlayerMapType::begin怎么用?C++ PlayerMapType::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PlayerMapType的用法示例。


在下文中一共展示了PlayerMapType::begin方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Visit

void CreatureRelocationNotifier::Visit(PlayerMapType &m)
{
    for (PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
    {
        Player * pl = iter->getSource();

        if (!pl->m_seer->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
            pl->UpdateVisibilityOf(&i_creature);

        CreatureUnitRelocationWorker(&i_creature, pl);
    }
}
开发者ID:ShadowCore,项目名称:ShadowCore,代码行数:12,代码来源:GridNotifiers.cpp

示例2:

void
VisibleNotifier::Visit(PlayerMapType &m)
{
    for(PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
    {
        if( iter->getSource() == &i_player )
            continue;

        iter->getSource()->UpdateVisibilityOf(&i_player);
        i_player.UpdateVisibilityOf(iter->getSource(),i_data,i_data_updates,i_visibleNow);
        i_clientGUIDs.erase(iter->getSource()->GetGUID());
    }
}
开发者ID:mangos-rollback,项目名称:rollback,代码行数:13,代码来源:GridNotifiers.cpp

示例3: BuildPacket

void
ObjectAccessor::WorldObjectChangeAccumulator::Visit(PlayerMapType &m)
{
    for(PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
    {
        BuildPacket(iter->getSource());
        if (!iter->getSource()->GetSharedVisionList().empty())
        {
            SharedVisionList::const_iterator it = iter->getSource()->GetSharedVisionList().begin();
            for ( ; it != iter->getSource()->GetSharedVisionList().end(); ++it)
                BuildPacket(*it);
        }
    }
}
开发者ID:MilchBuby,项目名称:riboncore,代码行数:14,代码来源:ObjectAccessor.cpp

示例4: Visit

void PlayerRelocationNotifier::Visit(PlayerMapType &m) {
    for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter) {
        Player* plr = iter->getSource();

        vis_guids.erase(plr->GetGUID());

        i_player.UpdateVisibilityOf(plr, i_data, i_visibleNow);

        if (plr->m_seer->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
            continue;

        plr->UpdateVisibilityOf(&i_player);
    }
}
开发者ID:BlueSellafield,项目名称:ArkCORE,代码行数:14,代码来源:GridNotifiers.cpp

示例5:

void
MaNGOS::PlayerNotifier::Visit(PlayerMapType &m)
{
    WorldObject const* viewPoint = i_player.GetViewPoint();

    for(PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
    {
        Player* player = iter->getSource();
        if( player == &i_player )
            continue;

        player->UpdateVisibilityOf(player->GetViewPoint(),&i_player);
        i_player.UpdateVisibilityOf(viewPoint,player);
    }
}
开发者ID:Alexmangos,项目名称:mangos,代码行数:15,代码来源:GridNotifiers.cpp

示例6: Visit

void VisibleChangesNotifier::Visit(PlayerMapType &m)
{
    for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
    {
        if (iter->GetSource() == &i_object)
            continue;

        iter->GetSource()->UpdateVisibilityOf(&i_object);

        if (iter->GetSource()->HasSharedVision())
            for (SharedVisionList::const_iterator i = iter->GetSource()->GetSharedVisionList().begin(); i != iter->GetSource()->GetSharedVisionList().end(); ++i)
                if ((*i)->m_seer == iter->GetSource())
                    (*i)->UpdateVisibilityOf(&i_object);
    }
}
开发者ID:Keader,项目名称:Sunwell,代码行数:15,代码来源:GridNotifiers.cpp

示例7:

void
CreatureVisibleMovementNotifier::Visit(PlayerMapType &m)
{
    for(PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
    {
        if( i_creature.IsVisibleInGridForPlayer(iter->second) )
        {
            UpdateData update_data;
            WorldPacket packet;
            i_creature.BuildCreateUpdateBlockForPlayer(&update_data, iter->second);
            update_data.BuildPacket(&packet);
            iter->second->GetSession()->SendPacket(&packet);
        }
    }
}
开发者ID:Aion,项目名称:caldari,代码行数:15,代码来源:GridNotifiers.cpp

示例8: Visit

void DelayedUnitRelocation::Visit(PlayerMapType &m)
{
    for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
    {
        Player* player = iter->GetSource();
        WorldObject const* viewPoint = player->m_seer;

        if (!viewPoint->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
            continue;

        if (player != viewPoint && !viewPoint->IsPositionValid())
            continue;

        PlayerRelocationNotifier relocate(*player);
        Cell::VisitAllObjects(viewPoint, relocate, i_radius, false);
        relocate.SendToSelf();
    }
}
开发者ID:m-uu,项目名称:ElunaTrinityWotlk,代码行数:18,代码来源:GridNotifiers.cpp

示例9: SendPacket

void
Deliverer::Visit(PlayerMapType &m)
{
    for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
    {
        if (!i_dist || iter->getSource()->GetDistance(&i_source) <= i_dist)
        {
            // Send packet to all who are sharing the player's vision
            if (!iter->getSource()->GetSharedVisionList().empty())
            {
                SharedVisionList::const_iterator it = iter->getSource()->GetSharedVisionList().begin();
                for (; it != iter->getSource()->GetSharedVisionList().end(); ++it)
                    SendPacket(*it);
            }

            VisitObject(iter->getSource());
        }
    }
}
开发者ID:Zekom,项目名称:NeoCore,代码行数:19,代码来源:GridNotifiers.cpp

示例10: Visit

void PlayerNotifier::Visit(PlayerMapType &m)
{
    BuildForMySelf();

    for(std::map<OBJECT_HANDLE, Player *>::iterator iter=m.begin(); iter != m.end(); ++iter)
    {
        if( iter->second == &i_player )
            continue;

        if( i_player.isAlive() && iter->second->isAlive() ||
            i_player.isDead() && iter->second->isDead() )
        {
            if (iter->second->isVisibleFor(&i_player,false))
                iter->second->SendUpdateToPlayer(&i_player);
            if (i_player.isVisibleFor(iter->second,false))
                i_player.SendUpdateToPlayer(iter->second);
        }
        else
        {
            i_player.DestroyForPlayer(iter->second);
            iter->second->DestroyForPlayer(&i_player);
        }
    }
}
开发者ID:Aion,项目名称:caldari,代码行数:24,代码来源:GridNotifiers.cpp

示例11: Visit

void PlayerRelocationNotifier::Visit(PlayerMapType &m)
{
    for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
    {
        Player* player = iter->getSource();

        vis_guids.erase(player->GetGUID());

        i_player.UpdateVisibilityOf(player, i_data, i_visibleNow);

        if (i_data.IsFull())
        {
            WorldPacket packet;
            i_data.BuildPacket(&packet);
            i_player.GetSession()->SendPacket(&packet);
            i_data = UpdateData(i_player.GetMapId());
        }

        if (player->m_seer->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
            continue;

        player->UpdateVisibilityOf(&i_player);
    }
}
开发者ID:Adeer,项目名称:Patchs,代码行数:24,代码来源:GridNotifiers.cpp

示例12: Visit

void DynamicObjectUpdater::Visit(PlayerMapType &m)
{
    for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
        VisitHelper(itr->getSource());
}
开发者ID:Blumfield,项目名称:TBCPvP,代码行数:5,代码来源:GridNotifiers.cpp


注:本文中的PlayerMapType::begin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。