summaryrefslogtreecommitdiff
path: root/indra/newview/llagentpicksinfo.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2025-03-25 09:58:43 -0700
committerRider Linden <rider@lindenlab.com>2025-03-25 09:58:43 -0700
commitb86c36eafcdb0fb42c1b68ef671050dea67dc6c3 (patch)
treedfa54e83a9ccac2c5346210c05626e61760e2822 /indra/newview/llagentpicksinfo.cpp
parent48ccb0f75b078670ced1f8fe8d4942abe0a6f293 (diff)
parent423df2ba4b731417796478c449e3e8f3d166ef21 (diff)
Merge remote-tracking branch 'remotes/origin/develop' into rider/bot_tattle
Fix conflicts
Diffstat (limited to 'indra/newview/llagentpicksinfo.cpp')
-rw-r--r--indra/newview/llagentpicksinfo.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llagentpicksinfo.cpp b/indra/newview/llagentpicksinfo.cpp
index e2a2d2d8a9..265e4060ff 100644
--- a/indra/newview/llagentpicksinfo.cpp
+++ b/indra/newview/llagentpicksinfo.cpp
@@ -28,6 +28,7 @@
#include "llagentpicksinfo.h"
#include "llagent.h"
+#include "llagentbenefits.h"
#include "llavatarpropertiesprocessor.h"
const S32 MAX_AVATAR_PICKS = 10;
@@ -85,10 +86,9 @@ private:
LLAgentPicksInfo::LLAgentPicksInfo()
: mAgentPicksObserver(NULL)
- , mMaxNumberOfPicks(MAX_AVATAR_PICKS)
// Disable Pick creation until we get number of Picks from server - in case
// avatar has maximum number of Picks.
- , mNumberOfPicks(mMaxNumberOfPicks)
+ , mNumberOfPicks(S32_MAX)
{
}
@@ -110,7 +110,13 @@ void LLAgentPicksInfo::requestNumberOfPicks()
mAgentPicksObserver->sendAgentPicksRequest();
}
-bool LLAgentPicksInfo::isPickLimitReached()
+// static
+S32 LLAgentPicksInfo::getMaxNumberOfPicks()
+{
+ return LLAgentBenefitsMgr::current().getPicksLimit();
+}
+
+bool LLAgentPicksInfo::isPickLimitReached() const
{
return getNumberOfPicks() >= getMaxNumberOfPicks();
}