这篇教程C++ GetObjectGuid函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetObjectGuid函数的典型用法代码示例。如果您正苦于以下问题:C++ GetObjectGuid函数的具体用法?C++ GetObjectGuid怎么用?C++ GetObjectGuid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetObjectGuid函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: DETAIL_FILTER_LOGvoid 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,
示例2: GetMapvoid 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,
示例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,
示例4: DETAIL_FILTER_LOGvoid 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,
示例5: MANGOS_ASSERTvoid 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,
示例6: dataWorldPacket 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,
示例7: datavoid 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,
示例8: MANGOS_ASSERTvoid 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,
示例9: JoinBattleGroundvoid 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,
示例10: datavoid 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,
示例11: GetBattleGroundvoid 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,
示例12: datavoid 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,
示例13: ProcessEventId_event_test_of_endurancebool 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,
示例14: CanBeTradedbool 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,
示例15: SendObjectDeSpawnAnimvoid 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,
示例16: CanBeTradedbool 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,
示例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,
示例18: ifbool 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,
示例19: SendObjectDeSpawnAnimvoid DynamicObject::Delete(){ SendObjectDeSpawnAnim(GetObjectGuid()); AddObjectToRemoveList();}
开发者ID:ErYayo,项目名称:StrawberryCore,代码行数:5,
示例20: AddToClientUpdateListvoid Item::AddToClientUpdateList(){ if (Player* pPlayer = GetOwner()) pPlayer->AddUpdateObject(GetObjectGuid());}
开发者ID:120239197a,项目名称:SingleCore,代码行数:5,
示例21: StartBossEncounter void StartBossEncounter(uint8 uiBoss, bool bForceRespawn = true) { Creature* boss = nullptr; switch (uiBoss) { case BOSS_MORAGG: HandleGameObject(GetObjectGuid(DATA_MORAGG_CELL), bForceRespawn); boss = GetCreature(DATA_MORAGG); if (boss) boss->GetMotionMaster()->MovePoint(0, BossStartMove1); break; case BOSS_EREKEM: HandleGameObject(GetObjectGuid(DATA_EREKEM_CELL), bForceRespawn); HandleGameObject(GetObjectGuid(DATA_EREKEM_LEFT_GUARD_CELL), bForceRespawn); HandleGameObject(GetObjectGuid(DATA_EREKEM_RIGHT_GUARD_CELL), bForceRespawn); boss = GetCreature(DATA_EREKEM); if (boss) boss->GetMotionMaster()->MovePoint(0, BossStartMove2); if (Creature* pGuard1 = instance->GetCreature(uiErekemGuard[0])) { if (bForceRespawn) pGuard1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NON_ATTACKABLE); else pGuard1->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NON_ATTACKABLE); pGuard1->GetMotionMaster()->MovePoint(0, BossStartMove21); } if (Creature* pGuard2 = instance->GetCreature(uiErekemGuard[1])) { if (bForceRespawn) pGuard2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NON_ATTACKABLE); else pGuard2->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NON_ATTACKABLE); pGuard2->GetMotionMaster()->MovePoint(0, BossStartMove22); } break; case BOSS_ICHORON: HandleGameObject(GetObjectGuid(DATA_ICHORON_CELL), bForceRespawn); boss = GetCreature(DATA_ICHORON); if (boss) boss->GetMotionMaster()->MovePoint(0, BossStartMove3); break; case BOSS_LAVANTHOR: HandleGameObject(GetObjectGuid(DATA_LAVANTHOR_CELL), bForceRespawn); boss = GetCreature(DATA_LAVANTHOR); if (boss) boss->GetMotionMaster()->MovePoint(0, BossStartMove4); break; case BOSS_XEVOZZ: HandleGameObject(GetObjectGuid(DATA_XEVOZZ_CELL), bForceRespawn); boss = GetCreature(DATA_XEVOZZ); if (boss) boss->GetMotionMaster()->MovePoint(0, BossStartMove5); break; case BOSS_ZURAMAT: HandleGameObject(GetObjectGuid(DATA_ZURAMAT_CELL), bForceRespawn); boss = GetCreature(DATA_ZURAMAT); if (boss) boss->GetMotionMaster()->MovePoint(0, BossStartMove6); break; } // generic boss state changes if (boss) { boss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE); boss->SetReactState(REACT_AGGRESSIVE); if (!bForceRespawn) { if (boss->isDead()) { // respawn but avoid to be looted again boss->Respawn(); boss->RemoveLootMode(1); } boss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE); uiWaveCount = 0; } } }
开发者ID:Aravu,项目名称:Talador-Project,代码行数:84,
示例22: UpdateSplineMovementvoid MOTransport::Update(uint32 update_diff, uint32 p_time){ UpdateSplineMovement(p_time); if (!movespline->Finalized()) return; if (m_WayPoints.size() <= 1) return; bool anchorage = !m_anchorageTimer.Passed(); if (anchorage) m_anchorageTimer.Update(update_diff); m_timer = WorldTimer::getMSTime() % GetPeriod(true); while (((m_timer - m_curr->first) % m_pathTime) > ((m_next->first - m_curr->first) % m_pathTime)) { DoEventIfAny(*m_curr,true); MoveToNextWayPoint(); // delay detect if (m_next->second.delay > 0) { m_anchorageTimer.SetInterval(m_next->first - m_next->second.delay); m_anchorageTimer.Reset(); } DoEventIfAny(*m_curr,false); if (!SetPosition(m_curr->second.loc, m_curr->second.teleport)) { if (m_curr->second.loc.GetMapId() == m_next->second.loc.GetMapId() && !m_curr->second.teleport && m_anchorageTimer.Passed() && !(m_curr->second.loc == m_next->second.loc)) { // FIXME - use MovementGenerator instead this DEBUG_FILTER_LOG(LOG_FILTER_TRANSPORT_MOVES,"Transport::Update %s start spline movement to %f %f %f",GetObjectGuid().GetString().c_str(), m_next->second.loc.x, m_next->second.loc.y, m_next->second.loc.z); Movement::MoveSplineInit<GameObject*> init(*this); init.MoveTo((Vector3)m_next->second.loc); init.SetVelocity(GetGOInfo()->moTransport.moveSpeed); init.Launch(); } } m_nextNodeTime = m_curr->first; DEBUG_FILTER_LOG(LOG_FILTER_TRANSPORT_MOVES, "Transport::Update %s moved to %f %f %f %d %s, next keyframe %u", GetObjectGuid().GetString().c_str(), m_curr->second.loc.x, m_curr->second.loc.y, m_curr->second.loc.z, m_curr->second.loc.GetMapId(), m_curr == m_WayPoints.begin() ? "begin move" : "", m_nextNodeTime); }}
开发者ID:beyourself,项目名称:RustEmu-Core,代码行数:49,
示例23: RemoveFromClientUpdateListvoid Item::RemoveFromClientUpdateList(){ if (Player* pPlayer = GetOwner()) pPlayer->RemoveUpdateObject(GetObjectGuid());}
开发者ID:120239197a,项目名称:SingleCore,代码行数:5,
示例24: DEBUG_FILTER_LOG// Return true, only if transport has correct position!bool MOTransport::SetPosition(WorldLocation const& loc, bool teleport){ // prevent crash when a bad coord is sent by the client if (!MaNGOS::IsValidMapCoord(loc.getX(), loc.getY(), loc.getZ(), loc.getO())) { DEBUG_FILTER_LOG(LOG_FILTER_TRANSPORT_MOVES, "Transport::SetPosition(%f, %f, %f, %f, %d) bad coordinates for transport %s!", loc.getX(), loc.getY(), loc.getZ(), loc.getO(), teleport, GetName()); return false; } if (teleport || GetMapId() != loc.GetMapId()) { Map* oldMap = GetMap(); Map* newMap = sMapMgr.CreateMap(loc.GetMapId(), this); if (!newMap) { sLog.outError("Transport::SetPosition cannot create map %u for transport %s!", loc.GetMapId(), GetName()); return false; } if (oldMap != newMap) { // Transport inserted in current map ActiveObjects list if (!GetTransportKit()->GetPassengers().empty()) { DEBUG_FILTER_LOG(LOG_FILTER_TRANSPORT_MOVES,"Transport::SetPosition %s notify passengers (count " SIZEFMTD ") for change map from %u to %u",GetObjectGuid().GetString().c_str(), GetTransportKit()->GetPassengers().size(), GetPosition().GetMapId(), loc.GetMapId()); GetTransportKit()->CallForAllPassengers(NotifyMapChangeBegin(oldMap, GetPosition(), loc)); } oldMap->Remove((GameObject*)this, false); SkipUpdate(true); SetMap(newMap); Relocate(loc); SetLocationMapId(loc.GetMapId()); SetLocationInstanceId(loc.GetInstanceId()); newMap->Add((GameObject*)this); // Transport inserted in current map ActiveObjects list if (!GetTransportKit()->GetPassengers().empty()) { DEBUG_FILTER_LOG(LOG_FILTER_TRANSPORT_MOVES,"Transport::SetPosition %s notify passengers (count " SIZEFMTD ") for finished change map to %u",GetObjectGuid().GetString().c_str(), GetTransportKit()->GetPassengers().size(), loc.GetMapId()); GetTransportKit()->CallForAllPassengers(NotifyMapChangeEnd(newMap,loc)); } DEBUG_FILTER_LOG(LOG_FILTER_TRANSPORT_MOVES, "Transport::SetPosition %s teleported to (%f, %f, %f, %f)", GetObjectGuid().GetString().c_str(), loc.x, loc.y, loc.z, loc.orientation); return true; } else if (!(GetPosition() == loc)) GetMap()->Relocation((GameObject*)this, loc); } else if (!(GetPosition() == loc)) GetMap()->Relocation((GameObject*)this, loc); return false;}
开发者ID:beyourself,项目名称:RustEmu-Core,代码行数:61,
示例25: switchvoid DynamicObject::OnPersistentAreaAuraEnd(){ switch (m_spellId) { case 30632: // Magtheridon - Debris if (Unit* owner = GetCaster()) owner->CastSpell(nullptr, 30631, TRIGGERED_OLD_TRIGGERED, nullptr, nullptr, GetObjectGuid()); break; case 32286: // Shirakk - Focus fire if (Unit* owner = GetCaster()) owner->CastSpell(nullptr, 32301, TRIGGERED_OLD_TRIGGERED, nullptr, nullptr, GetObjectGuid()); break; }}
开发者ID:Phatcat,项目名称:mangos-wotlk,代码行数:14,
示例26: RecursiveIsMemberBOOL RecursiveIsMember(IADsGroup * pADsGroup,LPWSTR pwszMemberGUID,LPWSTR pwszMemberPath, BOOL bVerbose, LPOLESTR pwszUser, LPOLESTR pwszPassword){ HRESULT hr = S_OK; // COM Result Code IADsMembers * pADsMembers = NULL; // Ptr to Members of the IADsGroup BOOL fContinue = TRUE; // Looping Variable IEnumVARIANT * pEnumVariant = NULL; // Ptr to the Enum variant IUnknown * pUnknown = NULL; // IUnknown for getting the ENUM initially VARIANT VariantArray[FETCH_NUM]; // Variant array for temp holding returned data ULONG ulElementsFetched = NULL; // Number of elements retrieved BSTR bsGroupPath = NULL; BOOL bRet = FALSE; if(!pADsGroup || !pwszMemberGUID || !pwszMemberPath) { return FALSE; } // Get the path of the object passed in hr = pADsGroup->get_ADsPath(&bsGroupPath); if (!SUCCEEDED(hr)) return hr; if (bVerbose) { WCHAR pwszOutput[2048]; wsprintf(pwszOutput,L"Checking the Group:/n/n%s/n/n for the member:/n/n%s/n/n",bsGroupPath,pwszMemberPath); PrintBanner(pwszOutput); } // Get an interface pointer to the IADsCollection of members hr = pADsGroup->Members(&pADsMembers); if (SUCCEEDED(hr)) { // Query the IADsCollection of members for a new ENUM Interface // Be aware that the enum comes back as an IUnknown * hr = pADsMembers->get__NewEnum(&pUnknown); if (SUCCEEDED(hr)) { // QI the IUnknown * for an IEnumVARIANT interface hr = pUnknown->QueryInterface(IID_IEnumVARIANT, (void **)&pEnumVariant); if (SUCCEEDED(hr)) { // While have not hit errors or end of data.... while (fContinue) { ulElementsFetched = 0; // Get a "batch" number of group members-number of rows specified by FETCH_NUM hr = ADsEnumerateNext(pEnumVariant, FETCH_NUM, VariantArray, &ulElementsFetched); if (ulElementsFetched ) { // Loop through the current batch-printing the path for each member. for (ULONG i = 0; i < ulElementsFetched; i++ ) { IDispatch * pDispatch = NULL; // ptr for holding dispath of element BSTR bstrCurrentPath = NULL; // Holds path of object BSTR bstrGuidCurrent = NULL; // Holds path of object IDirectoryObject * pIDOCurrent = NULL;// Holds the current object // Get the dispatch ptr for the variant pDispatch = VariantArray[i].pdispVal;// assert(HAS_BIT_STYLE(VariantArray[i].vt,VT_DISPATCH)); // Get the IADs interface for the "member" of this group hr = pDispatch->QueryInterface(IID_IDirectoryObject, (VOID **) &pIDOCurrent ) ; if (SUCCEEDED(hr)) { // Get the GUID for the current object hr = GetObjectGuid(pIDOCurrent,bstrGuidCurrent); if (FAILED(hr)) return hr; IADs * pIADsCurrent = NULL; // Retrieve the IADs Interface for the current object hr = pIDOCurrent->QueryInterface(IID_IADs,(void**)&pIADsCurrent); if (FAILED(hr)) return hr; // Get the ADsPath property for this member hr = pIADsCurrent->get_ADsPath(&bstrCurrentPath); if (SUCCEEDED(hr)) { if (bVerbose) wprintf(L"Comparing:/n/n%s/nWITH:/n%s/n/n",bstrGuidCurrent,pwszMemberGUID); // Verify that the member of this group is Equal to passed. if (_wcsicmp(bstrGuidCurrent,pwszMemberGUID)==0) { if (bVerbose) wprintf(L"!!!!!Object:/n/n%s/n/nIs a member of/n/n%s/n/n",pwszMemberPath,bstrGuidCurrent); //.........这里部分代码省略.........
开发者ID:copilot-com,项目名称:CopilotVNC,代码行数:101,
示例27: GetGameObjectGameObject* InstanceScript::GetGameObject(uint32 type){ return instance->GetGameObject(GetObjectGuid(type));}
开发者ID:Refuge89,项目名称:TrinityCore,代码行数:4,
示例28: GetCreatureCreature* InstanceScript::GetCreature(uint32 type){ return instance->GetCreature(GetObjectGuid(type));}
开发者ID:Refuge89,项目名称:TrinityCore,代码行数:4,
示例29: GetObjectGuidObjectGuid InstanceScript::GetGuidData(uint32 type) const{ return GetObjectGuid(type);}
开发者ID:Refuge89,项目名称:TrinityCore,代码行数:4,
注:本文中的GetObjectGuid函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetObjectInMap函数代码示例 C++ GetObjectExtra函数代码示例 |