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


C++ LfgLockPartyMap::begin方法代码示例

本文整理汇总了C++中LfgLockPartyMap::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ LfgLockPartyMap::begin方法的具体用法?C++ LfgLockPartyMap::begin怎么用?C++ LfgLockPartyMap::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LfgLockPartyMap的用法示例。


在下文中一共展示了LfgLockPartyMap::begin方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: HandleLfgPartyLockInfoRequestOpcode

void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket&  /*recv_data*/)
{
    uint64 guid = GetPlayer()->GetGUID();
    sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFD_PARTY_LOCK_INFO_REQUEST [" UI64FMTD "]", guid);

    Group* group = GetPlayer()->GetGroup();
    if (!group)
        return;

    // Get the locked dungeons of the other party members
    LfgLockPartyMap lockMap;
    for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
    {
        Player* plrg = itr->getSource();
        if (!plrg)
            continue;

        uint64 pguid = plrg->GetGUID();
        if (pguid == guid)
            continue;

        lockMap[pguid] = sLFGMgr->GetLockedDungeons(pguid);
    }

    uint32 size = 0;
    for (LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
        size += 8 + 4 + uint32(it->second.size()) * (4 + 4);

    sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_PARTY_INFO [" UI64FMTD "]", guid);
    WorldPacket data(SMSG_LFG_PARTY_INFO, 1 + size);
    BuildPartyLockDungeonBlock(data, lockMap);
    SendPacket(&data);
}
开发者ID:Gosa1979,项目名称:ArkCORE2,代码行数:33,代码来源:LFGHandler.cpp

示例2: HandleLfgPartyLockInfoRequestOpcode

void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket&  /*recvData*/)
{
    ObjectGuid guid = _player->GetObjectGuid();
    sLog.outDebug("CMSG_LFG_PARTY_LOCK_INFO_REQUEST %s", guid.GetString().c_str());

    Group* grp = _player->GetGroup();
    if (!grp)
        return;

    // Get the locked dungeons of the other party members
    LfgLockPartyMap lockMap;
    for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
    {
        Player* plrg = itr->getSource();
        if (!plrg)
            continue;

        ObjectGuid pguid = plrg->GetObjectGuid();
        if (pguid == guid)
            continue;

        lockMap[pguid] = sLFGMgr.GetLockedDungeons(pguid);
    }

    uint32 size = 0;
    for (LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
        size += 8 + 4 + uint32(it->second.size()) * (4 + 4 + 4 + 4);

    sLog.outDebug("SMSG_LFG_PARTY_INFO %s", _player->GetGuidStr().c_str());
    WorldPacket data(SMSG_LFG_PARTY_INFO, 1 + size);
    BuildPartyLockDungeonBlock(data, lockMap);
    SendPacket(&data);
}
开发者ID:Calixa,项目名称:murlocs_434,代码行数:33,代码来源:LFGHandler.cpp

示例3: BuildPartyLockDungeonBlock

void BuildPartyLockDungeonBlock(WorldPacket& data, const LfgLockPartyMap& lockMap)
{
    data << uint8(lockMap.size());
    for (LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
    {
        data << uint64(it->first);                         // Player guid
        BuildPlayerLockDungeonBlock(data, it->second);
    }
}
开发者ID:Gosa1979,项目名称:ArkCORE2,代码行数:9,代码来源:LFGHandler.cpp

示例4: BuildPartyLockDungeonBlock

void BuildPartyLockDungeonBlock(WorldPacket& data, const LfgLockPartyMap& lockMap)
{
    Log.Debug("LfgHandler", "BUILD PARTY LOCK DUNGEON BLOCK");
    data << uint8(lockMap.size());
    for (LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
    {
        data << uint64(it->first);                         // Player guid
        BuildPlayerLockDungeonBlock(data, it->second);
    }
}
开发者ID:AriDEV,项目名称:AscEmu,代码行数:10,代码来源:LfgHandler.cpp

示例5: HandleLfgPartyLockInfoRequestOpcode

void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& recv_data)
{
    Log.Debug("LfgHandler", "CMSG_LFD_PARTY_LOCK_INFO_REQUEST");

    uint64 guid = GetPlayer()->GetGUID();
    Log.Debug("LfgHandler", "CMSG_LFD_PARTY_LOCK_INFO_REQUEST %u", guid);

    Group* grp = GetPlayer()->GetGroup();
    if (!grp)
        return;

    // Get the locked dungeons of the other party members
    LfgLockPartyMap lockMap;
    GroupMembersSet::iterator itx;
    for (itx = grp->GetSubGroup(0)->GetGroupMembersBegin(); itx != grp->GetSubGroup(0)->GetGroupMembersEnd(); ++itx)
    {
        Player* plrg = (*itx)->m_loggedInPlayer;
        if (!plrg)
            continue;

        uint64 pguid = plrg->GetGUID();
        if (pguid == guid)
            continue;

        lockMap[pguid] = sLfgMgr.GetLockedDungeons(pguid);
    }

    uint32 size = 0;
    for (LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
        size += 8 + 4 + uint32(it->second.size()) * (4 + 4);

    Log.Debug("LfgHandler", "SMSG_LFG_PARTY_INFO %u", guid);
    WorldPacket data(SMSG_LFG_PARTY_INFO, 1 + size);
    BuildPartyLockDungeonBlock(data, lockMap);
    SendPacket(&data);
}
开发者ID:AriDEV,项目名称:AscEmu,代码行数:36,代码来源:LfgHandler.cpp


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