summaryrefslogtreecommitdiff
path: root/indra/llinventory/lleconomy.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-04-01 17:45:04 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-04-01 17:45:04 +0000
commit941cb9f4124c9ccfd5c845bc94639fa46df12c3d (patch)
treee0f525e7bd6cc76d89b2df69c6f1554d191561e8 /indra/llinventory/lleconomy.cpp
parentecec626dec93524f7ef5831a5ba344d6449b99bc (diff)
merge release@83343 skinning-1-merge@83714 -> release
QAR-424
Diffstat (limited to 'indra/llinventory/lleconomy.cpp')
-rw-r--r--indra/llinventory/lleconomy.cpp31
1 files changed, 14 insertions, 17 deletions
diff --git a/indra/llinventory/lleconomy.cpp b/indra/llinventory/lleconomy.cpp
index 24e9bf1cb7..3500caa3b2 100644
--- a/indra/llinventory/lleconomy.cpp
+++ b/indra/llinventory/lleconomy.cpp
@@ -35,7 +35,6 @@
#include "message.h"
#include "v3math.h"
-LLGlobalEconomy *gGlobalEconomy = NULL;
LLGlobalEconomy::LLGlobalEconomy()
: mObjectCount( -1 ),
@@ -55,35 +54,33 @@ LLGlobalEconomy::~LLGlobalEconomy()
{ }
// static
-void LLGlobalEconomy::processEconomyData(LLMessageSystem *msg, void** user_data)
+void LLGlobalEconomy::processEconomyData(LLMessageSystem *msg, LLGlobalEconomy* econ_data)
{
S32 i;
F32 f;
- LLGlobalEconomy *this_ptr = (LLGlobalEconomy*)user_data;
-
msg->getS32Fast(_PREHASH_Info, _PREHASH_ObjectCapacity, i);
- this_ptr->setObjectCapacity(i);
+ econ_data->setObjectCapacity(i);
msg->getS32Fast(_PREHASH_Info, _PREHASH_ObjectCount, i);
- this_ptr->setObjectCount(i);
+ econ_data->setObjectCount(i);
msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceEnergyUnit, i);
- this_ptr->setPriceEnergyUnit(i);
+ econ_data->setPriceEnergyUnit(i);
msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceObjectClaim, i);
- this_ptr->setPriceObjectClaim(i);
+ econ_data->setPriceObjectClaim(i);
msg->getS32Fast(_PREHASH_Info, _PREHASH_PricePublicObjectDecay, i);
- this_ptr->setPricePublicObjectDecay(i);
+ econ_data->setPricePublicObjectDecay(i);
msg->getS32Fast(_PREHASH_Info, _PREHASH_PricePublicObjectDelete, i);
- this_ptr->setPricePublicObjectDelete(i);
+ econ_data->setPricePublicObjectDelete(i);
msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceUpload, i);
- this_ptr->setPriceUpload(i);
+ econ_data->setPriceUpload(i);
msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceRentLight, i);
- this_ptr->setPriceRentLight(i);
+ econ_data->setPriceRentLight(i);
msg->getS32Fast(_PREHASH_Info, _PREHASH_TeleportMinPrice, i);
- this_ptr->setTeleportMinPrice(i);
+ econ_data->setTeleportMinPrice(i);
msg->getF32Fast(_PREHASH_Info, _PREHASH_TeleportPriceExponent, f);
- this_ptr->setTeleportPriceExponent(f);
+ econ_data->setTeleportPriceExponent(f);
msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceGroupCreate, i);
- this_ptr->setPriceGroupCreate(i);
+ econ_data->setPriceGroupCreate(i);
}
S32 LLGlobalEconomy::calculateTeleportCost(F32 distance) const
@@ -154,10 +151,10 @@ void LLRegionEconomy::processEconomyData(LLMessageSystem *msg, void** user_data)
S32 i;
F32 f;
- LLGlobalEconomy::processEconomyData(msg, user_data);
-
LLRegionEconomy *this_ptr = (LLRegionEconomy*)user_data;
+ LLGlobalEconomy::processEconomyData(msg, this_ptr);
+
msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceParcelClaim, i);
this_ptr->setBasePriceParcelClaimDefault(i);
msg->getF32(_PREHASH_Info, _PREHASH_PriceParcelClaimFactor, f);