diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-02-18 17:50:06 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-02-18 17:50:06 +0800 |
commit | 4bf9c1314565bbca8ca62db994e201de7c5a97b7 (patch) | |
tree | 9e118846d4abb1fa6edccbcc615beac8b7f8972a /indra/newview/llagentpicksinfo.cpp | |
parent | 54afd71f42d8bc15217dd14d3924661bd9aaa044 (diff) | |
parent | 0679cbdec89fbd3ec470768bdf469f6a1d326859 (diff) |
Merge commit '0679cbdec89fbd3ec470768bdf469f6a1d326859' into tmp
Diffstat (limited to 'indra/newview/llagentpicksinfo.cpp')
-rw-r--r-- | indra/newview/llagentpicksinfo.cpp | 12 |
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(); } |