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


C++ Group::GetGUID方法代码示例

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


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

示例1: HandleLfgSetRolesOpcode

void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recv_data)
{
    uint8 roles;
    recv_data >> roles;                                    // Player Group Roles
    uint64 guid = GetPlayer()->GetGUID();
    Group* grp = GetPlayer()->GetGroup();
    if (!grp)
    {
        sLog->outDebug("CMSG_LFG_SET_ROLES [" UI64FMTD "] Not in group", guid);
        return;
    }
    uint64 gguid = grp->GetGUID();
    sLog->outDebug("CMSG_LFG_SET_ROLES: Group [" UI64FMTD "], Player [" UI64FMTD "], Roles: %u", gguid, guid, roles);
    sLFGMgr->UpdateRoleCheck(gguid, guid, roles);
}
开发者ID:ATOM12192,项目名称:SkyFireEMU,代码行数:15,代码来源:LFGHandler.cpp

示例2: HandleLfgSetRolesOpcode

void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recv_data)
{
    Log.Debug("LfgHandler", "CMSG_LFG_SET_ROLES");
    uint8 roles;
    recv_data >> roles;                                    // Player Group Roles
    uint64 guid = GetPlayer()->GetGUID();
    Group* grp = GetPlayer()->GetGroup();
    if (!grp)
    {
        Log.Debug("LfgHandler", "CMSG_LFG_SET_ROLES %u Not in group", guid);
        return;
    }
    uint64 gguid = grp->GetGUID();// NEED TO ADD Bind group to guids
    Log.Debug("LfgHandler", "CMSG_LFG_SET_ROLES: Group %u, Player %u, Roles: %u", gguid, guid, roles);
    sLfgMgr.UpdateRoleCheck(gguid, guid, roles);
}
开发者ID:AriDEV,项目名称:AscEmu,代码行数:16,代码来源:LfgHandler.cpp

示例3: HandleLfgSetRolesOpcode

void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recvData)
{
    uint8 roles;
    recvData >> roles;                                     // Player Group Roles
    uint64 guid = GetPlayer()->GetGUID();
    Group* grp = GetPlayer()->GetGroup();
    if (!grp)
    {
        sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_ROLES %s Not in group",
            GetPlayerInfo().c_str());
        return;
    }
    uint64 gguid = grp->GetGUID();
    sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_ROLES: Group %u, Player %s, Roles: %u",
        GUID_LOPART(gguid), GetPlayerInfo().c_str(), roles);
    sLFGMgr->UpdateRoleCheck(gguid, guid, roles);
}
开发者ID:8Infinity8,项目名称:InfinityCore,代码行数:17,代码来源:LFGHandler.cpp

示例4: HandleLfgSetRolesOpcode

void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recvData)
{
    uint8 roles;
    recvData >> roles;                                     // Player Group Roles
    ObjectGuid guid = GetPlayer()->GetGUID();
    Group* group = GetPlayer()->GetGroup();
    if (!group)
    {
        TC_LOG_DEBUG("lfg", "CMSG_LFG_SET_ROLES %s Not in group",
            GetPlayerInfo().c_str());
        return;
    }
    ObjectGuid gguid = group->GetGUID();
    TC_LOG_DEBUG("lfg", "CMSG_LFG_SET_ROLES: Group %s, Player %s, Roles: %u",
        gguid.ToString().c_str(), GetPlayerInfo().c_str(), roles);
    sLFGMgr->UpdateRoleCheck(gguid, guid, roles);
}
开发者ID:Clementon,项目名称:ElunaTrinityCata,代码行数:17,代码来源:LFGHandler.cpp

示例5: HandleLfgLeaveOpcode

void WorldSession::HandleLfgLeaveOpcode(WorldPacket& recvData)
{
    ObjectGuid leaveGuid;
    Group* group = GetPlayer()->GetGroup();
    ObjectGuid RequesterGuid = GetPlayer()->GetGUID128();
    uint64 gguid = group ? group->GetGUID() : RequesterGuid;
    uint32 ClientInstanceId, QueueId, joinTime;

    sLFGMgr->ReadRideTicket(recvData, RequesterGuid, ClientInstanceId, QueueId, joinTime);

    recvData >> leaveGuid;

    TC_LOG_DEBUG("lfg", "CMSG_LFG_LEAVE %s in group: %u sent guid " UI64FMTD ".", GetPlayerInfo().c_str(), group ? 1 : 0, uint64(leaveGuid));

    // Check cheating - only leader can leave the queue
    if (!group || group->GetLeaderGUID() == RequesterGuid)
        sLFGMgr->LeaveLfg(gguid);
}
开发者ID:GlassFace,项目名称:Skyfire-6.1.2-version,代码行数:18,代码来源:LFGHandler.cpp

示例6: HandleLfgSetRolesOpcode

void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recvData)
{
    uint8 roles;
    recvData >> roles;                                    // Player Group Roles
    uint64 guid = GetPlayer()->GetGUID();
    Group* group = GetPlayer()->GetGroup();
    if (!group)
    {
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
        sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_SET_ROLES [" UI64FMTD "] Not in group", guid);
#endif
        return;
    }
    uint64 gguid = group->GetGUID();
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
    sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_SET_ROLES: Group [" UI64FMTD "], Player [" UI64FMTD "], Roles: %u", gguid, guid, roles);
#endif
    sLFGMgr->UpdateRoleCheck(gguid, guid, roles);
}
开发者ID:Helias,项目名称:azerothcore-wotlk,代码行数:19,代码来源:LFGHandler.cpp

示例7: OnMapChanged

void LFGPlayerScript::OnMapChanged(Player* player)
{
    Map const* map = player->GetMap();

    if (sLFGMgr->inLfgDungeonMap(player->GetGUID(), map->GetId(), map->GetDifficultyID()))
    {
        Group* group = player->GetGroup();
        // This function is also called when players log in
        // if for some reason the LFG system recognises the player as being in a LFG dungeon,
        // but the player was loaded without a valid group, we'll teleport to homebind to prevent
        // crashes or other undefined behaviour
        if (!group)
        {
            sLFGMgr->LeaveLfg(player->GetGUID());
            player->RemoveAurasDueToSpell(LFG_SPELL_LUCK_OF_THE_DRAW);
            player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, 0.0f);
            TC_LOG_ERROR("lfg", "LFGPlayerScript::OnMapChanged, Player %s (%s) is in LFG dungeon map but does not have a valid group! "
                "Teleporting to homebind.", player->GetName().c_str(), player->GetGUID().ToString().c_str());
            return;
        }

        for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
            if (Player* member = itr->GetSource())
                player->GetSession()->SendNameQueryOpcode(member->GetGUID());

        if (sLFGMgr->selectedRandomLfgDungeon(player->GetGUID()))
            player->CastSpell(player, LFG_SPELL_LUCK_OF_THE_DRAW, true);
    }
    else
    {
        Group* group = player->GetGroup();
        if (group && group->GetMembersCount() == 1)
        {
            sLFGMgr->LeaveLfg(group->GetGUID());
            group->Disband();
            TC_LOG_DEBUG("lfg", "LFGPlayerScript::OnMapChanged, Player %s(%s) is last in the lfggroup so we disband the group.",
                player->GetName().c_str(), player->GetGUID().ToString().c_str());
        }
        player->RemoveAurasDueToSpell(LFG_SPELL_LUCK_OF_THE_DRAW);
    }
}
开发者ID:Diyvol,项目名称:TrinityCore,代码行数:41,代码来源:LFGScripts.cpp

示例8: HandleLfgLeaveOpcode

void WorldSession::HandleLfgLeaveOpcode(WorldPacket& recvData)
{
    ObjectGuid leaveGuid;
    Group* group = GetPlayer()->GetGroup();
    uint64 guid = GetPlayer()->GetGUID();
    uint64 gguid = group ? group->GetGUID() : guid;

    recvData.read_skip<uint32>();                          // Always 8
    recvData.read_skip<uint32>();                          // Join date
    recvData.read_skip<uint32>();                          // Always 3
    recvData.read_skip<uint32>();                          // Queue Id

    recvData.ReadGuidMask(leaveGuid, 0, 1, 6, 7, 3, 5, 2, 4);

    recvData.ReadGuidBytes(leaveGuid, 1, 5, 6, 7, 4, 2, 3, 0);

    TC_LOG_DEBUG("lfg", "CMSG_LFG_LEAVE %s in group: %u sent guid " UI64FMTD ".",
        GetPlayerInfo().c_str(), group ? 1 : 0, uint64(leaveGuid));

    // Check cheating - only leader can leave the queue
    if (!group || group->GetLeaderGUID() == guid)
        sLFGMgr->LeaveLfg(gguid);
}
开发者ID:Caydan,项目名称:mop548,代码行数:23,代码来源:LFGHandler.cpp

示例9: HandleLfgLeaveOpcode

void WorldSession::HandleLfgLeaveOpcode(WorldPacket& recvData)
{
    ObjectGuid leaveGuid;
    Group* group = GetPlayer()->GetGroup();
    ObjectGuid guid = GetPlayer()->GetGUID();
    ObjectGuid gguid = group ? group->GetGUID() : guid;

    recvData.read_skip<uint32>();                          // Always 8
    recvData.read_skip<uint32>();                          // Join date
    recvData.read_skip<uint32>();                          // Always 3
    recvData.read_skip<uint32>();                          // Queue Id

    leaveGuid[4] = recvData.ReadBit();
    leaveGuid[5] = recvData.ReadBit();
    leaveGuid[0] = recvData.ReadBit();
    leaveGuid[6] = recvData.ReadBit();
    leaveGuid[2] = recvData.ReadBit();
    leaveGuid[7] = recvData.ReadBit();
    leaveGuid[1] = recvData.ReadBit();
    leaveGuid[3] = recvData.ReadBit();

    recvData.ReadByteSeq(leaveGuid[7]);
    recvData.ReadByteSeq(leaveGuid[4]);
    recvData.ReadByteSeq(leaveGuid[3]);
    recvData.ReadByteSeq(leaveGuid[2]);
    recvData.ReadByteSeq(leaveGuid[6]);
    recvData.ReadByteSeq(leaveGuid[0]);
    recvData.ReadByteSeq(leaveGuid[1]);
    recvData.ReadByteSeq(leaveGuid[5]);

    TC_LOG_DEBUG("lfg", "CMSG_LFG_LEAVE %s in group: %u sent guid " UI64FMTD ".",
        GetPlayerInfo().c_str(), group ? 1 : 0, uint64(leaveGuid));

    // Check cheating - only leader can leave the queue
    if (!group || group->GetLeaderGUID() == guid)
        sLFGMgr->LeaveLfg(gguid);
}
开发者ID:Clementon,项目名称:ElunaTrinityCata,代码行数:37,代码来源:LFGHandler.cpp

示例10: HandleGroupSetRoles

void WorldSession::HandleGroupSetRoles(WorldPacket &recv_data) {
	uint32 roles;
	uint64 guid = GetPlayer()->GetGUID();
	recv_data >> roles; // Player Group Roles
	recv_data >> guid;

	Player * plr = sObjectMgr->GetPlayer(guid);
	if (!plr) {
		sLog->outDebug(LOG_FILTER_NETWORKIO,
				"CMSG_GROUP_SET_ROLES [" UI64FMTD "] Player not found", guid);
		return;
	}

	Group* grp = plr->GetGroup();
	if (!grp) {
		sLog->outDebug(LOG_FILTER_NETWORKIO,
				"CMSG_GROUP_SET_ROLES [" UI64FMTD "] Not in group",
				plr->GetGUID());
		return;
	} else if (grp != GetPlayer()->GetGroup()) {
		sLog->outDebug(
				LOG_FILTER_NETWORKIO,
				"CMSG_GROUP_SET_ROLES [" UI64FMTD "]  and [" UI64FMTD "] Not in group same group",
				plr->GetGUID(), GetPlayer()->GetGUID());
		return;
	} else
		sLog->outDebug(LOG_FILTER_NETWORKIO,
				"CMSG_GROUP_SET_ROLES [" UI64FMTD "] Roles: %u", plr->GetGUID(),
				roles);

	plr->SetRoles(roles);
	if (grp->isLFGGroup()) {
		uint64 gguid = grp->GetGUID();
		sLFGMgr->UpdateRoleCheck(gguid, guid, roles);
	}
}
开发者ID:Bootz,项目名称:DeepshjirRepack,代码行数:36,代码来源:GroupHandler.cpp

示例11: HandleLfgGroupInfoCommand

    static bool HandleLfgGroupInfoCommand(ChatHandler* handler, char const* args)
    {
        Player* target = NULL;
        std::string playerName;
        if (!handler->extractPlayerTarget((char*)args, &target, NULL, &playerName))
            return false;

        Group* grp = target->GetGroup();
        if (!grp)
        {
            handler->PSendSysMessage(LANG_LFG_NOT_IN_GROUP, playerName.c_str());
            return true;
        }

        uint64 guid = grp->GetGUID();
        std::string const& state = lfg::GetStateString(sLFGMgr->GetState(guid));
        handler->PSendSysMessage(LANG_LFG_GROUP_INFO, grp->isLFGGroup(),
            state.c_str(), sLFGMgr->GetDungeon(guid));

        for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
            GetPlayerInfo(handler, itr->GetSource());

        return true;
    }
开发者ID:Angmon,项目名称:TrinityCore,代码行数:24,代码来源:cs_lfg.cpp

示例12: HandleRaidReadyCheckOpcode

void WorldSession::HandleRaidReadyCheckOpcode(WorldPacket& /*recvData*/)
{
    TC_LOG_DEBUG("network", "WORLD: Received CMSG_RAID_READY_CHECK");

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

    ObjectGuid playerGuid = GetPlayer()->GetGUID();

    /** error handling **/
    if (!group->IsLeader(playerGuid) && !group->IsAssistant(playerGuid))
        return;

    // check is also done client side
    if (group->ReadyCheckInProgress())
        return;
    /********************/

    uint32 readyCheckDuration = 35000;
    ObjectGuid groupGuid = group->GetGUID();

    // everything's fine, do it
    WorldPacket data(SMSG_RAID_READY_CHECK, 1 + 8 + 1 + 8 + 1 + 4);
    data.WriteBit(groupGuid[4]);
    data.WriteBit(groupGuid[2]);
    data.WriteBit(playerGuid[4]);
    data.WriteBit(groupGuid[3]);
    data.WriteBit(groupGuid[7]);
    data.WriteBit(groupGuid[1]);
    data.WriteBit(groupGuid[0]);
    data.WriteBit(playerGuid[6]);
    data.WriteBit(playerGuid[5]);
    data.WriteBit(groupGuid[6]);
    data.WriteBit(groupGuid[5]);
    data.WriteBit(playerGuid[0]);
    data.WriteBit(playerGuid[1]);
    data.WriteBit(playerGuid[2]);
    data.WriteBit(playerGuid[7]);
    data.WriteBit(playerGuid[3]);

    data << uint32(readyCheckDuration);
    data.WriteByteSeq(groupGuid[2]);
    data.WriteByteSeq(groupGuid[7]);
    data.WriteByteSeq(groupGuid[3]);
    data.WriteByteSeq(playerGuid[4]);
    data.WriteByteSeq(groupGuid[1]);
    data.WriteByteSeq(groupGuid[0]);
    data.WriteByteSeq(playerGuid[1]);
    data.WriteByteSeq(playerGuid[2]);
    data.WriteByteSeq(playerGuid[6]);
    data.WriteByteSeq(playerGuid[5]);
    data.WriteByteSeq(groupGuid[6]);
    data.WriteByteSeq(playerGuid[0]);
    data << uint8(0);                       // unknown
    data.WriteByteSeq(playerGuid[7]);
    data.WriteByteSeq(groupGuid[4]);
    data.WriteByteSeq(playerGuid[3]);
    data.WriteByteSeq(groupGuid[5]);

    group->BroadcastPacket(&data, false);

    group->ReadyCheck(true);
    group->ReadyCheckMemberHasResponded(playerGuid);
    group->OfflineReadyCheck();

    // leader keeps track of ready check timer
    GetPlayer()->SetReadyCheckTimer(readyCheckDuration);
}
开发者ID:Allowed,项目名称:SkyFire_5xx,代码行数:69,代码来源:GroupHandler.cpp

示例13: HandleRaidLeaderReadyCheck

void WorldSession::HandleRaidLeaderReadyCheck(WorldPacket& recvData)
{
    sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_RAID_LEADER_READY_CHECK");

    recvData.read_skip<uint8>(); // unk, 0x00

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

    if (!group->IsLeader(GetPlayer()->GetGUID()) && !group->IsAssistant(GetPlayer()->GetGUID()) && !(group->GetGroupType() & GROUPTYPE_EVERYONE_IS_ASSISTANT))
        return;

    ObjectGuid groupGuid = group->GetGUID();
    ObjectGuid playerGuid = GetPlayer()->GetGUID();

    // For the initiator being ready.
    group->SetReadyCheckCount(1);

    // Everything's fine, do it.

    WorldPacket data(SMSG_RAID_READY_CHECK_STARTED, 1 + 8 + 1 + 8 + 1 + 4);

    data.WriteBit(playerGuid[4]);
    data.WriteBit(groupGuid[1]);
    data.WriteBit(groupGuid[4]);
    data.WriteBit(playerGuid[6]);
    data.WriteBit(groupGuid[7]);
    data.WriteBit(groupGuid[6]);
    data.WriteBit(playerGuid[2]);
    data.WriteBit(playerGuid[0]);
    data.WriteBit(playerGuid[7]);
    data.WriteBit(groupGuid[0]);
    data.WriteBit(groupGuid[3]);
    data.WriteBit(groupGuid[5]);
    data.WriteBit(playerGuid[5]);
    data.WriteBit(playerGuid[3]);
    data.WriteBit(playerGuid[1]);
    data.WriteBit(groupGuid[2]);

    data.FlushBits();

    data.WriteByteSeq(groupGuid[6]);
    data.WriteByteSeq(groupGuid[0]);
    data.WriteByteSeq(playerGuid[4]);
    data.WriteByteSeq(playerGuid[7]);
    data.WriteByteSeq(groupGuid[5]);
    data.WriteByteSeq(groupGuid[7]);
    data.WriteByteSeq(playerGuid[6]);
    data.WriteByteSeq(playerGuid[3]);

    data << uint8(0);                       // Unknown

    data.WriteByteSeq(groupGuid[1]);
    data.WriteByteSeq(playerGuid[2]);
    data.WriteByteSeq(groupGuid[3]);
    data.WriteByteSeq(playerGuid[5]);
    data.WriteByteSeq(groupGuid[4]);
    data.WriteByteSeq(groupGuid[2]);

    data << uint32(35000);                  // Ready check duration (35 sec)

    data.WriteByteSeq(playerGuid[1]);
    data.WriteByteSeq(playerGuid[0]);

    group->BroadcastPacket(&data, false, -1);

    group->OfflineReadyCheck();
}
开发者ID:Expery,项目名称:Core,代码行数:69,代码来源:GroupHandler.cpp

示例14: SendLfgUpdateProposal

void WorldSession::SendLfgUpdateProposal(uint32 proposalId, const LfgProposal* pProp)
{
    if (!pProp)
        return;

    uint64 guid = GetPlayer()->GetGUID();
    LfgProposalPlayerMap::const_iterator itPlayer = pProp->players.find(guid);
    if (itPlayer == pProp->players.end())                  // Player MUST be in the proposal
        return;

    LfgProposalPlayer* ppPlayer = itPlayer->second;
    uint32 pLowGroupGuid = ppPlayer->groupLowGuid;
    uint32 dLowGuid = pProp->groupLowGuid;
    uint32 dungeonId = pProp->dungeonId;
    bool isSameDungeon = false;
    bool isContinue = false;
    Group* group = dLowGuid ? sGroupMgr->GetGroupByGUID(dLowGuid) : NULL;
    uint32 completedEncounters = 0;
    if (group)
    {
        uint64 gguid = group->GetGUID();
        isContinue = group->isLFGGroup() && sLFGMgr->GetState(gguid) != LFG_STATE_FINISHED_DUNGEON;
        isSameDungeon = GetPlayer()->GetGroup() == group && isContinue;
    }

    sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_PROPOSAL_UPDATE [" UI64FMTD "] state: %u", GetPlayer()->GetGUID(), pProp->state);
    WorldPacket data(SMSG_LFG_PROPOSAL_UPDATE, 4 + 1 + 4 + 4 + 1 + 1 + pProp->players.size() * (4 + 1 + 1 + 1 + 1 +1));

    if (!isContinue)                                       // Only show proposal dungeon if it's continue
    {
        LfgDungeonSet playerDungeons = sLFGMgr->GetSelectedDungeons(guid);
        if (playerDungeons.size() == 1)
            dungeonId = (*playerDungeons.begin());
    }

    if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId))
    {
        dungeonId = dungeon->Entry();

        // Select a player inside to be get completed encounters from
        if (group)
        {
            for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
            {
                Player* groupMember = itr->getSource();
                if (groupMember && groupMember->GetMapId() == uint32(dungeon->map))
                {
                    if (InstanceScript* instance = groupMember->GetInstanceScript())
                        completedEncounters = instance->GetCompletedEncounterMask();
                    break;
                }
            }
        }
    }

    data << uint32(dungeonId);                             // Dungeon
    data << uint8(pProp->state);                           // Result state
    data << uint32(proposalId);                            // Internal Proposal ID
    data << uint32(completedEncounters);                   // Bosses killed
    data << uint8(isSameDungeon);                          // Silent (show client window)
    data << uint8(pProp->players.size());                  // Group size

    for (itPlayer = pProp->players.begin(); itPlayer != pProp->players.end(); ++itPlayer)
    {
        ppPlayer = itPlayer->second;
        data << uint32(ppPlayer->role);                    // Role
        data << uint8(itPlayer->first == guid);            // Self player
        if (!ppPlayer->groupLowGuid)                       // Player not it a group
        {
            data << uint8(0);                              // Not in dungeon
            data << uint8(0);                              // Not same group
        }
        else
        {
            data << uint8(ppPlayer->groupLowGuid == dLowGuid);  // In dungeon (silent)
            data << uint8(ppPlayer->groupLowGuid == pLowGroupGuid); // Same Group than player
        }
        data << uint8(ppPlayer->accept != LFG_ANSWER_PENDING); // Answered
        data << uint8(ppPlayer->accept == LFG_ANSWER_AGREE); // Accepted
    }
    SendPacket(&data);
}
开发者ID:Gosa1979,项目名称:ArkCORE2,代码行数:82,代码来源:LFGHandler.cpp

示例15: HandleRaidConfirmReadyCheck

void WorldSession::HandleRaidConfirmReadyCheck(WorldPacket& recvData)
{
    sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_RAID_CONFIRM_READY_CHECK");

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

    recvData.read_skip<uint8>(); // unk, 0x00

    bool ready = recvData.ReadBit();

    // ========== Unknown guid reading here - probably for group guid ? ========
    ObjectGuid unknownGuid;

    unknownGuid[0] = recvData.ReadBit();
    unknownGuid[6] = recvData.ReadBit();
    unknownGuid[5] = recvData.ReadBit();
    unknownGuid[2] = recvData.ReadBit();
    unknownGuid[4] = recvData.ReadBit();
    unknownGuid[7] = recvData.ReadBit();
    unknownGuid[3] = recvData.ReadBit();
    unknownGuid[1] = recvData.ReadBit();

    recvData.FlushBits();

    recvData.ReadByteSeq(unknownGuid[2]);
    recvData.ReadByteSeq(unknownGuid[0]);
    recvData.ReadByteSeq(unknownGuid[7]);
    recvData.ReadByteSeq(unknownGuid[6]);
    recvData.ReadByteSeq(unknownGuid[5]);
    recvData.ReadByteSeq(unknownGuid[3]);
    recvData.ReadByteSeq(unknownGuid[1]);
    recvData.ReadByteSeq(unknownGuid[4]);
    // =========================================================================

    ObjectGuid playerGuid = GetPlayer()->GetGUID();
    ObjectGuid groupGuid = group->GetGUID();

    // Confirmed the check, increase the count.
    group->SetReadyCheckCount(group->GetReadyCheckCount() + 1);

    WorldPacket data(SMSG_RAID_READY_CHECK_RESPONSE, 1 + 1 + 8 + 1 + 8);

    data.WriteBit(groupGuid[0]);
    data.WriteBit(groupGuid[2]);

    data.WriteBit(ready);

    data.WriteBit(playerGuid[7]);
    data.WriteBit(playerGuid[6]);
    data.WriteBit(playerGuid[2]);
    data.WriteBit(groupGuid[4]);
    data.WriteBit(groupGuid[3]);
    data.WriteBit(groupGuid[5]);
    data.WriteBit(playerGuid[3]);
    data.WriteBit(groupGuid[7]);
    data.WriteBit(playerGuid[5]);
    data.WriteBit(groupGuid[6]);
    data.WriteBit(groupGuid[1]);
    data.WriteBit(playerGuid[0]);
    data.WriteBit(playerGuid[1]);
    data.WriteBit(playerGuid[4]);

    data.FlushBits();

    data.WriteByteSeq(playerGuid[1]);
    data.WriteByteSeq(groupGuid[5]);
    data.WriteByteSeq(playerGuid[2]);
    data.WriteByteSeq(groupGuid[7]);
    data.WriteByteSeq(groupGuid[0]);
    data.WriteByteSeq(playerGuid[4]);
    data.WriteByteSeq(playerGuid[3]);
    data.WriteByteSeq(groupGuid[4]);
    data.WriteByteSeq(playerGuid[7]);
    data.WriteByteSeq(groupGuid[6]);
    data.WriteByteSeq(playerGuid[5]);
    data.WriteByteSeq(groupGuid[2]);
    data.WriteByteSeq(groupGuid[1]);
    data.WriteByteSeq(groupGuid[3]);
    data.WriteByteSeq(playerGuid[0]);
    data.WriteByteSeq(playerGuid[6]);

    group->BroadcastReadyCheck(&data); // BroadcastPacket(&data, true);

    // Send SMSG_RAID_READY_CHECK_COMPLETED if needed.

    if (group->GetReadyCheckCount() >= group->GetMembersCount())
    {
        ObjectGuid grpGUID = group->GetGUID();
        bool checkCompleted = true;

        data.Initialize(SMSG_RAID_READY_CHECK_COMPLETED);

        uint8 bitOrder[8] = { 1, 5, 6, 3, 2, 7, 0, 4 };
        data.WriteBitInOrder(grpGUID, bitOrder);

        data.FlushBits();

        data.WriteByteSeq(grpGUID[4]);
//.........这里部分代码省略.........
开发者ID:Expery,项目名称:Core,代码行数:101,代码来源:GroupHandler.cpp


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