本文整理汇总了C++中dynamicobjectmaptype::iterator::GetSource方法的典型用法代码示例。如果您正苦于以下问题:C++ iterator::GetSource方法的具体用法?C++ iterator::GetSource怎么用?C++ iterator::GetSource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dynamicobjectmaptype::iterator
的用法示例。
在下文中一共展示了iterator::GetSource方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Visit
void VisibleChangesNotifier::Visit(DynamicObjectMapType &m)
{
for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
if (Unit* caster = iter->GetSource()->GetCaster())
if (Player* player = caster->ToPlayer())
if (player->m_seer == iter->GetSource())
player->UpdateVisibilityOf(&i_object);
}
示例2: Visit
void VisibleChangesNotifier::Visit(DynamicObjectMapType &m)
{
for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
if (IS_PLAYER_GUID(iter->GetSource()->GetCasterGUID()))
if (Player* caster = (Player*)iter->GetSource()->GetCaster())
if (caster->m_seer == iter->GetSource())
caster->UpdateVisibilityOf(&i_object);
}
示例3:
void
VisibleChangesNotifier::Visit(DynamicObjectMapType& m)
{
for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
if (iter->GetSource()->GetTypeId() == TYPEID_PLAYER) // better check to see if the target it a player.
if (Player* caster = (Player*)iter->GetSource()->GetCaster())
if (caster->m_seer == iter->GetSource())
caster->UpdateVisibilityOf(&i_object);
}
示例4: SendPacket
void
MessageDistDeliverer::Visit(DynamicObjectMapType& m)
{
for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
if (iter->GetSource()->GetExactDist2dSq(i_source) > i_distSq)
continue;
if (iter->GetSource()->GetTypeId() == TYPEID_PLAYER)
{
// Send packet back to the caster if the caster has vision of dynamic object
Player* caster = iter->GetSource()->GetCaster()->ToPlayer();
if (caster && caster->m_seer == iter->GetSource())
SendPacket(caster);
}
}
}
示例5: Visit
void MessageDistDelivererToHostile::Visit(DynamicObjectMapType &m)
{
for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
DynamicObject* target = iter->GetSource();
if (!IS_PLAYER_GUID(target->GetCasterGUID()) || !target->InSamePhase(i_phaseMask))
continue;
if (target->GetExactDist2dSq(i_source) > i_distSq)
continue;
// Send packet back to the caster if the caster has vision of dynamic object
Player* caster = (Player*)target->GetCaster();
if (caster && caster->m_seer == target)
SendPacket(caster);
}
}