From 4c7b0cb528f61bc20866c2f7c43049ef7bc49bf2 Mon Sep 17 00:00:00 2001 From: dolphin Date: Fri, 16 May 2014 15:52:39 -0700 Subject: ACME-1459: Experience tab added to the about land tab for editing parcel Experiences --- indra/llinventory/llparcel.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/llinventory/llparcel.cpp') diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index d2179308c1..0784986e3a 100755 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -41,6 +41,7 @@ #include "message.h" #include "u64.h" #include "llregionflags.h" +#include static const F32 SOME_BIG_NUMBER = 1000.0f; static const F32 SOME_BIG_NEG_NUMBER = -1000.0f; @@ -1256,6 +1257,17 @@ void LLParcel::setExperienceKeyType( const LLUUID& experience_key, U32 type ) } else { - mExperienceKeys[experience_key] = type; + if(countExperienceKeyType(type) < PARCEL_MAX_EXPERIENCE_LIST) + { + mExperienceKeys[experience_key] = type; + } } } + +U32 LLParcel::countExperienceKeyType( U32 type ) +{ + return std::count_if( + boost::begin(mExperienceKeys | boost::adaptors::map_values), + boost::end(mExperienceKeys | boost::adaptors::map_values), + std::bind2nd(std::equal_to(), type)); +} -- cgit v1.2.3