aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorFrederick Martian2010-09-10 11:05:45 +0200
committerMcCabe Maxsted2010-09-11 18:25:31 -0700
commit37f9f885db6119b88044f55091fa0068f135c3ea (patch)
tree54ea970320273b6d6c5e17b4a083603f4f723b47 /linden
parentMerge remote branch 'elektra/weekly' into weekly (diff)
downloadmeta-impy-37f9f885db6119b88044f55091fa0068f135c3ea.zip
meta-impy-37f9f885db6119b88044f55091fa0068f135c3ea.tar.gz
meta-impy-37f9f885db6119b88044f55091fa0068f135c3ea.tar.bz2
meta-impy-37f9f885db6119b88044f55091fa0068f135c3ea.tar.xz
When buying land check the maturity level first and inform the agent when the land does have a higher level than what he is currently set to
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/newview/llviewerparcelmgr.cpp14
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/notifications.xml9
2 files changed, 22 insertions, 1 deletions
diff --git a/linden/indra/newview/llviewerparcelmgr.cpp b/linden/indra/newview/llviewerparcelmgr.cpp
index 21fca25..61b91fe 100644
--- a/linden/indra/newview/llviewerparcelmgr.cpp
+++ b/linden/indra/newview/llviewerparcelmgr.cpp
@@ -1071,7 +1071,19 @@ LLViewerParcelMgr::ParcelBuyInfo* LLViewerParcelMgr::setupParcelBuy(
1071 LLNotifications::instance().add("CannotBuyLandNoRegion"); 1071 LLNotifications::instance().add("CannotBuyLandNoRegion");
1072 return NULL; 1072 return NULL;
1073 } 1073 }
1074 1074
1075 /* Check for maturity being not higher than the current users ability and preference. */
1076 U8 sim_access = region->getSimAccess();
1077 const LLAgentAccess& agent_access = gAgent.getAgentAccess();
1078 // if the region is PG, we're happy already, so do nothing
1079 // but if we're set to avoid either mature or adult, get us outta here
1080 if (((sim_access == SIM_ACCESS_MATURE) && !agent_access.canAccessMature()) ||
1081 ((sim_access == SIM_ACCESS_ADULT) && !agent_access.canAccessAdult()))
1082 {
1083 LLNotifications::instance().add("CannotBuyLandMaturity");
1084 return NULL;
1085 }
1086
1075 if (is_claim) 1087 if (is_claim)
1076 { 1088 {
1077 llinfos << "Claiming " << mWestSouth << " to " << mEastNorth << llendl; 1089 llinfos << "Claiming " << mWestSouth << " to " << mEastNorth << llendl;
diff --git a/linden/indra/newview/skins/default/xui/en-us/notifications.xml b/linden/indra/newview/skins/default/xui/en-us/notifications.xml
index eced647..9ebeec9 100644
--- a/linden/indra/newview/skins/default/xui/en-us/notifications.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/notifications.xml
@@ -1729,6 +1729,15 @@ Cannot find the region this land is in.
1729 1729
1730<notification 1730<notification
1731 icon="alertmodal.tga" 1731 icon="alertmodal.tga"
1732 name="CannotBuyLandMaturity"
1733 type="alertmodal">
1734Unable to buy land:
1735
1736Your allowed or prefered maturity level does not allow to buy this land.
1737</notification>
1738
1739<notification
1740 icon="alertmodal.tga"
1732 name="CannotCloseFloaterBuyLand" 1741 name="CannotCloseFloaterBuyLand"
1733 type="alertmodal"> 1742 type="alertmodal">
1734You cannot close the Buy Land window until [GRID_NAME] estimates the price of this transaction. 1743You cannot close the Buy Land window until [GRID_NAME] estimates the price of this transaction.