diff options
author | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
commit | ce28e056c20bf2723f565bbf464b87781ec248a2 (patch) | |
tree | ef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/llinventory/lleconomy.cpp | |
parent | Second Life viewer sources 1.19.1.4b (diff) | |
download | meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2 meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz |
Second Life viewer sources 1.20.2
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llinventory/lleconomy.cpp | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/linden/indra/llinventory/lleconomy.cpp b/linden/indra/llinventory/lleconomy.cpp index 6ed0510..619c5f9 100644 --- a/linden/indra/llinventory/lleconomy.cpp +++ b/linden/indra/llinventory/lleconomy.cpp | |||
@@ -35,7 +35,6 @@ | |||
35 | #include "message.h" | 35 | #include "message.h" |
36 | #include "v3math.h" | 36 | #include "v3math.h" |
37 | 37 | ||
38 | LLGlobalEconomy *gGlobalEconomy = NULL; | ||
39 | 38 | ||
40 | LLGlobalEconomy::LLGlobalEconomy() | 39 | LLGlobalEconomy::LLGlobalEconomy() |
41 | : mObjectCount( -1 ), | 40 | : mObjectCount( -1 ), |
@@ -55,35 +54,33 @@ LLGlobalEconomy::~LLGlobalEconomy() | |||
55 | { } | 54 | { } |
56 | 55 | ||
57 | // static | 56 | // static |
58 | void LLGlobalEconomy::processEconomyData(LLMessageSystem *msg, void** user_data) | 57 | void LLGlobalEconomy::processEconomyData(LLMessageSystem *msg, LLGlobalEconomy* econ_data) |
59 | { | 58 | { |
60 | S32 i; | 59 | S32 i; |
61 | F32 f; | 60 | F32 f; |
62 | 61 | ||
63 | LLGlobalEconomy *this_ptr = (LLGlobalEconomy*)user_data; | ||
64 | |||
65 | msg->getS32Fast(_PREHASH_Info, _PREHASH_ObjectCapacity, i); | 62 | msg->getS32Fast(_PREHASH_Info, _PREHASH_ObjectCapacity, i); |
66 | this_ptr->setObjectCapacity(i); | 63 | econ_data->setObjectCapacity(i); |
67 | msg->getS32Fast(_PREHASH_Info, _PREHASH_ObjectCount, i); | 64 | msg->getS32Fast(_PREHASH_Info, _PREHASH_ObjectCount, i); |
68 | this_ptr->setObjectCount(i); | 65 | econ_data->setObjectCount(i); |
69 | msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceEnergyUnit, i); | 66 | msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceEnergyUnit, i); |
70 | this_ptr->setPriceEnergyUnit(i); | 67 | econ_data->setPriceEnergyUnit(i); |
71 | msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceObjectClaim, i); | 68 | msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceObjectClaim, i); |
72 | this_ptr->setPriceObjectClaim(i); | 69 | econ_data->setPriceObjectClaim(i); |
73 | msg->getS32Fast(_PREHASH_Info, _PREHASH_PricePublicObjectDecay, i); | 70 | msg->getS32Fast(_PREHASH_Info, _PREHASH_PricePublicObjectDecay, i); |
74 | this_ptr->setPricePublicObjectDecay(i); | 71 | econ_data->setPricePublicObjectDecay(i); |
75 | msg->getS32Fast(_PREHASH_Info, _PREHASH_PricePublicObjectDelete, i); | 72 | msg->getS32Fast(_PREHASH_Info, _PREHASH_PricePublicObjectDelete, i); |
76 | this_ptr->setPricePublicObjectDelete(i); | 73 | econ_data->setPricePublicObjectDelete(i); |
77 | msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceUpload, i); | 74 | msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceUpload, i); |
78 | this_ptr->setPriceUpload(i); | 75 | econ_data->setPriceUpload(i); |
79 | msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceRentLight, i); | 76 | msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceRentLight, i); |
80 | this_ptr->setPriceRentLight(i); | 77 | econ_data->setPriceRentLight(i); |
81 | msg->getS32Fast(_PREHASH_Info, _PREHASH_TeleportMinPrice, i); | 78 | msg->getS32Fast(_PREHASH_Info, _PREHASH_TeleportMinPrice, i); |
82 | this_ptr->setTeleportMinPrice(i); | 79 | econ_data->setTeleportMinPrice(i); |
83 | msg->getF32Fast(_PREHASH_Info, _PREHASH_TeleportPriceExponent, f); | 80 | msg->getF32Fast(_PREHASH_Info, _PREHASH_TeleportPriceExponent, f); |
84 | this_ptr->setTeleportPriceExponent(f); | 81 | econ_data->setTeleportPriceExponent(f); |
85 | msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceGroupCreate, i); | 82 | msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceGroupCreate, i); |
86 | this_ptr->setPriceGroupCreate(i); | 83 | econ_data->setPriceGroupCreate(i); |
87 | } | 84 | } |
88 | 85 | ||
89 | S32 LLGlobalEconomy::calculateTeleportCost(F32 distance) const | 86 | S32 LLGlobalEconomy::calculateTeleportCost(F32 distance) const |
@@ -154,10 +151,10 @@ void LLRegionEconomy::processEconomyData(LLMessageSystem *msg, void** user_data) | |||
154 | S32 i; | 151 | S32 i; |
155 | F32 f; | 152 | F32 f; |
156 | 153 | ||
157 | LLGlobalEconomy::processEconomyData(msg, user_data); | ||
158 | |||
159 | LLRegionEconomy *this_ptr = (LLRegionEconomy*)user_data; | 154 | LLRegionEconomy *this_ptr = (LLRegionEconomy*)user_data; |
160 | 155 | ||
156 | LLGlobalEconomy::processEconomyData(msg, this_ptr); | ||
157 | |||
161 | msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceParcelClaim, i); | 158 | msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceParcelClaim, i); |
162 | this_ptr->setBasePriceParcelClaimDefault(i); | 159 | this_ptr->setBasePriceParcelClaimDefault(i); |
163 | msg->getF32(_PREHASH_Info, _PREHASH_PriceParcelClaimFactor, f); | 160 | msg->getF32(_PREHASH_Info, _PREHASH_PriceParcelClaimFactor, f); |