diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-08-17 20:06:49 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-08-17 20:06:49 -0400 |
commit | 3d7ae2b2f289ea0cbb8f430d1674782dc18af403 (patch) | |
tree | 61924416fe7e6fdbc74790ea52299d5fbb3315f2 /indra/newview/llpanelplaceprofile.cpp | |
parent | 2a57da233423ca3531bfcec2e138023afead4c3f (diff) | |
parent | 1be63209331d509396bd7ee79302d511fe83d72e (diff) |
merge
Diffstat (limited to 'indra/newview/llpanelplaceprofile.cpp')
-rwxr-xr-x | indra/newview/llpanelplaceprofile.cpp | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index e853b2d050..1a665d4c1d 100755 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -53,6 +53,8 @@ #include "llviewerparcelmgr.h" #include "llviewerregion.h" +const F64 COVENANT_REFRESH_TIME_SEC = 60.0f; + static LLPanelInjector<LLPanelPlaceProfile> t_place_profile("panel_place_profile"); // Statics for textures filenames @@ -76,6 +78,7 @@ static std::string icon_see_avs_off; LLPanelPlaceProfile::LLPanelPlaceProfile() : LLPanelPlaceInfo(), + mNextCovenantUpdateTime(0), mForSalePanel(NULL), mYouAreHerePanel(NULL), mSelectedParcelID(-1), @@ -162,6 +165,9 @@ BOOL LLPanelPlaceProfile::postBuild() icon_see_avs_on = getString("icon_SeeAVs_On"); icon_see_avs_off = getString("icon_SeeAVs_Off"); + mLastSelectedRegionID = LLUUID::null; + mNextCovenantUpdateTime = 0; + return TRUE; } @@ -170,6 +176,9 @@ void LLPanelPlaceProfile::resetLocation() { LLPanelPlaceInfo::resetLocation(); + mLastSelectedRegionID = LLUUID::null; + mNextCovenantUpdateTime = 0; + mForSalePanel->setVisible(FALSE); mYouAreHerePanel->setVisible(FALSE); @@ -330,13 +339,20 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, if (!region || !parcel) return; - // send EstateCovenantInfo message - LLMessageSystem *msg = gMessageSystem; - msg->newMessage("EstateCovenantRequest"); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID()); - msg->sendReliable(region->getHost()); + if (mLastSelectedRegionID != region->getRegionID() + || mNextCovenantUpdateTime < LLTimer::getElapsedSeconds()) + { + // send EstateCovenantInfo message + // Note: LLPanelPlaceProfile doesn't change Covenant's content and any + // changes made by Estate floater should be requested by Estate floater + LLMessageSystem *msg = gMessageSystem; + msg->newMessage("EstateCovenantRequest"); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID()); + msg->sendReliable(region->getHost()); + mNextCovenantUpdateTime = LLTimer::getElapsedSeconds() + COVENANT_REFRESH_TIME_SEC; + } LLParcelData parcel_data; |