aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterland.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloaterland.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloaterland.cpp b/linden/indra/newview/llfloaterland.cpp
index 94a8345..08c04ab 100644
--- a/linden/indra/newview/llfloaterland.cpp
+++ b/linden/indra/newview/llfloaterland.cpp
@@ -820,6 +820,12 @@ void LLPanelLandGeneral::setGroup(const LLUUID& group_id)
820// static 820// static
821void LLPanelLandGeneral::onClickBuyLand(void* data) 821void LLPanelLandGeneral::onClickBuyLand(void* data)
822{ 822{
823// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
824 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) )
825 {
826 return;
827 }
828// [/RLVa:KB]
823 BOOL* for_group = (BOOL*)data; 829 BOOL* for_group = (BOOL*)data;
824 LLViewerParcelMgr::getInstance()->startBuyLand(*for_group); 830 LLViewerParcelMgr::getInstance()->startBuyLand(*for_group);
825} 831}
@@ -2878,3 +2884,41 @@ void LLPanelLandCovenant::updateEstateOwnerName(const std::string& name)
2878 if (editor) editor->setText(name); 2884 if (editor) editor->setText(name);
2879 } 2885 }
2880} 2886}
2887
2888// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
2889void LLFloaterLand::open()
2890{
2891 // We'll allow "About Land" as long as you have the ability to return prims (through ownership or through group powers)
2892 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
2893 {
2894 LLParcelSelection* pParcelSel = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection();
2895 if ( (!pParcelSel) || (pParcelSel->hasOthersSelected()) )
2896 return;
2897 LLParcel* pParcel = pParcelSel->getParcel();
2898 if (!pParcel)
2899 return;
2900
2901 // Ideally we could just use LLViewerParcelMgr::isParcelOwnedByAgent(), but that has that sneaky exemption
2902 // for fake god like (aka View Admin Options)
2903 const LLUUID& idOwner = pParcel->getOwnerID();
2904 if ( (idOwner != gAgent.getID()) )
2905 {
2906 // *sighs* LLAgent::hasPowerInGroup() has it too so copy/paste from there
2907 S32 count = gAgent.mGroups.count(); bool fShow = false;
2908 for (S32 i = 0; i < count; ++i)
2909 {
2910 if (gAgent.mGroups.get(i).mID == idOwner)
2911 {
2912 fShow |= ((gAgent.mGroups.get(i).mPowers & GP_LAND_RETURN) > 0);
2913 break;
2914 }
2915 }
2916
2917 if (!fShow)
2918 return;
2919 }
2920 }
2921
2922 LLFloater::open();
2923}
2924// [/RLVa:KB]