diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2019-04-25 22:02:47 +0100 | 
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2019-04-25 22:02:47 +0100 | 
| commit | 06009e9b533fe65841c31214afdadb78a79a43ae (patch) | |
| tree | 6bdfcbcbbcaf2c945958797198c70022454f9e9c | |
| parent | d1f5e87ad08f63cf8bdf0421566d6e646f76a6d0 (diff) | |
SL-10400 - get group limits from SimulatorFeatures
| -rw-r--r-- | indra/newview/llpanelpeople.cpp | 22 | 
1 files changed, 20 insertions, 2 deletions
| diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 1cbff37287..3f48ac63b4 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -67,6 +67,7 @@  #include "llrecentpeople.h"  #include "llviewercontrol.h"		// for gSavedSettings  #include "llviewermenu.h"			// for gMenuHolder +#include "llviewerregion.h"  #include "llvoiceclient.h"  #include "llworld.h"  #include "llspeakers.h" @@ -1165,8 +1166,25 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string)  void LLPanelPeople::onGroupLimitInfo()  {  	LLSD args; -	args["MAX_BASIC"] = BASE_MAX_AGENT_GROUPS; -	args["MAX_PREMIUM"] = PREMIUM_MAX_AGENT_GROUPS; + +	S32 max_basic = BASE_MAX_AGENT_GROUPS; +	S32 max_premium = PREMIUM_MAX_AGENT_GROUPS; +	if (gAgent.getRegion()) +	{ +		LLSD features; +		gAgent.getRegion()->getSimulatorFeatures(features); +		if (features.has("MaxAgentGroupsBasic")) +		{ +			max_basic = features["MaxAgentGroupsBasic"].asInteger(); +		} +		if (features.has("MaxAgentGroupsPremium")) +		{ +			max_premium = features["MaxAgentGroupsPremium"].asInteger(); +		} +	} +	args["MAX_BASIC"] = max_basic;  +	args["MAX_PREMIUM"] = max_premium;  +  	LLNotificationsUtil::add("GroupLimitInfo", args);  } | 
