• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetObjectGuid函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetObjectGuid函数的典型用法代码示例。如果您正苦于以下问题:C++ GetObjectGuid函数的具体用法?C++ GetObjectGuid怎么用?C++ GetObjectGuid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: DETAIL_FILTER_LOG

void Transport::Start()
{
    DETAIL_FILTER_LOG(LOG_FILTER_TRANSPORT_MOVES, "Transport::StartMovement %s (%s) start moves, period %u/%u",
        GetObjectGuid().GetString().c_str(),
        GetName(),
        m_pathTime,
        GetPeriod()
        );
    SetActiveObjectState(true);
    BuildStartMovePacket(GetMap());
}
开发者ID:120239197a,项目名称:SingleCore,代码行数:11,代码来源:Transports.cpp


示例2: GetMap

void DynamicObject::RemoveFromWorld()
{
    ///- Remove the dynamicObject from the accessor
    if(IsInWorld())
    {
        GetMap()->GetObjectsStore().erase<DynamicObject>(GetObjectGuid(), (DynamicObject*)NULL);
        GetViewPoint().Event_RemovedFromWorld();
    }

    Object::RemoveFromWorld();
}
开发者ID:KioM,项目名称:mangos-b,代码行数:11,代码来源:DynamicObject.cpp


示例3: GetUInt32Value

// Though the client has the information in the item's data field,
// we have to send SMSG_ITEM_TIME_UPDATE to display the remaining
// time.
void Item::SendTimeUpdate(Player* owner)
{
    uint32 duration = GetUInt32Value(ITEM_FIELD_DURATION);
    if (!duration)
        return;

    WorldPacket data(SMSG_ITEM_TIME_UPDATE, (8 + 4));
    data << ObjectGuid(GetObjectGuid());
    data << uint32(duration);
    owner->GetSession()->SendPacket(&data);
}
开发者ID:PanteraPolnocy,项目名称:MaNGOS-Zero,代码行数:14,代码来源:Item.cpp


示例4: DETAIL_FILTER_LOG

void MOTransport::Stop()
{
    DETAIL_FILTER_LOG(LOG_FILTER_TRANSPORT_MOVES, "Transport::StartMovement %s (%s) stop moves, period %u/%u",
        GetObjectGuid().GetString().c_str(),
        GetName(),
        m_pathTime,
        GetPeriod()
        );
    SetActiveObjectState(false);
    RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
    SetGoState(GO_STATE_READY);
    SetLootState(GO_JUST_DEACTIVATED);
}
开发者ID:beyourself,项目名称:RustEmu-Core,代码行数:13,代码来源:Transports.cpp


示例5: MANGOS_ASSERT

void Corpse::DeleteBonesFromWorld()
{
    MANGOS_ASSERT(GetType() == CORPSE_BONES);
    Corpse* corpse = GetMap()->GetCorpse(GetObjectGuid());

    if (!corpse)
    {
        sLog.outError("Bones %u not found in world.", GetGUIDLow());
        return;
    }

    AddObjectToRemoveList();
}
开发者ID:krullgor,项目名称:mangos-wotlk,代码行数:13,代码来源:Corpse.cpp


示例6: data

WorldPacket CPlayer::BuildNameQuery()
{
    WorldPacket data(SMSG_NAME_QUERY_RESPONSE, (8 + 1 + 4 + 4 + 4 + 10));
    data << GetObjectGuid();      // player guid
    data << GetName();            // player name
    data << uint8(0);                       // realm name
    data << uint32(getRace());    // player race
    data << uint32(getGender());  // player gender
    data << uint32(getClass());   // player class
    data << uint8(0);                       // is not declined

    return data;
}
开发者ID:kuramajssken001,项目名称:mangos-tbc,代码行数:13,代码来源:CFBG.cpp


示例7: data

void Group::SendUpdate()
{
    for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
    {
        Player* player = sObjectMgr.GetPlayer(citr->guid);
        if (!player || !player->GetSession() || player->GetGroup() != this)
            continue;
        // guess size
        WorldPacket data(SMSG_GROUP_LIST, (1 + 1 + 1 + 1 + 8 + 4 + GetMembersCount() * 20));
        data << uint8(m_groupType);                         // group type (flags in 3.3)
        data << uint8(citr->group);                         // groupid
        data << uint8(GetFlags(*citr));                     // group flags
        data << uint8(isBGGroup() ? 1 : 0);                 // 2.0.x, isBattleGroundGroup?
        if (m_groupType & GROUPTYPE_LFD)
        {
            data << uint8(0);
            data << uint32(0);
        }
        data << GetObjectGuid();                            // group guid
        data << uint32(0);                                  // 3.3, this value increments every time SMSG_GROUP_LIST is sent
        data << uint32(GetMembersCount() - 1);
        for (member_citerator citr2 = m_memberSlots.begin(); citr2 != m_memberSlots.end(); ++citr2)
        {
            if (citr->guid == citr2->guid)
                continue;
            Player* member = sObjectMgr.GetPlayer(citr2->guid);
            uint8 onlineState = (member && member->GetSession() && !member->GetSession()->PlayerLogout()) ? MEMBER_STATUS_ONLINE : MEMBER_STATUS_OFFLINE;
            onlineState = onlineState | ((isBGGroup()) ? MEMBER_STATUS_PVP : 0);

            data << citr2->name;
            data << citr2->guid;
            data << uint8(onlineState);
            data << uint8(citr2->group);                    // groupid
            data << uint8(GetFlags(*citr2));                // group flags
            data << uint8(0);                               // 3.3, role?
        }

        ObjectGuid masterLootGuid = (m_lootMethod == MASTER_LOOT) ? m_masterLooterGuid : ObjectGuid();
        data << m_leaderGuid;                               // leader guid
        if (GetMembersCount() - 1)
        {
            data << uint8(m_lootMethod);                    // loot method
            data << masterLootGuid;                         // master loot guid
            data << uint8(m_lootThreshold);                 // loot threshold
            data << uint8(m_dungeonDifficulty);             // Dungeon Difficulty
            data << uint8(m_raidDifficulty);                // Raid Difficulty
            data << uint8(0);                               // 3.3, dynamic difficulty?
        }
        player->GetSession()->SendPacket(&data);
    }
}
开发者ID:HerrTrigger,项目名称:mangos-wotlk,代码行数:51,代码来源:Group.cpp


示例8: MANGOS_ASSERT

void Bag::StoreItem(uint8 slot, Item* pItem, bool /*update*/)
{
    MANGOS_ASSERT(slot < MAX_BAG_SIZE);

    if (pItem)
    {
        m_bagslot[slot] = pItem;
        SetGuidValue(CONTAINER_FIELD_SLOT_1 + (slot * 2), pItem->GetObjectGuid());
        pItem->SetGuidValue(ITEM_FIELD_CONTAINED, GetObjectGuid());
        pItem->SetGuidValue(ITEM_FIELD_OWNER, GetOwnerGuid());
        pItem->SetContainer(this);
        pItem->SetSlot(slot);
    }
}
开发者ID:mynew4,项目名称:RustEmu-Core,代码行数:14,代码来源:Bag.cpp


示例9: JoinBattleGround

void CPlayer::JoinBattleGround(BattleGround* bg)
{
    if (bg->isArena())
        return;

    if (!NativeTeam())
    {
        m_FakedPlayers.push_back(GetObjectGuid());
        SetByteValue(UNIT_FIELD_BYTES_0, 0, getFRace());
        setFaction(getFFaction());
    }

    SetRecache();
    FakeDisplayID();
}
开发者ID:kuramajssken001,项目名称:mangos-tbc,代码行数:15,代码来源:CFBG.cpp


示例10: data

void Group::SendUpdate()
{
    for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
    {
        Player* player = sObjectMgr.GetPlayer(citr->guid);
        if (!player || !player->GetSession() || player->GetGroup() != this)
            continue;
        // guess size
        WorldPacket data(SMSG_GROUP_LIST, (1 + 1 + 1 + 1 + 8 + 4 + GetMembersCount() * 20));
        data << uint8(m_groupType);                         // group type
        data << uint8(isBGGroup() ? 1 : 0);                 // 2.0.x, isBattleGroundGroup?
        data << uint8(citr->group);                         // groupid
        data << uint8(citr->assistant ? 0x01 : 0);          // 0x2 main assist, 0x4 main tank
        data << GetObjectGuid();                            // group guid
        data << uint32(GetMembersCount() - 1);
        for (member_citerator citr2 = m_memberSlots.begin(); citr2 != m_memberSlots.end(); ++citr2)
        {
            if (citr->guid == citr2->guid)
                continue;
            Player* member = sObjectMgr.GetPlayer(citr2->guid);
            uint8 onlineState = (member) ? MEMBER_STATUS_ONLINE : MEMBER_STATUS_OFFLINE;
            onlineState = onlineState | ((isBGGroup()) ? MEMBER_STATUS_PVP : 0);

            data << citr2->name;
            data << citr2->guid;
            // online-state
            data << uint8(sObjectMgr.GetPlayer(citr2->guid) ? 1 : 0);
            data << uint8(citr2->group);                    // groupid
            data << uint8(citr2->assistant ? 0x01 : 0);     // 0x2 main assist, 0x4 main tank
        }

        ObjectGuid masterLootGuid = (m_lootMethod == MASTER_LOOT) ? m_masterLooterGuid : ObjectGuid();
        data << m_leaderGuid;                               // leader guid
        if (GetMembersCount() - 1)
        {
            data << uint8(m_lootMethod);                    // loot method
            data << masterLootGuid;                         // master loot guid
            data << uint8(m_lootThreshold);                 // loot threshold
            data << uint8(m_difficulty);                    // Heroic Mod Group
        }
        player->GetSession()->SendPacket(&data);
    }
}
开发者ID:AlexHjelm,项目名称:Core,代码行数:43,代码来源:Group.cpp


示例11: GetBattleGround

void CPlayer::RecachePlayersFromBG()
{
    BattleGround* bg = GetBattleGround();

    if (!bg)
        return;

    for (auto& itr : bg->GetPlayers())
    {
        if (Player* player = sObjectMgr.GetPlayer(itr.first))
        {
            if (!player->ToCPlayer()->NativeTeam())
            {
                // Erase bg players from source player cache
                WorldPacket data(SMSG_INVALIDATE_PLAYER, 8);
                data << player->GetObjectGuid();
                GetSession()->SendPacket(&data);
                // Send bg player data to source player
                data = player->ToCPlayer()->BuildNameQuery();
                GetSession()->SendPacket(&data);
            }

            if (!NativeTeam())
            {
                // Erase source player from bg players cache
                WorldPacket data(SMSG_INVALIDATE_PLAYER, 8);
                data << GetObjectGuid();
                player->GetSession()->SendPacket(&data);
                // Send new source data to bg players
                data = BuildNameQuery();
                player->GetSession()->SendPacket(&data);
            }
        }
        else
        {
            // Couldn't find bgplayer, recache him for source player in case he logs in again.
            WorldPacket data(SMSG_INVALIDATE_PLAYER, 8);
            data << itr.first;
            GetSession()->SendPacket(&data);
        }
    }
}
开发者ID:kuramajssken001,项目名称:mangos-tbc,代码行数:42,代码来源:CFBG.cpp


示例12: data

void Group::SendUpdate()
{
    for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
    {
        Player* player = sObjectMgr.GetPlayer(citr->guid);
        if (!player || !player->GetSession() || player->GetGroup() != this)
            continue;
        // guess size
        WorldPacket data(SMSG_GROUP_LIST, (1 + 1 + 1 + 1 + 8 + 4 + GetMembersCount() * 20));
        data << uint8(m_groupType);                         // group type
        data << uint8(isBattleGroup() ? 1 : 0);                 // 2.0.x, isBattleGroundGroup?
        data << uint8(citr->group);                         // groupid
        data << uint8(GetFlags(*citr));                     // group flags
        data << GetObjectGuid();                            // group guid
        data << uint32(GetMembersCount() - 1);
        for (member_citerator citr2 = m_memberSlots.begin(); citr2 != m_memberSlots.end(); ++citr2)
        {
            if (citr->guid == citr2->guid)
                continue;
            data << citr2->name;
            data << citr2->guid;
            data << uint8(GetGroupMemberStatus(sObjectMgr.GetPlayer(citr2->guid)));
            data << uint8(citr2->group);                    // groupid
            data << uint8(GetFlags(*citr2));                // group flags
        }

        ObjectGuid masterLootGuid = (m_lootMethod == MASTER_LOOT) ? m_masterLooterGuid : ObjectGuid();
        data << m_leaderGuid;                               // leader guid
        if (GetMembersCount() - 1)
        {
            data << uint8(m_lootMethod);                    // loot method
            data << masterLootGuid;                         // master loot guid
            data << uint8(m_lootThreshold);                 // loot threshold
            data << uint8(m_difficulty);                    // Heroic Mod Group
        }
        player->GetSession()->SendPacket(data);
    }
}
开发者ID:lduguid,项目名称:mangos-tbc,代码行数:38,代码来源:Group.cpp


示例13: ProcessEventId_event_test_of_endurance

bool ProcessEventId_event_test_of_endurance(uint32 eventId, Object* pSource, Object* pTarget, bool isStart)
{
    auto pGO = pTarget->ToGameObject();
    auto pPlayer = pSource->ToPlayer();

    if (!pGO || !pPlayer)
        return true;

    if (pGO->FindNearestCreature(NPC_GRENKA, 100.0f))
        return true;

    if (auto pGrenka = pGO->SummonCreature(Harpies[4].entry,
        Harpies[4].x,
        Harpies[4].y, 
        Harpies[4].z, 
        Harpies[4].o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, MINUTE*IN_MILLISECONDS))
    {
        if (auto pGrenkaAI = static_cast<npc_grenka_bloodscreechAI*>(pGrenka->AI()))
            pGrenkaAI->m_PlayerGuid = pPlayer->GetObjectGuid();
    }

    return true;
}
开发者ID:Maduse,项目名称:server,代码行数:23,代码来源:thousand_needles.cpp


示例14: CanBeTraded

bool Item::CanBeTraded() const
{
    if (IsSoulBound())
        return false;
    if (IsBag() && (Player::IsBagPos(GetPos()) || !((Bag const*)this)->IsEmpty()))
        return false;

    if (Player* owner = GetOwner())
    {
        if (owner->CanUnequipItem(GetPos(), false) !=  EQUIP_ERR_OK)
            return false;
        if (owner->GetLootGuid() == GetObjectGuid())
            return false;
    }

    if (HasGeneratedLoot())
        return false;

    if (IsBoundByEnchant())
        return false;

    return true;
}
开发者ID:Flairgun,项目名称:mangos-tbc,代码行数:23,代码来源:Item.cpp


示例15: SendObjectDeSpawnAnim

void Totem::UnSummon()
{
    SendObjectDeSpawnAnim(GetObjectGuid());

    CombatStop();
    RemoveAurasDueToSpell(GetSpell());

    if (Unit* owner = GetOwner())
    {
        owner->_RemoveTotem(this);
        owner->RemoveAurasDueToSpell(GetSpell());

        // remove aura all party members too
        if (owner->GetTypeId() == TYPEID_PLAYER)
        {
            // Not only the player can summon the totem (scripted AI)
            if (Group* pGroup = ((Player*)owner)->GetGroup())
            {
                for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
                {
                    Player* Target = itr->getSource();
                    if (Target && pGroup->SameSubGroup((Player*)owner, Target))
                        Target->RemoveAurasDueToSpell(GetSpell());
                }
            }
        }

        if (owner->GetTypeId() == TYPEID_UNIT && ((Creature*)owner)->AI())
            ((Creature*)owner)->AI()->SummonedCreatureDespawn((Creature*)this);
    }

    // any totem unsummon look like as totem kill, req. for proper animation
    if (isAlive())
        SetDeathState(DEAD);

    AddObjectToRemoveList();
}
开发者ID:249CAAFE40,项目名称:mangos-tbc,代码行数:37,代码来源:Totem.cpp


示例16: CanBeTraded

bool Item::CanBeTraded(bool mail, bool trade) const
{
    if ((!mail || !IsBoundAccountWide()) && (IsSoulBound() && (!HasFlag(ITEM_FIELD_FLAGS, ITEM_DYNFLAG_BOP_TRADEABLE) || !trade)))
        return false;

    if (IsBag() && (Player::IsBagPos(GetPos()) || !((Bag const*)this)->IsEmpty()))
        return false;

    if (Player* owner = GetOwner())
    {
        if (owner->CanUnequipItem(GetPos(), false) !=  EQUIP_ERR_OK)
            return false;
        if (owner->GetLootGuid() == GetObjectGuid())
            return false;
    }

    if (HasGeneratedLoot())
        return false;

    if (IsBoundByEnchant())
        return false;

    return true;
}
开发者ID:Splash,项目名称:mangos,代码行数:24,代码来源:Item.cpp


示例17: CUGP


//.........这里部分代码省略.........
				{
					pObject->Release();
					pObject = NULL;
				}
			wprintf( szPath);
			wprintf(L"\n");
			//Bind to the root of the current domain.
			hr = ADsOpenObject(szPath,pszBuffer,pszBuffer2,
					 ADS_SECURE_AUTHENTICATION,IID_IDirectorySearch,(void**)&pDS);
			if (SUCCEEDED(hr))
				{
					if (SUCCEEDED(hr))
						{
							hr =  FindUserByName(pDS, pszBuffer, &pObjectUser);
							if (FAILED(hr))
								{
									wprintf(L"User not found %i\n",hr);
									delete [] pszBuffer;
									delete [] pszBuffer2;
									delete [] pszBuffer3;
									delete [] szPath;
									delete [] myPath;
									if (pDS) pDS->Release();
									if (pObjectUser) pObjectUser->Release();
									return false;
								}
							if (pObjectUser) pObjectUser->Release();
							///////////////////// VNCACCESS
							hr =  FindGroup(pDS, pszBuffer, &pObjectGroup,pszBuffer4);
							if (pObjectGroup)
										{
											pObjectGroup->Release();
											pObjectGroup = NULL;
										}
							if (FAILED(hr)) wprintf(L"group not found\n");
							if (SUCCEEDED(hr))
								{
									wprintf(L"Group found OK\n");
									IADsGroup *     pIADsG;
									hr = ADsOpenObject( gbsGroup,pszBuffer, pszBuffer2, 
											ADS_SECURE_AUTHENTICATION,IID_IADsGroup, (void**) &pIADsG);
									if (SUCCEEDED(hr))
										{
											VARIANT_BOOL bMember = FALSE;  
											hr = pIADsG->IsMember(gbsMember,&bMember);
											if (SUCCEEDED(hr))
												{
													if (bMember == -1)
														{
															wprintf(L"Object \n\n%s\n\n IS a member of the following Group:\n\n%s\n\n",gbsMember,gbsGroup);
															delete [] pszBuffer;
															delete [] pszBuffer2;
															delete [] pszBuffer3;
															delete [] szPath;
															delete [] myPath;
															if (pDS) pDS->Release();
															return true;
														}
													else
														{
															BSTR bsMemberGUID = NULL;
															IDirectoryObject * pDOMember = NULL;
															hr = ADsOpenObject( gbsMember,pszBuffer, pszBuffer2, 
																	ADS_SECURE_AUTHENTICATION,IID_IDirectoryObject, (void**) &pDOMember);
															if (SUCCEEDED(hr))
																{
																	hr = GetObjectGuid(pDOMember,bsMemberGUID);
																	pDOMember->Release();
																	pDOMember  = NULL;
																	if (RecursiveIsMember(pIADsG,bsMemberGUID,gbsMember,true, pszBuffer, pszBuffer2))
																		{
																			delete [] pszBuffer;
																			delete [] pszBuffer2;
																			delete [] pszBuffer3;
																			delete [] szPath;
																			delete [] myPath;
																			if (pDS) pDS->Release();
																			return true;
																		}
																}
													}//else bmember
											}//ismember
									}//iadsgroup 
							}//Findgroup
							wprintf(L"USER not found in group\n");
							
						}//user
				}
		if (pDS) pDS->Release();
		}
		/*LOGFAILED(pszBuffer3,pszBuffer);*/
		delete [] pszBuffer;
		delete [] pszBuffer2;
		delete [] pszBuffer3;
		delete [] szPath;
		delete [] myPath;
		return false;
	}
	return false;
}
开发者ID:copilot-com,项目名称:CopilotVNC,代码行数:101,代码来源:ldapAuth.cpp


示例18: if

bool CPlayer::SendBattleGroundChat(ChatMsg msgtype, std::string message)
{
    // Select distance to broadcast to.
    float distance = sWorld.getConfig(CONFIG_FLOAT_LISTEN_RANGE_SAY);

    if (msgtype == CHAT_MSG_YELL)
        sWorld.getConfig(CONFIG_FLOAT_LISTEN_RANGE_YELL);
    else if (msgtype == CHAT_MSG_EMOTE)
        sWorld.getConfig(CONFIG_FLOAT_LISTEN_RANGE_TEXTEMOTE);

    BattleGround* pBattleGround = GetBattleGround();

    if (!pBattleGround || pBattleGround->isArena()) // Only fake chat in BG's. CFBG should not interfere with arenas.
        return false;

    for (auto& itr : pBattleGround->GetPlayers())
    {
        if (Player* pPlayer = sObjectMgr.GetPlayer(itr.first))
        {
            if (GetDistance2d(pPlayer->GetPositionX(), pPlayer->GetPositionY()) <= distance)
            {
                WorldPacket data(SMSG_MESSAGECHAT, 200);

                if (GetTeam() == pPlayer->GetTeam())
                    ChatHandler::BuildChatPacket(data, msgtype, message.c_str(), LANG_UNIVERSAL, GetChatTag(), GetObjectGuid(), GetName());
                else if (msgtype != CHAT_MSG_EMOTE)
                    ChatHandler::BuildChatPacket(data, msgtype, message.c_str(), pPlayer->GetOTeam() == ALLIANCE ? LANG_ORCISH : LANG_COMMON, GetChatTag(), GetObjectGuid(), GetName());

                pPlayer->GetSession()->SendPacket(&data);
            }
        }
    }
    return true;
}
开发者ID:kuramajssken001,项目名称:mangos-tbc,代码行数:34,代码来源:CFBG.cpp


示例19: SendObjectDeSpawnAnim

void DynamicObject::Delete()
{
    SendObjectDeSpawnAnim(GetObjectGuid());
    AddObjectToRemoveList();
}
开发者ID:ErYayo,项目名称:StrawberryCore,代码行数:5,代码来源:DynamicObject.cpp


示例20: AddToClientUpdateList

void Item::AddToClientUpdateList()
{
    if (Player* pPlayer = GetOwner())
        pPlayer->AddUpdateObject(GetObjectGuid());
}
开发者ID:120239197a,项目名称:SingleCore,代码行数:5,代码来源:Item.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetObjectInMap函数代码示例发布时间:2022-05-30
下一篇:
C++ GetObjectExtra函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap