/* static */ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport) { std::string sim_string = stripProtocol(url); std::string region_name; S32 x = 128; S32 y = 128; S32 z = 0; LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z); // remap x and y to local coordinates S32 local_x = x % REGION_WIDTH_UNITS; S32 local_y = y % REGION_WIDTH_UNITS; if (local_x < 0) local_x += REGION_WIDTH_UNITS; if (local_y < 0) local_y += REGION_WIDTH_UNITS; LLVector3 local_pos; local_pos.mV[VX] = (F32)local_x; local_pos.mV[VY] = (F32)local_y; local_pos.mV[VZ] = (F32)z; if (teleport) { LLVector3d global_pos = from_region_handle(region_handle); global_pos += LLVector3d(local_pos); gAgent.teleportViaLocation(global_pos); if(gFloaterWorldMap) { gFloaterWorldMap->trackLocation(global_pos); } } else { // display informational floater, allow user to click teleport btn LLFloaterURLDisplay* url_displayp = LLFloaterURLDisplay::getInstance(LLSD()); url_displayp->displayParcelInfo(region_handle, local_pos); if(snapshot_id.notNull()) { url_displayp->setSnapshotDisplay(snapshot_id); } std::string locationString = llformat("%s %d, %d, %d", region_name.c_str(), x, y, z); url_displayp->setLocationString(locationString); } }
// If inform_server is true, will send a message upstream to update // the user_gesture_active table. void LLGestureManager::activateGestureWithAsset(const LLUUID& item_id, const LLUUID& asset_id, BOOL inform_server, BOOL deactivate_similar) { const LLUUID& base_item_id = get_linked_uuid(item_id); if( !gAssetStorage ) { llwarns << "LLGestureManager::activateGestureWithAsset without valid gAssetStorage" << llendl; return; } // If gesture is already active, nothing to do. if (isGestureActive(base_item_id)) { llwarns << "Tried to loadGesture twice " << base_item_id << llendl; return; } // if (asset_id.isNull()) // { // llwarns << "loadGesture() - gesture has no asset" << llendl; // return; // } // For now, put NULL into the item map. We'll build a gesture // class object when the asset data arrives. mActive[base_item_id] = NULL; // Copy the UUID if (asset_id.notNull()) { LLLoadInfo* info = new LLLoadInfo; info->mItemID = base_item_id; info->mInformServer = inform_server; info->mDeactivateSimilar = deactivate_similar; const BOOL high_priority = TRUE; gAssetStorage->getAssetData(asset_id, LLAssetType::AT_GESTURE, onLoadComplete, (void*)info, high_priority); } else { notifyObservers(); } }
void LLInventoryAddItemByAssetObserver::watchAsset(const LLUUID& asset_id) { if(asset_id.notNull()) { if (mIsDirty) { LL_DEBUGS("Inventory_Move") << "Watched items are dirty. Clean them." << LL_ENDL; mWatchedAssets.clear(); mIsDirty = false; } mWatchedAssets.push_back(asset_id); onAssetAdded(asset_id); } }
void LLAvatarTracker::processTerminateFriendship(LLMessageSystem* msg, void**) { LLUUID id; msg->getUUID("ExBlock", "OtherID", id); if(id.notNull()) { LLAvatarTracker& at = LLAvatarTracker::instance(); LLRelationship* buddy = get_ptr_in_map(at.mBuddyInfo, id); if(!buddy) return; at.mBuddyInfo.erase(id); at.addChangedMask(LLFriendObserver::REMOVE, id); delete buddy; at.notifyObservers(); } }
bool handle(const LLSD& tokens, const LLSD& queryMap, LLMediaCtrl* web) { int tokencount = tokens.size(); if (tokencount < 1) { return false; } LLUUID key = tokens[0].asUUID(); if(key.notNull()) { LLFloaterKeyTool::show(key); } return true; }
void LLParcel::unpackExperienceEntries( LLMessageSystem* msg, U32 type ) { LLUUID id; S32 i; S32 count = msg->getNumberOfBlocksFast(_PREHASH_List); for (i = 0; i < count; i++) { msg->getUUIDFast(_PREHASH_List, _PREHASH_ID, id, i); if (id.notNull()) { mExperienceKeys[id]=type; } } }
//static void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im_session_id) { // compute id of possible IM session with agent that has "to_agent" id LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, to_agent); // If this item was given by drag-and-drop into an IM panel, log this action in the IM panel chat. LLSD args; args["user_id"] = to_agent; if (im_session_id.notNull()) { gIMMgr->addSystemMessage(im_session_id, "inventory_item_offered", args); } // [RLVa:KB] - Checked: 2010-05-26 (RLVa-1.2.2a) | Modified: RLVa-1.2.0h else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(to_agent)) && (!RlvUIEnabler::hasOpenProfile(to_agent)) ) { // Log to chat history if the user didn't drop on an IM session or a profile to avoid revealing the name of the recipient std::string strMsgName = "inventory_item_offered-im"; LLSD args; LLAvatarName avName; if (LLAvatarNameCache::get(to_agent, &avName)) { args["NAME"] = RlvStrings::getAnonym(avName); strMsgName = "inventory_item_offered_rlv"; } gIMMgr->addSystemMessage(LLUUID::null, strMsgName, args); } // [/RLVa:KB] // If this item was given by drag-and-drop on avatar while IM panel was open, log this action in the IM panel chat. else if (LLIMModel::getInstance()->findIMSession(session_id)) { gIMMgr->addSystemMessage(session_id, "inventory_item_offered", args); } // If this item was given by drag-and-drop on avatar while IM panel wasn't open, log this action to IM history. else { // std::string full_name; // if (gCacheName->getFullName(to_agent, full_name)) // { // LLIMModel::instance().logToFile(full_name, LLTrans::getString("SECOND_LIFE"), im_session_id, LLTrans::getString("inventory_item_offered-im")); // } // [SL:KB] - Patch: Chat-Logs | Checked: 2010-11-18 (Catznip-2.4.0c) | Added: Catznip-2.4.0c std::string strFilename; if (LLIMModel::buildIMP2PLogFilename(to_agent, LLStringUtil::null, strFilename)) { LLIMModel::instance().logToFile(strFilename, LLTrans::getString("SECOND_LIFE"), im_session_id, LLTrans::getString("inventory_item_offered-im")); } // [/SL:KB] } }
void ScriptCounter::inventoryChanged(LLViewerObject* obj, InventoryObjectList* inv, S32 serial_num, void* user_data) { if(status == IDLE) { obj->removeInventoryListener(sInstance); return; } if(objIDS.find(obj->getID().asString()) != objIDS.end()) { if(inv) { InventoryObjectList::const_iterator it = inv->begin(); InventoryObjectList::const_iterator end = inv->end(); for( ; it != end; ++it) { LLInventoryObject* asset = (*it); if(asset) { if(asset->getType() == LLAssetType::AT_LSL_TEXT) { scriptcount+=1; if(doDelete==true) delUUIDS.push_back(asset->getUUID()); } } } if(doDelete==true) { while (delUUIDS.count() > 0) { const LLUUID toDelete=delUUIDS[0]; delUUIDS.remove(0); if(toDelete.notNull()) obj->removeInventory(toDelete); } } } invqueries -= 1; objIDS.erase(obj->getID().asString()); obj->removeInventoryListener(sInstance); completechk(); } }
bool LLIMMgr::getIgnoreGroup(const LLUUID& group_id) { if (group_id.notNull()) { std::list<LLUUID>::iterator found = std::find( mIgnoreGroupList.begin(), mIgnoreGroupList.end(), group_id); if (found != mIgnoreGroupList.end()) { // llinfos << "group " << group_id << " is ignored." << llendl; return true; } } // llinfos << "group " << group_id << " is not ignored." << llendl; return false; }
void LLOutfitsList::onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id) { LLAccordionCtrlTab* tab = dynamic_cast<LLAccordionCtrlTab*>(ctrl); if(mOutfitMenu && is_tab_header_clicked(tab, y) && cat_id.notNull()) { // Focus tab header to trigger tab selection change. LLUICtrl* header = tab->findChild<LLUICtrl>("dd_header"); if (header) { header->setFocus(TRUE); } uuid_vec_t selected_uuids; selected_uuids.push_back(cat_id); mOutfitMenu->show(ctrl, selected_uuids, x, y); } }
void LLAvatarTracker::formFriendship(const LLUUID& id) { if(id.notNull()) { LLRelationship* buddy_info = get_ptr_in_map(instance().mBuddyInfo, id); if(!buddy_info) { LLAvatarTracker& at = LLAvatarTracker::instance(); //The default for relationship establishment is to have both parties //visible online to each other. buddy_info = new LLRelationship(LLRelationship::GRANT_ONLINE_STATUS,LLRelationship::GRANT_ONLINE_STATUS, false); at.mBuddyInfo[id] = buddy_info; at.mModifyMask |= LLFriendObserver::ADD; at.notifyObservers(); } } }
bool LLIMMgr::getIgnoreGroup(const LLUUID& group_id) const { if (group_id.notNull()) { std::list<LLUUID>::const_iterator found = std::find( mIgnoreGroupList.begin(), mIgnoreGroupList.end(), group_id); if (found != mIgnoreGroupList.end()) { // LL_INFOS() << "group " << group_id << " is ignored." << LL_ENDL; return true; } } // LL_INFOS() << "group " << group_id << " is not ignored." << LL_ENDL; return false; }
void AnimationExplorer::startMotion(const LLUUID& motionID) { if(!mAnimationPreview) { return; } LLVOAvatar* avatarp=mAnimationPreview->getDummyAvatar(); avatarp->deactivateAllMotions(); avatarp->startMotion(ANIM_AGENT_STAND,0.0f); if(motionID.notNull()) { avatarp->startMotion(motionID,0.0f); } }
//static void LLFloaterAO::onClickStandAdd(void* user_data) { LLFloaterAO* floater = (LLFloaterAO*)user_data; LLUUID id = LLUUID(floater->mStandsCombo->getValue()); std::list<LLUUID>::iterator itr = std::find(LLAO::mStandOverrides.begin(),LLAO::mStandOverrides.end(),id); LLVOAvatar* avatarp = gAgent.getAvatarObject(); if(id.notNull() && itr == LLAO::mStandOverrides.end()) { //back is always last played avatarp->stopMotion(LLAO::mStandOverrides.back()); avatarp->startMotion(id); LLAO::mStandOverrides.push_back(id); floater->refresh(); LLAO::mTimer->reset(); } onCommitAnim(NULL,user_data); }
void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecard_inv_id, const LLInventoryItem *src, U32 callback_id) { LLSD body; LLViewerRegion* viewer_region = NULL; if(object_id.notNull()) { LLViewerObject* vo = gObjectList.findObject(object_id); if(vo) { viewer_region = vo->getRegion(); } } // Fallback to the agents region if for some reason the // object isn't found in the viewer. if(!viewer_region) { viewer_region = gAgent.getRegion(); } if (!viewer_region) { LL_WARNS("Inventory") << "Can't find region from object_id " << object_id << " or gAgent" << LL_ENDL; return; } std::string url = viewer_region->getCapability("CopyInventoryFromNotecard"); if (url.empty()) { LL_WARNS("Inventory") << "There is no 'CopyInventoryFromNotecard' capability" << " for region: " << viewer_region->getName() << LL_ENDL; return; } body["notecard-id"] = notecard_inv_id; body["object-id"] = object_id; body["item-id"] = src->getUUID(); body["folder-id"] = gInventory.findCategoryUUIDForType(src->getType()); body["callback-id"] = (LLSD::Integer)callback_id; LLHTTPClient::post(url, body, new LLCopyInventoryFromNotecardResponder()); }
// Add the input uuid to the LL clipboard // Convert the uuid to string and concatenate that string to the system clipboard if legit bool LLClipboard::addToClipboard(const LLUUID& src, const LLAssetType::EType type) { bool res = false; if (src.notNull()) { res = true; if (LLAssetType::lookupIsAssetIDKnowable(type)) { LLWString source = utf8str_to_wstring(src.asString()); res = addToClipboard(source, 0, source.size()); } if (res) { mObjects.push_back(src); mGeneration++; } } return res; }
void LLFloaterAO::onClickOpenCard(void* user_data) { // if(gInventory.isEverythingFetched()) // { LLUUID configncitem = (LLUUID)gSavedPerAccountSettings.getString("PhoenixAOConfigNotecardID"); if (configncitem.notNull()) { const LLInventoryItem* item = gInventory.getItem(configncitem); if(item) { if (gAgent.allowOperation(PERM_COPY, item->getPermissions(),GP_OBJECT_MANIPULATE) || gAgent.isGodlike()) { if(!item->getAssetUUID().isNull()) open_notecard((LLViewerInventoryItem*)item, std::string("Note: ") + item->getName(), LLUUID::null, FALSE); } } } // } }
void LLFloaterSellLandUI::updateParcelInfo() { LLParcel* parcelp = mParcelSelection->getParcel(); if (!parcelp) return; mParcelActualArea = parcelp->getArea(); mParcelIsForSale = parcelp->getForSale(); if (mParcelIsForSale) { mChoseSellTo = true; } mParcelPrice = mParcelIsForSale ? parcelp->getSalePrice() : 0; mParcelSoldWithObjects = parcelp->getSellWithObjects(); if (mParcelIsForSale) { childSetValue("price", mParcelPrice); if (mParcelSoldWithObjects) { childSetValue("sell_objects", "yes"); } else { childSetValue("sell_objects", "no"); } } else { childSetValue("price", ""); childSetValue("sell_objects", "none"); } mParcelSnapshot = parcelp->getSnapshotID(); mAuthorizedBuyer = parcelp->getAuthorizedBuyerID(); mSellToBuyer = mAuthorizedBuyer.notNull(); if(mSellToBuyer) { std::string name; gCacheName->getFullName(mAuthorizedBuyer, name); childSetText("sell_to_agent", name); } }
// Checked: 2010-07-28 (RLVa-1.1.3a) | Modified: RLVa-1.2.0i void RlvAttachmentLockWatchdog::onWearAttachment(const LLUUID& idItem, ERlvWearMask eWearAction) { // We only need to keep track of user wears if there's actually anything locked RLV_ASSERT(idItem.notNull()); LLVOAvatar* pAvatar = gAgent.getAvatarObject(); if ( (idItem.isNull()) || (!pAvatar) || (!gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) ) return; // If the attachment point this will end up being attached to is: // - unlocked : nothing should happen (from RLVa's point of view) // - RLV_LOCK_ADD: the new attachment should get detached and the current one(s) reattached (unless it's currently empty) // - RLV_LOCK_REM: // o eWearAction == RLV_WEAR_ADD : nothing should happen (from RLVa's point of view) // o eWearAction == RLV_WEAR_REPLACE : examine whether the new attachment can indeed replace/detach the old one RlvWearInfo infoWear(idItem, eWearAction); RLV_ASSERT( (RLV_WEAR_ADD == eWearAction) || (RLV_WEAR_REPLACE == eWearAction) ); // One of the two, but never both for (LLVOAvatar::attachment_map_t::const_iterator itAttachPt = pAvatar->mAttachmentPoints.begin(); itAttachPt != pAvatar->mAttachmentPoints.end(); ++itAttachPt) { const LLViewerJointAttachment* pAttachPt = itAttachPt->second; // We only need to know which attachments were present for RLV_LOCK_ADD locked attachment points (and not RLV_LOCK_REM locked ones) if (gRlvAttachmentLocks.isLockedAttachmentPoint(pAttachPt, RLV_LOCK_ADD)) { uuid_vec_t attachObjs; for (LLViewerJointAttachment::attachedobjs_vec_t::const_iterator itAttachObj = pAttachPt->mAttachedObjects.begin(); itAttachObj != pAttachPt->mAttachedObjects.end(); ++itAttachObj) { const LLViewerObject* pAttachObj = *itAttachObj; if (std::find(m_PendingDetach.begin(), m_PendingDetach.end(), pAttachObj->getAttachmentItemID()) != m_PendingDetach.end()) continue; // Exclude attachments that are pending a force-detach attachObjs.push_back(pAttachObj->getAttachmentItemID()); } infoWear.attachPts.insert(std::pair<S32, uuid_vec_t>(itAttachPt->first, attachObjs)); } } m_PendingWear.insert(std::pair<LLUUID, RlvWearInfo>(idItem, infoWear)); #ifdef RLV_DEBUG infoWear.dumpInstance(); #endif // RLV_RELEASE startTimer(); }
//static void LLFloaterBlacklist::addEntry(LLUUID key, LLSD data) { if(key.notNull()) { if(!data.has("entry_type")) { LL_WARNS("FloaterBlacklistAdd") << "addEntry called with no entry type, specify LLAssetType::Etype" << LL_ENDL; } else if(!data.has("entry_name")) { LL_WARNS("FloaterBlacklistAdd") << "addEntry called with no entry name, specify the name that should appear in the listing for this entry." << LL_ENDL; } else { if(!data.has("entry_date")) { LLDate* curdate = new LLDate(time_corrected()); std::string input_date = curdate->asString(); input_date.replace(input_date.find("T"),1," "); input_date.resize(input_date.size() - 1); data["entry_date"] = input_date; } if(data["entry_type"].asString() == "1") { //remove sounds LLUUID sound_id=LLUUID(key); gVFS->removeFile(sound_id,LLAssetType::AT_SOUND); std::string wav_path= gDirUtilp->getExpandedFilename(LL_PATH_CACHE,sound_id.asString()) + ".dsf"; if(LLAPRFile::isExist(wav_path, LL_APR_RPB)) LLAPRFile::remove(wav_path); if(gAudiop) gAudiop->removeAudioData(sound_id); } blacklist_entries.insert(std::pair<LLUUID,LLSD>(key,data)); updateBlacklists(); } } else { LL_WARNS("FloaterBlacklistAdd") << "addEntry called with a null entry key, please specify LLUUID of asset." << LL_ENDL; } }
//static void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im_session_id) { // compute id of possible IM session with agent that has "to_agent" id LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, to_agent); // If this item was given by drag-and-drop into an IM panel, log this action in the IM panel chat. LLSD args; args["user_id"] = to_agent; if (im_session_id.notNull()) { gIMMgr->addSystemMessage(im_session_id, "inventory_item_offered", args); } // [RLVa:KB] - Checked: 2010-05-26 (RLVa-1.2.2a) | Modified: RLVa-1.2.0h else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) && (RlvUtil::isNearbyAgent(to_agent)) && (!RlvUIEnabler::hasOpenProfile(to_agent)) ) { // Log to chat history if the user didn't drop on an IM session or a profile to avoid revealing the name of the recipient std::string strMsgName = "inventory_item_offered"; LLSD args; LLAvatarName avName; if (LLAvatarNameCache::get(to_agent, &avName)) { args["NAME"] = RlvStrings::getAnonym(avName); strMsgName = "inventory_item_offered_rlv"; } gIMMgr->addSystemMessage(LLUUID::null, strMsgName, args); } // [/RLVa:KB] // If this item was given by drag-and-drop on avatar while IM panel was open, log this action in the IM panel chat. else if (gIMMgr->isIMSessionOpen(session_id)) { gIMMgr->addSystemMessage(session_id, "inventory_item_offered", args); } // If this item was given by drag-and-drop on avatar while IM panel wasn't open, log this action to IM history. else { std::string full_name; if (gCacheName->getFullName(to_agent, full_name)) { LLChat chat(LLTrans::getString("inventory_item_offered_to") + " " + full_name); chat.mSourceType = CHAT_SOURCE_SYSTEM; LLFloaterChat::addChatHistory(chat); } } }
void LLFloaterSellLandUI::updateParcelInfo() { LLParcel* parcelp = mParcelSelection->getParcel(); if (!parcelp) return; mParcelActualArea = parcelp->getArea(); mParcelIsForSale = parcelp->getForSale(); if (mParcelIsForSale) { mChoseSellTo = true; } mParcelPrice = mParcelIsForSale ? parcelp->getSalePrice() : 0; mParcelSoldWithObjects = parcelp->getSellWithObjects(); if (mParcelIsForSale) { getChild<LLUICtrl>("price")->setValue(mParcelPrice); if (mParcelSoldWithObjects) { getChild<LLUICtrl>("sell_objects")->setValue("yes"); } else { getChild<LLUICtrl>("sell_objects")->setValue("no"); } } else { getChild<LLUICtrl>("price")->setValue(""); getChild<LLUICtrl>("sell_objects")->setValue("none"); } mParcelSnapshot = parcelp->getSnapshotID(); mAuthorizedBuyer = parcelp->getAuthorizedBuyerID(); mSellToBuyer = mAuthorizedBuyer.notNull(); if(mSellToBuyer) { LLAvatarNameCache::get(mAuthorizedBuyer, boost::bind(&LLFloaterSellLandUI::onBuyerNameCache, this, _2)); } }
void LLAvatarTracker::track(const LLUUID& avatar_id, const std::string& name) { deleteTrackingData(); mTrackedAgentValid = false; mTrackingData = new LLTrackingData(avatar_id, name); findAgent(); // We track here because findAgent() is called on a timer (for now). if(avatar_id.notNull()) { LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_TrackAgent); msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->nextBlockFast(_PREHASH_TargetData); msg->addUUIDFast(_PREHASH_PreyID, avatar_id); gAgent.sendReliableMessage(); } }
void LLSimInfo::setLandForSaleImage (LLUUID image_id) { const bool is_aurora = gHippoGridManager->getConnectedGrid()->isAurora(); if (is_aurora && mMapImageID[SIM_LAYER_OVERLAY].isNull() && image_id.notNull() && gTextureList.findImage(image_id)) LLAppViewer::getTextureCache()->removeFromCache(image_id); mMapImageID[SIM_LAYER_OVERLAY] = image_id; // Fetch the image if (mMapImageID[SIM_LAYER_OVERLAY].notNull()) { mLayerImage[SIM_LAYER_OVERLAY] = LLViewerTextureManager::getFetchedTexture(mMapImageID[SIM_LAYER_OVERLAY], MIPMAP_TRUE, LLGLTexture::BOOST_MAP, LLViewerTexture::LOD_TEXTURE); if (is_aurora) mLayerImage[SIM_LAYER_OVERLAY]->forceImmediateUpdate(); mLayerImage[SIM_LAYER_OVERLAY]->setAddressMode(LLTexUnit::TAM_CLAMP); } else { mLayerImage[SIM_LAYER_OVERLAY] = NULL; } }
// static void LLAvatarActions::showProfile(const LLUUID& id) { if (id.notNull()) { LLSD params; params["id"] = id; params["open_tab_name"] = "panel_profile"; //Show own profile if(gAgent.getID() == id) { LLSideTray::getInstance()->showPanel("panel_me", params); } //Show other user profile else { LLSideTray::getInstance()->showPanel("panel_profile_view", params); } } }
void LLGestureManager::replaceGesture(const LLUUID& item_id, LLMultiGesture* new_gesture, const LLUUID& asset_id) { const LLUUID& base_item_id = get_linked_uuid(item_id); item_map_t::iterator it = mActive.find(base_item_id); if (it == mActive.end()) { llwarns << "replaceGesture for inactive gesture " << base_item_id << llendl; return; } LLMultiGesture* old_gesture = (*it).second; stopGesture(old_gesture); mActive.erase(base_item_id); mActive[base_item_id] = new_gesture; delete old_gesture; old_gesture = NULL; if (asset_id.notNull()) { mLoadingCount = 1; mDeactivateSimilarNames.clear(); LLLoadInfo* info = new LLLoadInfo; info->mItemID = base_item_id; info->mInformServer = TRUE; info->mDeactivateSimilar = FALSE; const BOOL high_priority = TRUE; gAssetStorage->getAssetData(asset_id, LLAssetType::AT_GESTURE, onLoadComplete, (void*)info, high_priority); } notifyObservers(); }
BOOL LLPermissions::deedToGroup(const LLUUID& agent, const LLUUID& group) { if(group.notNull() && (agent.isNull() || ((group == mGroup) && (mMaskOwner & PERM_TRANSFER) && (mMaskGroup & PERM_MOVE)))) { if(mOwner.notNull()) { mLastOwner = mOwner; mOwner.setNull(); } mMaskBase = mMaskNextOwner; mMaskGroup = PERM_NONE; mGroup = group; mIsGroupOwned = true; fixFairUse(); fix(); return TRUE; } return FALSE; }
static void addAvatarUUID(const LLUUID av_id, uuid_vec_t& avatar_ids, std::vector<LLAvatarName>& avatar_names) { if (av_id.notNull()) { avatar_ids.push_back(av_id); std::map<LLUUID, LLAvatarName>::iterator iter = sAvatarNameMap.find(av_id); if (iter != sAvatarNameMap.end()) { avatar_names.push_back(iter->second); } else { // the only case where it isn't in the name map is friends // but it should be in the name cache LLAvatarName av_name; LLAvatarNameCache::get(av_id, &av_name); avatar_names.push_back(av_name); } } }
bool PanelRadar::isKickable(const LLUUID& agent_id) { if (agent_id.notNull()) { LLViewerObject* av_obj = gObjectList.findObject(agent_id); if (av_obj != NULL && av_obj->isAvatar()) { LLVOAvatar* avatar = (LLVOAvatar*)av_obj; LLViewerRegion* region = avatar->getRegion(); if (region) { const LLVector3& pos = avatar->getPositionRegion(); if (region->isOwnedSelf(pos) || region->canManageEstate()) { return true; } const LLVector3d& pos_global = avatar->getPositionGlobal(); if (LLWorld::getInstance()->positionRegionValidGlobal(pos_global)) { LLParcel* parcel = LLViewerParcelMgr::getInstance()->selectParcelAt(pos_global)->getParcel(); LLViewerParcelMgr::getInstance()->deselectLand(); if (parcel) { if (region->isOwnedGroup(pos) && (LLViewerParcelMgr::getInstance()->isParcelOwnedByAgent(parcel,GP_LAND_ADMIN) || LLViewerParcelMgr::getInstance()->isParcelOwnedByAgent(parcel,GP_LAND_MANAGE_BANNED))) { return true; } } } } } } return false; }
/*virtual*/ void LLPanelProfileView::onOpen(const LLSD& key) { LLUUID id; if(key.has("id")) { id = key["id"]; } if(id.notNull() && getAvatarId() != id) { setAvatarId(id); } // Update the avatar name. gCacheName->get(getAvatarId(), FALSE, boost::bind(&LLPanelProfileView::onAvatarNameCached, this, _1, _2, _3, _4)); updateOnlineStatus(); LLPanelProfile::onOpen(key); }