本文整理汇总了C++中CreatureGroupInfoType::find方法的典型用法代码示例。如果您正苦于以下问题:C++ CreatureGroupInfoType::find方法的具体用法?C++ CreatureGroupInfoType::find怎么用?C++ CreatureGroupInfoType::find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CreatureGroupInfoType
的用法示例。
在下文中一共展示了CreatureGroupInfoType::find方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddMember
void CreatureGroup::AddMember(Creature* member)
{
if (!member)
return;
sLog->outDebug(LOG_FILTER_UNITS, "CreatureGroup::AddMember: Adding unit GUID: %u to group.", member->GetGUIDLow());
m_members[member] = CreatureGroupMap.find(m_groupID)->second;
member->SetGroup(this);
}
示例2: AddMember
void CreatureGroup::AddMember(Creature* member)
{
sLog->outDebug(LOG_FILTER_UNITS, "CreatureGroup::AddMember: Adding unit GUID: %u.", member->GetGUIDLow());
//Check if it is a leader
if (member->GetDBTableGUIDLow() == m_groupID)
{
sLog->outDebug(LOG_FILTER_UNITS, "Unit GUID: %u is formation leader. Adding group.", member->GetGUIDLow());
m_leader = member;
}
m_members[member] = CreatureGroupMap.find(member->GetDBTableGUIDLow())->second;
member->SetFormation(this);
}
示例3: AddMember
void CreatureGroup::AddMember(Creature *member)
{
sLog.outDebug("CreatureGroup::AddMember: Adding unit GUIDLow: %u.", member->GetGUIDLow());
//Check if it is a leader
if (member->GetDBTableGUIDLow() == m_groupID)
{
sLog.outDebug("Unit GUID: %u is formation leader. Adding group.", member->GetGUIDLow());
m_leader = member;
}
CreatureGroupInfoType::iterator iter = CreatureGroupMap.find(member->GetDBTableGUIDLow());
m_members[member->GetGUID()] = iter->second;
member->SetFormation(this);
}
示例4: MemberAttackStart
void CreatureGroup::MemberAttackStart(Creature *member, Unit *target)
{
if (!member || !target)
return;
const CreatureGroupInfoType::iterator fInfo = CreatureGroupMap.find(member->GetDBTableGUIDLow());
if (fInfo == CreatureGroupMap.end() || !fInfo->second)
return;
uint8 groupAI = fInfo->second->groupAI;
if (!groupAI)
return;
if (groupAI == 1 && member != m_leader)
return;
for (CreatureGroupMemberType::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
sLog.outDebug("GROUP ATTACK: group instance id %u calls member instid %u", m_leader ? m_leader->GetInstanceId() : 0, member->GetInstanceId());
//sLog.outDebug("AI:%u:Group member found: %u, attacked by %s.", groupAI, itr->second->GetGUIDLow(), member->getVictim()->GetName());
//Skip one check
if (itr->first == member->GetGUID())
continue;
if (Creature *mem = member->GetMap()->GetCreature(itr->first))
{
if (!mem->isAlive())
continue;
if (mem->getVictim())
continue;
if (mem->canAttack(target))
mem->AI()->AttackStart(target);
}
}
m_Respawned = false;
m_Evaded = false;
}