summaryrefslogtreecommitdiff
path: root/indra/newview/llagentpicksinfo.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2025-03-06 15:23:54 -0500
committerGitHub <noreply@github.com>2025-03-06 15:23:54 -0500
commite6927d8a079f81522e7dde9b1c67035171f84c93 (patch)
treea5335524e579d1ad478f1b723215673a55cc51dd /indra/newview/llagentpicksinfo.cpp
parent5029f0322f264e17f7509952f7bf9812db17a9ec (diff)
parent42ceac9695f7e098f15264977396a939c8ddfd23 (diff)
Merge pull request #3304 from secondlife/release/2024.12-ForeverFPS
2024.12 ForeverFPS
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();
}