本文整理汇总了C++中creaturemaptype::iterator类的典型用法代码示例。如果您正苦于以下问题:C++ iterator类的具体用法?C++ iterator怎么用?C++ iterator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了iterator类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: Visit
void MessageDistDeliverer::Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
Creature* target = iter->GetSource();
if (!target->InSamePhase(i_phaseMask))
continue;
if (target->GetExactDist2dSq(i_source) > i_distSq)
continue;
// Send packet to all who are sharing the creature's vision
if (target->HasSharedVision())
{
SharedVisionList::const_iterator i = target->GetSharedVisionList().begin();
for (; i != target->GetSharedVisionList().end(); ++i)
if ((*i)->m_seer == target)
SendPacket(*i);
}
}
}
开发者ID:Davuk,项目名称:ArkCORE-NG,代码行数:21,代码来源:GridNotifiers.cpp
示例2: Visit
void ObjectGridRespawnMover::Visit(CreatureMapType &m) {
// creature in unloading grid can have respawn point in another grid
// if it will be unloaded then it will not respawn in original grid until unload/load original grid
// move to respawn point to prevent this case. For player view in respawn grid this will be normal respawn.
for (CreatureMapType::iterator iter = m.begin(); iter != m.end();) {
Creature * c = iter->getSource();
++iter;
ASSERT(!c->isPet() && "ObjectGridRespawnMover don't must be called for pets");
Cell const& cur_cell = c->GetCurrentCell();
float resp_x, resp_y, resp_z;
c->GetRespawnCoord(resp_x, resp_y, resp_z);
CellPair resp_val = Trinity::ComputeCellPair(resp_x, resp_y);
Cell resp_cell(resp_val);
if (cur_cell.DiffGrid(resp_cell)) {
c->GetMap()->CreatureRespawnRelocation(c);
// false result ignored: will be unload with other creatures at grid
}
}
}
开发者ID:ProjectStarGate,项目名称:StarGate-Plus-EMU,代码行数:23,代码来源:ObjectGridLoader.cpp
示例3: Visit
void ObjectGridStoper::Visit(CreatureMapType &m)
{
// stop any fights at grid de-activation and remove dynobjects created at cast by creatures
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
iter->GetSource()->RemoveAllDynObjects();
if (iter->GetSource()->IsInCombat())
{
iter->GetSource()->CombatStop();
iter->GetSource()->DeleteThreatList();
if (iter->GetSource()->IsAIEnabled)
iter->GetSource()->AI()->EnterEvadeMode();
}
}
}
开发者ID:Adeer,项目名称:OregonCore,代码行数:15,代码来源:ObjectGridLoader.cpp
示例4: SendPacket
void
MessageDistDeliverer::Visit(CreatureMapType &m)
{
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
if (iter->getSource()->GetExactDistSq(i_source) > i_distSq)
continue;
// Send packet to all who are sharing the creature's vision
if (!iter->getSource()->GetSharedVisionList().empty())
{
SharedVisionList::const_iterator i = iter->getSource()->GetSharedVisionList().begin();
for (; i != iter->getSource()->GetSharedVisionList().end(); ++i)
if ((*i)->m_seer == iter->getSource())
SendPacket(*i);
}
}
}
开发者ID:Dudelzack,项目名称:blizzlikecore,代码行数:18,代码来源:GridNotifiers.cpp
示例5: Visit
void DynamicObjectUpdater::Visit(CreatureMapType& m)
{
for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
VisitHelper(itr->GetSource());
}
开发者ID:Mystiko,项目名称:OregonCore,代码行数:5,代码来源:GridNotifiers.cpp
示例6: Visit
void ObjectGridCleaner::Visit (CreatureMapType &m)
{
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
iter->getSource()->CleanupsBeforeDelete();
}
开发者ID:55887MX,项目名称:CCORE,代码行数:5,代码来源:ObjectGridLoader.cpp
注:本文中的creaturemaptype::iterator类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论