diff options
author | Callum Prentice <callum@mbp.local> | 2021-06-24 14:37:20 -0700 |
---|---|---|
committer | Callum Prentice <callum@mbp.local> | 2021-06-24 14:37:20 -0700 |
commit | 7ff743a13856d1e883baaa8294480d9973bfedfb (patch) | |
tree | 40ccb88bd6c7208ab4c4dbe34b192270f665d931 /indra/newview/llfloaterlandholdings.cpp | |
parent | 38765be8b0fd6ca36ce8f1fe35c962d2eaf0f3d8 (diff) | |
parent | 467d8339c970c253dada2cf0e1eed45be66593ac (diff) |
Merge branch 'master' into DRTVWR-531
Diffstat (limited to 'indra/newview/llfloaterlandholdings.cpp')
-rw-r--r-- | indra/newview/llfloaterlandholdings.cpp | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp index f34760a6bf..749a3d2686 100644 --- a/indra/newview/llfloaterlandholdings.cpp +++ b/indra/newview/llfloaterlandholdings.cpp @@ -51,6 +51,9 @@ #include "llgroupactions.h" +const std::string LINDEN_HOMES_SKU = "131"; +bool LLFloaterLandHoldings::sHasLindenHome = false; + // protected LLFloaterLandHoldings::LLFloaterLandHoldings(const LLSD& key) : LLFloater(key), @@ -148,10 +151,24 @@ void LLFloaterLandHoldings::refresh() void LLFloaterLandHoldings::processPlacesReply(LLMessageSystem* msg, void**) { LLFloaterLandHoldings* self = LLFloaterReg::findTypedInstance<LLFloaterLandHoldings>("land_holdings"); - - // Is this packet from an old, closed window? + S32 count = msg->getNumberOfBlocks("QueryData"); + std::string land_sku; + sHasLindenHome = false; if (!self) { + for (S32 i = 0; i < count; i++) + { + if ( msg->getSizeFast(_PREHASH_QueryData, i, _PREHASH_ProductSKU) > 0 ) + { + msg->getStringFast( _PREHASH_QueryData, _PREHASH_ProductSKU, land_sku, i); + + if (LINDEN_HOMES_SKU == land_sku) + { + sHasLindenHome = true; + return; + } + } + } return; } @@ -174,12 +191,9 @@ void LLFloaterLandHoldings::processPlacesReply(LLMessageSystem* msg, void**) F32 global_x; F32 global_y; std::string sim_name; - std::string land_sku; std::string land_type; - S32 i; - S32 count = msg->getNumberOfBlocks("QueryData"); - for (i = 0; i < count; i++) + for (S32 i = 0; i < count; i++) { msg->getUUID("QueryData", "OwnerID", owner_id, i); msg->getString("QueryData", "Name", name, i); @@ -196,6 +210,10 @@ void LLFloaterLandHoldings::processPlacesReply(LLMessageSystem* msg, void**) msg->getStringFast( _PREHASH_QueryData, _PREHASH_ProductSKU, land_sku, i); LL_INFOS() << "Land sku: " << land_sku << LL_ENDL; land_type = LLProductInfoRequestManager::instance().getDescriptionForSku(land_sku); + if (LINDEN_HOMES_SKU == land_sku) + { + sHasLindenHome = true; + } } else { |