summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp31
1 files changed, 13 insertions, 18 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index fe67182bc4..e077626461 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"
@@ -374,6 +374,11 @@ void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_
LL_INFOS("Messaging") << "give_money(" << uuid << "," << amount << ")"<< LL_ENDL;
if(can_afford_transaction(amount))
{
+ if (uuid.isNull())
+ {
+ LL_WARNS() << "Failed to send L$ gift to to Null UUID." << LL_ENDL;
+ return;
+ }
// gStatusBar->debitBalance(amount);
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_MoneyTransferRequest);
@@ -903,7 +908,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 = LLAgentBenefitsMgr::current().getGroupMembershipLimit();
if(gAgent.isInGroup(group_id)) ++max_groups;
if(gAgent.mGroups.size() < max_groups)
@@ -3742,6 +3747,7 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
void process_time_synch(LLMessageSystem *mesgsys, void **user_data)
{
LLVector3 sun_direction;
+ LLVector3 moon_direction;
LLVector3 sun_ang_velocity;
F32 phase;
U64 space_time_usec;
@@ -3763,12 +3769,10 @@ void process_time_synch(LLMessageSystem *mesgsys, void **user_data)
LL_DEBUGS("WindlightSync") << "Sun phase: " << phase << " rad = " << fmodf(phase / F_TWO_PI + 0.25, 1.f) * 24.f << " h" << LL_ENDL;
- gSky.setSunPhase(phase);
- gSky.setSunTargetDirection(sun_direction, sun_ang_velocity);
- if ( !(gSavedSettings.getBOOL("SkyOverrideSimSunPosition") || gSky.getOverrideSun()) )
- {
- gSky.setSunDirection(sun_direction, sun_ang_velocity);
- }
+ /* LAPRAS
+ We decode these parts of the message but ignore them
+ as the real values are provided elsewhere. */
+ (void)sun_direction, (void)moon_direction, (void)phase;
}
void process_sound_trigger(LLMessageSystem *msg, void **)
@@ -5440,16 +5444,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)