aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterland.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-09-04 01:56:20 -0500
committerJacek Antonelli2009-09-04 03:39:51 -0500
commit89a510de10c48ebcf82b98a962e4bf66477dcc93 (patch)
treed30f79f433badffe36a67fc155e70a0e29dd2dc4 /linden/indra/newview/llfloaterland.cpp
parentBackported 1.23 fix for animation joint assertion crash. (diff)
downloadmeta-impy-89a510de10c48ebcf82b98a962e4bf66477dcc93.zip
meta-impy-89a510de10c48ebcf82b98a962e4bf66477dcc93.tar.gz
meta-impy-89a510de10c48ebcf82b98a962e4bf66477dcc93.tar.bz2
meta-impy-89a510de10c48ebcf82b98a962e4bf66477dcc93.tar.xz
Applied Kitty Barnett's RLVa 1.0.1h (Restrained Life) patch.
Made a few non-functional changes to help it apply.
Diffstat (limited to 'linden/indra/newview/llfloaterland.cpp')
-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 9707184..75c5782 100644
--- a/linden/indra/newview/llfloaterland.cpp
+++ b/linden/indra/newview/llfloaterland.cpp
@@ -813,6 +813,12 @@ void LLPanelLandGeneral::setGroup(const LLUUID& group_id)
813// static 813// static
814void LLPanelLandGeneral::onClickBuyLand(void* data) 814void LLPanelLandGeneral::onClickBuyLand(void* data)
815{ 815{
816// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
817 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) )
818 {
819 return;
820 }
821// [/RLVa:KB]
816 BOOL* for_group = (BOOL*)data; 822 BOOL* for_group = (BOOL*)data;
817 LLViewerParcelMgr::getInstance()->startBuyLand(*for_group); 823 LLViewerParcelMgr::getInstance()->startBuyLand(*for_group);
818} 824}
@@ -2779,3 +2785,41 @@ void LLPanelLandCovenant::updateEstateOwnerName(const std::string& name)
2779 if (editor) editor->setText(name); 2785 if (editor) editor->setText(name);
2780 } 2786 }
2781} 2787}
2788
2789// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
2790void LLFloaterLand::open()
2791{
2792 // We'll allow "About Land" as long as you have the ability to return prims (through ownership or through group powers)
2793 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
2794 {
2795 LLParcelSelection* pParcelSel = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection();
2796 if ( (!pParcelSel) || (pParcelSel->hasOthersSelected()) )
2797 return;
2798 LLParcel* pParcel = pParcelSel->getParcel();
2799 if (!pParcel)
2800 return;
2801
2802 // Ideally we could just use LLViewerParcelMgr::isParcelOwnedByAgent(), but that has that sneaky exemption
2803 // for fake god like (aka View Admin Options)
2804 const LLUUID& idOwner = pParcel->getOwnerID();
2805 if ( (idOwner != gAgent.getID()) )
2806 {
2807 // *sighs* LLAgent::hasPowerInGroup() has it too so copy/paste from there
2808 S32 count = gAgent.mGroups.count(); bool fShow = false;
2809 for (S32 i = 0; i < count; ++i)
2810 {
2811 if (gAgent.mGroups.get(i).mID == idOwner)
2812 {
2813 fShow |= ((gAgent.mGroups.get(i).mPowers & GP_LAND_RETURN) > 0);
2814 break;
2815 }
2816 }
2817
2818 if (!fShow)
2819 return;
2820 }
2821 }
2822
2823 LLFloater::open();
2824}
2825// [/RLVa:KB]