本文整理汇总了C++中LLMessageSystem::addU32方法的典型用法代码示例。如果您正苦于以下问题:C++ LLMessageSystem::addU32方法的具体用法?C++ LLMessageSystem::addU32怎么用?C++ LLMessageSystem::addU32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLMessageSystem
的用法示例。
在下文中一共展示了LLMessageSystem::addU32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setLandmarkVisited
void LLTracker::setLandmarkVisited()
{
// poke the inventory item
if (!mTrackedLandmarkItemID.isNull())
{
LLInventoryItem* i = gInventory.getItem( mTrackedLandmarkItemID );
LLViewerInventoryItem* item = (LLViewerInventoryItem*)i;
if ( item
&& !(item->getFlags()&LLInventoryItem::II_FLAGS_LANDMARK_VISITED))
{
U32 flags = item->getFlags();
flags |= LLInventoryItem::II_FLAGS_LANDMARK_VISITED;
item->setFlags(flags);
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("ChangeInventoryItemFlags");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("InventoryData");
msg->addUUID("ItemID", mTrackedLandmarkItemID);
msg->addU32("Flags", flags);
gAgent.sendReliableMessage();
LLInventoryModel::LLCategoryUpdate up(item->getParentUUID(), 0);
gInventory.accountForUpdate(up);
// need to communicate that the icon needs to change...
gInventory.addChangedMask(LLInventoryObserver::INTERNAL, item->getUUID());
gInventory.notifyObservers();
}
}
}
示例2: deactivateGesture
void LLGestureMgr::deactivateGesture(const LLUUID& item_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())
{
LL_WARNS() << "deactivateGesture for inactive gesture " << base_item_id << LL_ENDL;
return;
}
// mActive owns this gesture pointer, so clean up memory.
LLMultiGesture* gesture = (*it).second;
// Can be NULL gestures in the map
if (gesture)
{
stopGesture(gesture);
delete gesture;
gesture = NULL;
}
mActive.erase(it);
gInventory.addChangedMask(LLInventoryObserver::LABEL, base_item_id);
// Inform the database of this change
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("DeactivateGestures");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->addU32("Flags", 0x0);
msg->nextBlock("Data");
msg->addUUID("ItemID", base_item_id);
msg->addU32("GestureFlags", 0x0);
gAgent.sendReliableMessage();
LLAppearanceMgr::instance().removeCOFItemLinks(base_item_id);
notifyObservers();
}
示例3: deactivateGesture
void LLGestureManager::deactivateGesture(const LLUUID& item_id)
{
item_map_t::iterator it = mActive.find(item_id);
if (it == mActive.end())
{
llwarns << "deactivateGesture for inactive gesture " << item_id << llendl;
return;
}
// mActive owns this gesture pointer, so clean up memory.
LLMultiGesture* gesture = (*it).second;
// Can be NULL gestures in the map
if (gesture)
{
stopGesture(gesture);
delete gesture;
gesture = NULL;
}
mActive.erase(it);
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
// Inform the database of this change
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("DeactivateGestures");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->addU32("Flags", 0x0);
msg->nextBlock("Data");
msg->addUUID("ItemID", item_id);
msg->addU32("GestureFlags", 0x0);
gAgent.sendReliableMessage();
notifyObservers();
}
示例4: updateAdd
void LLMuteList::updateAdd(const LLMute& mute)
{
// Update the database
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_UpdateMuteListEntry);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_MuteData);
msg->addUUIDFast(_PREHASH_MuteID, mute.mID);
msg->addStringFast(_PREHASH_MuteName, mute.mName);
msg->addS32("MuteType", mute.mType);
msg->addU32("MuteFlags", mute.mFlags);
gAgent.sendReliableMessage();
mIsLoaded = TRUE; // why is this here? -MG
}
示例5: finishKick
// static
void LLPanelGridTools::finishKick(S32 option, void* userdata)
{
LLPanelGridTools* self = (LLPanelGridTools*) userdata;
if (option == 0)
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_GodKickUser);
msg->nextBlockFast(_PREHASH_UserInfo);
msg->addUUIDFast(_PREHASH_GodID, gAgent.getID());
msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_AgentID, LL_UUID_ALL_AGENTS );
msg->addU32("KickFlags", KICK_FLAGS_DEFAULT );
msg->addStringFast(_PREHASH_Reason, self->mKickMessage.c_str() );
gAgent.sendReliableMessage();
}
}
示例6: handleUnfreeze
bool LLAvatarActions::handleUnfreeze(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
std::string text = response["message"].asString();
if (option == 0)
{
LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID();
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_GodKickUser);
msg->nextBlockFast(_PREHASH_UserInfo);
msg->addUUIDFast(_PREHASH_GodID, gAgent.getID() );
msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_AgentID, avatar_id );
msg->addU32("KickFlags", KICK_FLAGS_UNFREEZE );
msg->addStringFast(_PREHASH_Reason, text );
gAgent.sendReliableMessage();
}
return false;
}
示例7: finishKick
// static
bool LLPanelGridTools::finishKick(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
if (option == 0)
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_GodKickUser);
msg->nextBlockFast(_PREHASH_UserInfo);
msg->addUUIDFast(_PREHASH_GodID, gAgent.getID());
msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_AgentID, LL_UUID_ALL_AGENTS );
msg->addU32("KickFlags", KICK_FLAGS_DEFAULT );
msg->addStringFast(_PREHASH_Reason, notification["payload"]["kick_message"].asString());
gAgent.sendReliableMessage();
}
return false;
}
示例8: updateAdd
void LLMuteList::updateAdd(const LLMute& mute)
{
// External mutes (e.g. Avaline callers) are local only, don't send them to the server.
if (mute.mType == LLMute::EXTERNAL)
{
return;
}
// Update the database
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_UpdateMuteListEntry);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_MuteData);
msg->addUUIDFast(_PREHASH_MuteID, mute.mID);
msg->addStringFast(_PREHASH_MuteName, mute.mName);
msg->addS32("MuteType", mute.mType);
msg->addU32("MuteFlags", mute.mFlags);
gAgent.sendReliableMessage();
mIsLoaded = TRUE; // why is this here? -MG
}
示例9: send_eject
static void send_eject(const LLUUID& avatar_id, bool ban)
{
LLMessageSystem* msg = gMessageSystem;
LLVOAvatar* avatarp = gObjectList.findAvatar(avatar_id);
if (avatarp && avatarp->getRegion())
{
U32 flags = 0x0;
if (ban)
{
// eject and add to ban list
flags |= 0x1;
}
msg->newMessage("EjectUser");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("Data");
msg->addUUID("TargetID", avatar_id);
msg->addU32("Flags", flags);
msg->sendReliable( avatarp->getRegion()->getHost());
}
}
示例10: send_freeze
static void send_freeze(const LLUUID& avatar_id, bool freeze)
{
U32 flags = 0x0;
if (!freeze)
{
// unfreeze
flags |= 0x1;
}
LLMessageSystem* msg = gMessageSystem;
LLVOAvatar* avatarp = gObjectList.findAvatar(avatar_id);
if (avatarp && avatarp->getRegion())
{
msg->newMessage("FreezeUser");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("Data");
msg->addUUID("TargetID", avatar_id);
msg->addU32("Flags", flags);
msg->sendReliable( avatarp->getRegion()->getHost());
}
}
示例11: sendFreeze
// static
void PanelRadar::sendFreeze(const LLUUID& avatar_id, bool freeze)
{
U32 flags = 0x0;
if (!freeze)
{
// unfreeze
flags |= 0x1;
}
LLMessageSystem* msg = gMessageSystem;
LLViewerObject* avatar = gObjectList.findObject(avatar_id);
if (avatar)
{
msg->newMessage("FreezeUser");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("Data");
msg->addUUID("TargetID", avatar_id );
msg->addU32("Flags", flags );
msg->sendReliable( avatar->getRegion()->getHost() );
}
}
示例12: performQuery
void LLPanelDirLand::performQuery()
{
LLMessageSystem* msg = gMessageSystem;
setupNewSearch();
// We could change the UI to allow arbitrary combinations of these options
U32 search_type = ST_ALL;
const std::string& type = childGetValue("type").asString();
if(!type.empty())
{
if (FIND_AUCTION == type) search_type = ST_AUCTION;
else if(FIND_MAINLANDSALES == type) search_type = ST_MAINLAND;
else if(FIND_ESTATESALES == type) search_type = ST_ESTATE;
}
U32 query_flags = 0x0;
if (gAgent.mAccess <= SIM_ACCESS_PG) query_flags |= DFQ_PG_SIMS_ONLY;
const std::string& rating = childGetValue("rating").asString();
if (rating == PG_ONLY)
{
query_flags |= DFQ_PG_SIMS_ONLY;
}
else if (rating == MATURE_ONLY)
{
query_flags |= DFQ_MATURE_SIMS_ONLY;
}
LLScrollListCtrl* list = (LLScrollListCtrl*)getChildByName("results");
if (list)
{
std::string sort_name = list->getSortColumnName();
BOOL sort_asc = list->getSortAscending();
if (sort_name == "name")
{
query_flags |= DFQ_NAME_SORT;
}
else if (sort_name == "price")
{
query_flags |= DFQ_PRICE_SORT;
}
else if (sort_name == "per_meter")
{
query_flags |= DFQ_PER_METER_SORT;
}
else if (sort_name == "area")
{
query_flags |= DFQ_AREA_SORT;
}
if (sort_asc)
{
query_flags |= DFQ_SORT_ASC;
}
}
if (childGetValue("pricecheck").asBoolean())
{
query_flags |= DFQ_LIMIT_BY_PRICE;
}
if (childGetValue("areacheck").asBoolean())
{
query_flags |= DFQ_LIMIT_BY_AREA;
}
msg->newMessage("DirLandQuery");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("QueryData");
msg->addUUID("QueryID", getSearchID());
msg->addU32("QueryFlags", query_flags);
msg->addU32("SearchType", search_type);
msg->addS32("Price", childGetValue("priceedit").asInteger());
msg->addS32("Area", childGetValue("areaedit").asInteger());
msg->addS32Fast(_PREHASH_QueryStart,mSearchStart);
gAgent.sendReliableMessage();
}
示例13: performQuery
//.........这里部分代码省略.........
}
LLMessageSystem* msg = gMessageSystem;
setupNewSearch();
// We could change the UI to allow arbitrary combinations of these options
U32 search_type = ST_ALL;
const std::string& type = childGetValue("type").asString();
if(!type.empty())
{
if (FIND_AUCTION == type) search_type = ST_AUCTION;
else if(FIND_MAINLANDSALES == type) search_type = ST_MAINLAND;
else if(FIND_ESTATESALES == type) search_type = ST_ESTATE;
}
U32 query_flags = 0x0;
if (gAgent.wantsPGOnly()) query_flags |= DFQ_PG_SIMS_ONLY;
bool adult_enabled = gAgent.canAccessAdult();
bool mature_enabled = gAgent.canAccessMature();
if (inc_pg)
{
query_flags |= DFQ_INC_PG;
}
if (inc_mature && mature_enabled)
{
query_flags |= DFQ_INC_MATURE;
}
if (inc_adult && adult_enabled)
{
query_flags |= DFQ_INC_ADULT;
}
// Add old flags in case we are talking to an old dataserver
if (inc_pg && !inc_mature)
{
query_flags |= DFQ_PG_SIMS_ONLY;
}
if (!inc_pg && inc_mature)
{
query_flags |= DFQ_MATURE_SIMS_ONLY;
}
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("results");
if (list)
{
std::string sort_name = list->getSortColumnName();
BOOL sort_asc = list->getSortAscending();
if (sort_name == "name")
{
query_flags |= DFQ_NAME_SORT;
}
else if (sort_name == "price")
{
query_flags |= DFQ_PRICE_SORT;
}
else if (sort_name == "per_meter")
{
query_flags |= DFQ_PER_METER_SORT;
}
else if (sort_name == "area")
{
query_flags |= DFQ_AREA_SORT;
}
if (sort_asc)
{
query_flags |= DFQ_SORT_ASC;
}
}
if (childGetValue("pricecheck").asBoolean())
{
query_flags |= DFQ_LIMIT_BY_PRICE;
}
if (childGetValue("areacheck").asBoolean())
{
query_flags |= DFQ_LIMIT_BY_AREA;
}
msg->newMessage("DirLandQuery");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("QueryData");
msg->addUUID("QueryID", getSearchID());
msg->addU32("QueryFlags", query_flags);
msg->addU32("SearchType", search_type);
msg->addS32("Price", childGetValue("priceedit").asInteger());
msg->addS32("Area", childGetValue("areaedit").asInteger());
msg->addS32Fast(_PREHASH_QueryStart,mSearchStart);
gAgent.sendReliableMessage();
}
示例14: deactivateSimilarGestures
void LLGestureMgr::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& in_item_id)
{
const LLUUID& base_in_item_id = get_linked_uuid(in_item_id);
uuid_vec_t gest_item_ids;
// Deactivate all gestures that match
item_map_t::iterator it;
for (it = mActive.begin(); it != mActive.end(); )
{
const LLUUID& item_id = (*it).first;
LLMultiGesture* gest = (*it).second;
// Don't deactivate the gesture we are looking for duplicates of
// (for replaceGesture)
if (!gest || item_id == base_in_item_id)
{
// legal, can have null pointers in list
++it;
}
else if ((!gest->mTrigger.empty() && gest->mTrigger == in->mTrigger)
|| (gest->mKey != KEY_NONE && gest->mKey == in->mKey && gest->mMask == in->mMask))
{
gest_item_ids.push_back(item_id);
stopGesture(gest);
delete gest;
gest = NULL;
mActive.erase(it++);
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
}
else
{
++it;
}
}
// Inform database of the change
LLMessageSystem* msg = gMessageSystem;
BOOL start_message = TRUE;
uuid_vec_t::const_iterator vit = gest_item_ids.begin();
while (vit != gest_item_ids.end())
{
if (start_message)
{
msg->newMessage("DeactivateGestures");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->addU32("Flags", 0x0);
start_message = FALSE;
}
msg->nextBlock("Data");
msg->addUUID("ItemID", *vit);
msg->addU32("GestureFlags", 0x0);
if (msg->getCurrentSendTotal() > MTUBYTES)
{
gAgent.sendReliableMessage();
start_message = TRUE;
}
++vit;
}
if (!start_message)
{
gAgent.sendReliableMessage();
}
// Add to the list of names for the user.
for (vit = gest_item_ids.begin(); vit != gest_item_ids.end(); ++vit)
{
LLViewerInventoryItem* item = gInventory.getItem(*vit);
if (!item) continue;
mDeactivateSimilarNames.append(item->getName());
mDeactivateSimilarNames.append("\n");
}
notifyObservers();
}
示例15: activateGestures
void LLGestureMgr::activateGestures(LLViewerInventoryItem::item_array_t& items)
{
// Load up the assets
S32 count = 0;
LLViewerInventoryItem::item_array_t::const_iterator it;
for (it = items.begin(); it != items.end(); ++it)
{
LLViewerInventoryItem* item = *it;
if (isGestureActive(item->getUUID()))
{
continue;
}
else
{ // Make gesture active and persistent through login sessions. -Aura 07-12-06
activateGesture(item->getUUID());
}
count++;
}
mLoadingCount = count;
mDeactivateSimilarNames.clear();
for (it = items.begin(); it != items.end(); ++it)
{
LLViewerInventoryItem* item = *it;
if (isGestureActive(item->getUUID()))
{
continue;
}
// Don't inform server, we'll do that in bulk
const BOOL no_inform_server = FALSE;
const BOOL deactivate_similar = TRUE;
activateGestureWithAsset(item->getUUID(), item->getAssetUUID(),
no_inform_server,
deactivate_similar);
}
// Inform the database of this change
LLMessageSystem* msg = gMessageSystem;
BOOL start_message = TRUE;
for (it = items.begin(); it != items.end(); ++it)
{
LLViewerInventoryItem* item = *it;
if (isGestureActive(item->getUUID()))
{
continue;
}
if (start_message)
{
msg->newMessage("ActivateGestures");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->addU32("Flags", 0x0);
start_message = FALSE;
}
msg->nextBlock("Data");
msg->addUUID("ItemID", item->getUUID());
msg->addUUID("AssetID", item->getAssetUUID());
msg->addU32("GestureFlags", 0x0);
if (msg->getCurrentSendTotal() > MTUBYTES)
{
gAgent.sendReliableMessage();
start_message = TRUE;
}
}
if (!start_message)
{
gAgent.sendReliableMessage();
}
}