diff options
author | James Cook <james@lindenlab.com> | 2010-03-03 16:04:37 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-03-03 16:04:37 -0800 |
commit | 207c40de9435d2a51c41bc0b72250cd5ff7e87ac (patch) | |
tree | f1656c563a74e9b67841def5facd036e578442d7 | |
parent | 75cc897c062ffb4d59649a7af760d5e89396a3f8 (diff) |
Fix script info for group-owned objects and stop requesting group name lookups for IDs that are actually avatars
-rw-r--r-- | indra/newview/llfloaterscriptlimits.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index 2fce50007e..5474a68512 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -636,6 +636,9 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) std::string name_buf = content["parcels"][i]["objects"][j]["name"].asString(); LLUUID task_id = content["parcels"][i]["objects"][j]["id"].asUUID(); LLUUID owner_id = content["parcels"][i]["objects"][j]["owner_id"].asUUID(); + // This field may not be sent by all server versions, but it's OK if + // it uses the LLSD default of false + bool is_group_owned = content["parcels"][i]["objects"][j]["is_group_owned"].asBoolean(); F32 location_x = 0.0f; F32 location_y = 0.0f; @@ -661,17 +664,22 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) // ...and if not use the slightly more painful method of disovery: else { - BOOL name_is_cached = gCacheName->getFullName(owner_id, owner_buf); + BOOL name_is_cached; + if (is_group_owned) + { + name_is_cached = gCacheName->getGroupName(owner_id, owner_buf); + } + else + { + name_is_cached = gCacheName->getFullName(owner_id, owner_buf); + } if(!name_is_cached) { if(std::find(names_requested.begin(), names_requested.end(), owner_id) == names_requested.end()) { names_requested.push_back(owner_id); - // Is this a bug? It's trying to look up a GROUP name, not - // an AVATAR name? JC - const bool is_group = true; - gCacheName->get(owner_id, is_group, - boost::bind(&LLPanelScriptLimitsRegionMemory::onNameCache, + gCacheName->get(owner_id, is_group_owned, + boost::bind(&LLPanelScriptLimitsRegionMemory::onNameCache, this, _1, _2)); } } |