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


C++ CreatureGroupInfoType::find方法代码示例

本文整理汇总了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);
}
开发者ID:Bootz,项目名称:T-Core,代码行数:10,代码来源:CreatureGroups.cpp

示例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);
}
开发者ID:sk3tche,项目名称:TrinityCore,代码行数:14,代码来源:CreatureGroups.cpp

示例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);
}
开发者ID:Blumfield,项目名称:ptc2,代码行数:16,代码来源:CreatureGroups.cpp

示例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;
}
开发者ID:Blumfield,项目名称:ptc2,代码行数:41,代码来源:CreatureGroups.cpp


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