diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2019-11-15 15:13:11 +0000 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2019-11-15 15:13:11 +0000 |
commit | 65550520ed00699098b221a1166e4c1763333d58 (patch) | |
tree | bcd62aa2b6897b0dc424f8ecfadc2550d417ec4a /indra/newview | |
parent | 7df0a4ddd0c48358e7152733aaba01464f2620be (diff) |
SL-10499 - benefits. Removed no-longer-needed lleconomy files and classes. Group-related costs and limits via benefits.
Diffstat (limited to 'indra/newview')
27 files changed, 47 insertions, 69 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 31b8b90518..1b622de847 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -32,6 +32,7 @@ #include "pipeline.h" #include "llagentaccess.h" +#include "llagentbenefits.h" #include "llagentcamera.h" #include "llagentlistener.h" #include "llagentwearables.h" @@ -2984,7 +2985,7 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO BOOL LLAgent::canJoinGroups() const { - return (S32)mGroups.size() < gMaxAgentGroups; + return (S32)mGroups.size() < LLAgentBenefits::instance().getGroupMembershipLimit(); } LLQuaternion LLAgent::getHeadRotation() diff --git a/indra/newview/llagentbenefits.cpp b/indra/newview/llagentbenefits.cpp index 09be8f46c1..5ca4ecb456 100644 --- a/indra/newview/llagentbenefits.cpp +++ b/indra/newview/llagentbenefits.cpp @@ -73,6 +73,10 @@ bool LLAgentBenefits::init(const LLSD& benefits_sd) { return false; } + if (!get_required_S32(benefits_sd, "create_group_cost", m_create_group_cost)) + { + return false; + } if (!get_required_S32(benefits_sd, "group_membership_limit", m_group_membership_limit)) { return false; @@ -86,42 +90,42 @@ bool LLAgentBenefits::init(const LLSD& benefits_sd) return false; } + // FIXME PREMIUM - either use this field or get rid of it m_initalized = true; return true; } S32 LLAgentBenefits::getAnimatedObjectLimit() const { - //llassert(m_initalized); return m_animated_object_limit; } S32 LLAgentBenefits::getAnimationUploadCost() const { - //llassert(m_initalized); return m_animation_upload_cost; } S32 LLAgentBenefits::getAttachmentLimit() const { - //llassert(m_initalized); return m_attachment_limit; } +S32 LLAgentBenefits::getCreateGroupCost() const +{ + return m_create_group_cost; +} + S32 LLAgentBenefits::getGroupMembershipLimit() const { - //llassert(m_initalized); return m_group_membership_limit; } S32 LLAgentBenefits::getSoundUploadCost() const { - //llassert(m_initalized); return m_sound_upload_cost; } S32 LLAgentBenefits::getTextureUploadCost() const { - //llassert(m_initalized); return m_texture_upload_cost; } diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h index 995833149c..b21048e38b 100644 --- a/indra/newview/llagentbenefits.h +++ b/indra/newview/llagentbenefits.h @@ -41,6 +41,7 @@ public: S32 getAnimatedObjectLimit() const; S32 getAnimationUploadCost() const; S32 getAttachmentLimit() const; + S32 getCreateGroupCost() const; S32 getGroupMembershipLimit() const; S32 getSoundUploadCost() const; S32 getTextureUploadCost() const; @@ -49,6 +50,7 @@ private: S32 m_animated_object_limit; S32 m_animation_upload_cost; S32 m_attachment_limit; + S32 m_create_group_cost; S32 m_group_membership_limit; S32 m_sound_upload_cost; S32 m_texture_upload_cost; diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index 91a6e63665..6d7d3c8556 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -31,7 +31,6 @@ #include "llbvhloader.h" #include "lldatapacker.h" #include "lldir.h" -#include "lleconomy.h" #include "llnotificationsutil.h" #include "llvfile.h" #include "llapr.h" diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp index dbe7fee108..a32b01679a 100644 --- a/indra/newview/llfloatergroups.cpp +++ b/indra/newview/llfloatergroups.cpp @@ -38,6 +38,7 @@ #include "roles_constants.h" #include "llagent.h" +#include "llagentbenefits.h" #include "llbutton.h" #include "llgroupactions.h" #include "llscrolllistctrl.h" @@ -172,7 +173,7 @@ void LLPanelGroups::reset() group_list->operateOnAll(LLCtrlListInterface::OP_DELETE); } getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size())); - getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups)); + getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",LLAgentBenefits::instance().getGroupMembershipLimit())); init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID()); enableButtons(); @@ -183,7 +184,7 @@ BOOL LLPanelGroups::postBuild() childSetCommitCallback("group list", onGroupList, this); getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.size())); - getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups)); + getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",LLAgentBenefits::instance().getGroupMembershipLimit())); LLScrollListCtrl *list = getChild<LLScrollListCtrl>("group list"); if (list) diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index b6efc1590e..dfed11f1b0 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -44,7 +44,6 @@ #include "lldrawable.h" #include "llrender.h" #include "llface.h" -#include "lleconomy.h" #include "llfocusmgr.h" #include "llfloaterperms.h" #include "lliconctrl.h" diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index 33dfae8be8..fa1ed57d1f 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -46,12 +46,12 @@ #include "llnotificationsutil.h" #include "lluictrlfactory.h" #include "llstring.h" -#include "lleconomy.h" #include "llpermissions.h" // linden includes #include "llassetstorage.h" #include "llinventorytype.h" +#include "llagentbenefits.h" const S32 PREVIEW_LINE_HEIGHT = 19; const S32 PREVIEW_BORDER_WIDTH = 2; @@ -123,7 +123,8 @@ BOOL LLFloaterNameDesc::postBuild() // Cancel button getChild<LLUICtrl>("cancel_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnCancel, this)); - getChild<LLUICtrl>("ok_btn")->setLabelArg("[AMOUNT]", llformat("%d", LLGlobalEconomy::getInstance()->getPriceUpload() )); + // FIXME PREMIUM - depends - what are we uploading here? + getChild<LLUICtrl>("ok_btn")->setLabelArg("[AMOUNT]", llformat("%d", LLAgentBenefits::instance().getTextureUploadCost())); setDefaultBtn("ok_btn"); @@ -163,7 +164,7 @@ void LLFloaterNameDesc::onBtnOK( ) // FIXME PREMIUM - upload cost. Need to know which asset type this is, use agent benefits. LLAssetStorage::LLStoreAssetCallback callback = NULL; - S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass). + S32 expected_upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass). if (can_afford_transaction(expected_upload_cost)) { diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 088d052533..e384019a43 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -44,7 +44,6 @@ #include "roles_constants.h" #include "lltransactiontypes.h" #include "llstatusbar.h" -#include "lleconomy.h" #include "llviewerwindow.h" #include "llpanelgroup.h" #include "llgroupactions.h" diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 31e3d408d7..be05ba9207 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -41,7 +41,6 @@ #include "lldeadmantimer.h" #include "llfloatermodelpreview.h" #include "llfloaterperms.h" -#include "lleconomy.h" #include "llimagej2c.h" #include "llhost.h" #include "llmath.h" diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 8f5626bd7a..35b83880d9 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -37,7 +37,6 @@ #include "llaccordionctrltab.h" #include "llappearancemgr.h" #include "llagentbenefits.h" -#include "lleconomy.h" #include "llerror.h" #include "llfilepicker.h" #include "llfloaterperms.h" diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 451f41cd3b..3bae0cebfb 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -30,7 +30,6 @@ #include "llpanelcontents.h" // linden library includes -#include "lleconomy.h" #include "llerror.h" #include "llfloaterreg.h" #include "llfontgl.h" diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index b53cd222e7..2d0a09b469 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -30,6 +30,7 @@ #include "llavatarnamecache.h" #include "llagent.h" +#include "llagentbenefits.h" #include "llsdparam.h" #include "lluictrlfactory.h" #include "roles_constants.h" @@ -339,7 +340,9 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) return false; } - LLNotificationsUtil::add("CreateGroupCost", LLSD(), LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2)); + LLSD args; + args["COST"] = LLAgentBenefits::instance().getCreateGroupCost(); + LLNotificationsUtil::add("CreateGroupCost", args, LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2)); return false; } diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 7404798589..b81dce4e31 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -34,7 +34,6 @@ #include "llcheckboxctrl.h" #include "llcombobox.h" #include "lldndbutton.h" -#include "lleconomy.h" #include "llfilepicker.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" @@ -1510,11 +1509,6 @@ bool LLPanelMainInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropType void LLPanelMainInventory::setUploadCostIfNeeded() { - // *NOTE dzaporozhan - // Upload cost is set in process_economy_data() (llviewermessage.cpp). But since we - // have two instances of Inventory panel at the moment(and two instances of context menu), - // call to gMenuHolder->childSetLabelArg() sets upload cost only for one of the instances. - LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); if(mNeedUploadCost && menu) { diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 3665910c63..6bff95ab36 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -30,7 +30,6 @@ #include "llpanelobject.h" // linden library includes -#include "lleconomy.h" #include "llerror.h" #include "llfontgl.h" #include "llpermissionsflags.h" diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index d138433ed8..0a41018293 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -47,6 +47,7 @@ #include "llaccordionctrl.h" #include "llaccordionctrltab.h" #include "llagent.h" +#include "llagentbenefits.h" #include "llavataractions.h" #include "llavatarlist.h" #include "llavatarlistitem.h" @@ -85,11 +86,10 @@ static const std::string RECENT_TAB_NAME = "recent_panel"; static const std::string BLOCKED_TAB_NAME = "blocked_panel"; // blocked avatars static const std::string COLLAPSED_BY_USER = "collapsed_by_user"; +// FIXME PREMIUM - these should come from package info, once viewer is receiving it all. const S32 BASE_MAX_AGENT_GROUPS = 42; const S32 PREMIUM_MAX_AGENT_GROUPS = 60; -extern S32 gMaxAgentGroups; - /** Comparator for comparing avatar items by last interaction date */ class LLAvatarItemRecentComparator : public LLAvatarItemComparator { @@ -629,7 +629,7 @@ BOOL LLPanelPeople::postBuild() getChild<LLFilterEditor>("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); getChild<LLFilterEditor>("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); - if(gMaxAgentGroups < max_premium) + if(LLAgentBenefits::instance().getGroupMembershipLimit() < max_premium) { getChild<LLTextBox>("groupcount")->setText(getString("GroupCountWithInfo")); getChild<LLTextBox>("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this)); @@ -877,9 +877,10 @@ void LLPanelPeople::updateButtons() groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected U32 groups_count = gAgent.mGroups.size(); - U32 groups_ramaining = gMaxAgentGroups > groups_count ? gMaxAgentGroups - groups_count : 0; + S32 max_groups = LLAgentBenefits::instance().getGroupMembershipLimit(); + U32 groups_remaining = max_groups > groups_count ? max_groups - groups_count : 0; groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d", groups_count)); - groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d", groups_ramaining)); + groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d", groups_remaining)); } else { @@ -1092,6 +1093,7 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string) } } +// FIXME PREMIUM this should be coming from LLAgentBenefits info about the various packages. void LLPanelPeople::onGroupLimitInfo() { LLSD args; diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index 21ac7604ff..202f42c53a 100644 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -27,7 +27,6 @@ #include "llviewerprecompiledheaders.h" #include "llcombobox.h" -#include "lleconomy.h" #include "llsidetraypanelcontainer.h" #include "llspinctrl.h" @@ -38,6 +37,8 @@ #include "llstatusbar.h" // can_afford_transaction() #include "llnotificationsutil.h" +#include "llagentbenefits.h" + /** * The panel provides UI for saving snapshot as an inventory texture. */ @@ -135,7 +136,7 @@ BOOL LLPanelSnapshotInventory::postBuild() // virtual void LLPanelSnapshotInventory::onOpen(const LLSD& key) { - getChild<LLUICtrl>("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLGlobalEconomy::getInstance()->getPriceUpload())); + getChild<LLUICtrl>("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLAgentBenefits::instance().getTextureUploadCost())); LLPanelSnapshot::onOpen(key); } @@ -155,7 +156,7 @@ void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl) void LLPanelSnapshotInventoryBase::onSend() { - S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); + S32 expected_upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); if (can_afford_transaction(expected_upload_cost)) { if (mSnapshotFloater) @@ -191,7 +192,7 @@ BOOL LLPanelOutfitSnapshotInventory::postBuild() // virtual void LLPanelOutfitSnapshotInventory::onOpen(const LLSD& key) { - getChild<LLUICtrl>("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLGlobalEconomy::getInstance()->getPriceUpload())); + getChild<LLUICtrl>("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLAgentBenefits::instance().getTextureUploadCost())); LLPanelSnapshot::onOpen(key); } diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index 63206e2780..7932db8727 100644 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -26,7 +26,6 @@ #include "llviewerprecompiledheaders.h" -#include "lleconomy.h" #include "llpanel.h" #include "llsidetraypanelcontainer.h" diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 735eaa423d..de2fa74803 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -31,7 +31,6 @@ // linden library includes #include "llclickaction.h" -#include "lleconomy.h" #include "llerror.h" #include "llfontgl.h" #include "llflexibleobject.h" diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 90f8f84ea4..00ff91634d 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -35,7 +35,6 @@ #include "llcachename.h" #include "llavatarnamecache.h" #include "lldbstrings.h" -#include "lleconomy.h" #include "llgl.h" #include "llmediaentry.h" #include "llrender.h" diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index f5fea9dece..430abba543 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -28,10 +28,10 @@ #include "llviewerprecompiledheaders.h" #include "llagent.h" +#include "llagentbenefits.h" #include "llagentcamera.h" #include "llagentui.h" #include "llcombobox.h" -#include "lleconomy.h" #include "llfloaterperms.h" #include "llfloaterreg.h" #include "llfloaterflickr.h" @@ -1039,7 +1039,7 @@ void LLSnapshotLivePreview::saveTexture(BOOL outfit_snapshot, std::string name) LLAgentUI::buildLocationString(pos_string, LLAgentUI::LOCATION_FORMAT_FULL); std::string who_took_it; LLAgentUI::buildFullname(who_took_it); - S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); + S32 expected_upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); std::string res_name = outfit_snapshot ? name : "Snapshot : " + pos_string; std::string res_desc = outfit_snapshot ? "" : "Taken by " + who_took_it + " at " + pos_string; LLFolderType::EType folder_type = outfit_snapshot ? LLFolderType::FT_NONE : LLFolderType::FT_SNAPSHOT_CATEGORY; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 979fe63432..2f9bc786ca 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -209,7 +209,6 @@ // exported globals // bool gAgentMovementCompleted = false; -S32 gMaxAgentGroups; const std::string SCREEN_HOME_FILENAME = "screen_home%s.png"; const std::string SCREEN_LAST_FILENAME = "screen_last%s.png"; @@ -246,7 +245,6 @@ static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f); static std::string gAgentStartLocation = "safe"; static bool mLoginStatePastUI = false; -const S32 DEFAULT_MAX_AGENT_GROUPS = 42; const F32 STATE_AGENT_WAIT_TIMEOUT = 240; //seconds boost::scoped_ptr<LLEventPump> LLStartUp::sStateWatcher(new LLEventStream("StartupState")); @@ -1574,8 +1572,6 @@ bool idle_startup() send_complete_agent_movement(regionp->getHost()); gAssetStorage->setUpstream(regionp->getHost()); gCacheName->setUpstream(regionp->getHost()); - msg->newMessageFast(_PREHASH_EconomyDataRequest); - gAgent.sendReliableMessage(); } display_startup(); @@ -3606,10 +3602,6 @@ bool process_login_success_response() LLViewerMedia::getInstance()->openIDSetup(openid_url, openid_token); } - gMaxAgentGroups = LLAgentBenefits::instance().getGroupMembershipLimit(); - LL_INFOS("LLStartup") << "gMaxAgentGroups set from agent benefits: " - << gMaxAgentGroups << LL_ENDL; - bool success = false; // JC: gesture loading done below, when we have an asset system // in place. Don't delete/clear gUserCredentials until then. diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index db37207022..e9d0498fcb 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -80,7 +80,6 @@ typedef enum { // exported symbols extern bool gAgentMovementCompleted; -extern S32 gMaxAgentGroups; extern LLPointer<LLViewerTexture> gStartTexture; class LLStartUp diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index a919362321..2a79eee80e 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -36,7 +36,6 @@ #include "lluploaddialog.h" #include "llpreviewscript.h" #include "llnotificationsutil.h" -#include "lleconomy.h" #include "llagent.h" #include "llfloaterreg.h" #include "llfloatersnapshot.h" diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 0fda4d3df8..ef3c1f4c14 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -128,7 +128,6 @@ #include "lluilistener.h" #include "llappearancemgr.h" #include "lltrans.h" -#include "lleconomy.h" #include "lltoolgrab.h" #include "llwindow.h" #include "llpathfindingmanager.h" diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index a9a91b158b..b1606958e1 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -30,6 +30,7 @@ // project includes #include "llagent.h" +#include "llagentbenefits.h" #include "llagentcamera.h" #include "llfilepicker.h" #include "llfloaterreg.h" @@ -67,7 +68,6 @@ #include "llviewerassetupload.h" // linden libraries -#include "lleconomy.h" #include "llnotificationsutil.h" #include "llsdserialize.h" #include "llsdutil.h" @@ -85,8 +85,6 @@ class LLFileEnableUpload : public view_listener_t bool handleEvent(const LLSD& userdata) { return true; -// bool new_value = gStatusBar && LLGlobalEconomy::getInstance() && (gStatusBar->getBalance() >= LLGlobalEconomy::getInstance()->getPriceUpload()); -// return new_value; } }; @@ -417,7 +415,8 @@ const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker:: // // Also fix single upload to charge first, then refund - S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); + // FIXME PREMIUM - upload_cost should be per-file, depends on asset type + S32 expected_upload_cost = LLAgentBenefits::instance().getTextureUploadCost(); for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter) { std::string filename = (*in_iter); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index b0ad81614a..2cde93f471 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -32,7 +32,6 @@ #include "llaudioengine.h" #include "llavataractions.h" #include "llavatarnamecache.h" // IDEVO HACK -#include "lleconomy.h" #include "lleventtimer.h" #include "llfloaterreg.h" #include "llfolderview.h" @@ -51,6 +50,7 @@ #include "mean_collision_data.h" #include "llagent.h" +#include "llagentbenefits.h" #include "llagentcamera.h" #include "llcallingcard.h" #include "llbuycurrencyhtml.h" @@ -903,7 +903,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response) if(option == 0 && !group_id.isNull()) { // check for promotion or demotion. - S32 max_groups = gMaxAgentGroups; + S32 max_groups = LLAgentBenefits::instance().getGroupMembershipLimit(); if(gAgent.isInGroup(group_id)) ++max_groups; if(gAgent.mGroups.size() < max_groups) @@ -5435,16 +5435,7 @@ void process_frozen_message(LLMessageSystem *msgsystem, void **user_data) // do some extra stuff once we get our economy data void process_economy_data(LLMessageSystem *msg, void** /*user_data*/) { - LLGlobalEconomy::processEconomyData(msg, LLGlobalEconomy::getInstance()); - - S32 upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); - - LL_INFOS_ONCE("Messaging") << "EconomyData message arrived; upload cost is L$" << upload_cost << LL_ENDL; - - gMenuHolder->getChild<LLUICtrl>("Upload Image")->setLabelArg("[COST]", llformat("%d", upload_cost)); - gMenuHolder->getChild<LLUICtrl>("Upload Sound")->setLabelArg("[COST]", llformat("%d", upload_cost)); - gMenuHolder->getChild<LLUICtrl>("Upload Animation")->setLabelArg("[COST]", llformat("%d", upload_cost)); - gMenuHolder->getChild<LLUICtrl>("Bulk Upload")->setLabelArg("[COST]", llformat("%d", upload_cost)); + LL_DEBUGS("Benefits") << "Received economy data, not currently used" << LL_ENDL; } void notify_cautioned_script_question(const LLSD& notification, const LLSD& response, S32 orig_questions, BOOL granted) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f72767cceb..e0fc6bb9a5 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -920,7 +920,7 @@ You do not have enough L$ to join this group. icon="alertmodal.tga" name="CreateGroupCost" type="alertmodal"> -Creating this group will cost L$100. +Creating this group will cost L$[COST]. Groups need more than one member, or they are deleted forever. Please invite members within 48 hours. <tag>group</tag> @@ -929,7 +929,7 @@ Please invite members within 48 hours. canceltext="Cancel" name="okcancelbuttons" notext="Cancel" - yestext="Create group for L$100"/> + yestext="Create group for L$[COST]"/> </notification> <notification |