本文整理汇总了C++中PlayerMapType::end方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerMapType::end方法的具体用法?C++ PlayerMapType::end怎么用?C++ PlayerMapType::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerMapType
的用法示例。
在下文中一共展示了PlayerMapType::end方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
VisibleChangesNotifier::Visit(PlayerMapType &m)
{
for(PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
{
Player* player = iter->getSource();
if(player == &i_object)
continue;
player->UpdateVisibilityOf(player->GetViewPoint(),&i_object);
}
}
示例2: Visit
void CreatureRelocationNotifier::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
Player* player = iter->GetSource();
if (!player->m_seer->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
player->UpdateVisibilityOf(&i_creature);
CreatureUnitRelocationWorker(&i_creature, player);
}
}
示例3:
void
MaNGOS::PlayerNotifier::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());
}
}
示例4:
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());
}
}
示例5: 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);
}
}
}
示例6: 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);
}
}
示例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);
}
}
}
示例8:
void
ObjectMessageDistDeliverer::Visit(PlayerMapType &m)
{
for(PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
{
if (!i_dist || iter->getSource()->IsWithinDist(&i_object,i_dist))
{
if (!i_object.InSamePhase(iter->getSource()))
continue;
if (WorldSession* session = iter->getSource()->GetSession())
session->SendPacket(i_message);
}
}
}
示例9: Visit
void CreatureRelocationNotifier::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
Player* player = iter->GetSource();
// NOTIFY_VISIBILITY_CHANGED does not guarantee that player will do it himself (because distance is also checked), but screw it, it's not that important
if (!player->m_seer->isNeedNotify(NOTIFY_VISIBILITY_CHANGED))
player->UpdateVisibilityOf(&i_creature);
// NOTIFY_AI_RELOCATION does not guarantee that player will do it himself (because distance is also checked), but screw it, it's not that important
if (!player->m_seer->isNeedNotify(NOTIFY_AI_RELOCATION) && !i_creature.IsMoveInLineOfSightStrictlyDisabled())
CreatureUnitRelocationWorker(&i_creature, player);
}
}
示例10: 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();
}
}
示例11: 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());
}
}
}
示例12: 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);
}
}
}
示例13: 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);
}
}
示例14: Visit
void DynamicObjectUpdater::Visit(PlayerMapType &m)
{
for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
VisitHelper(itr->getSource());
}