diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/llinventory/lleconomy.h | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llinventory/lleconomy.h | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/linden/indra/llinventory/lleconomy.h b/linden/indra/llinventory/lleconomy.h new file mode 100644 index 0000000..7690142 --- /dev/null +++ b/linden/indra/llinventory/lleconomy.h | |||
@@ -0,0 +1,135 @@ | |||
1 | /** | ||
2 | * @file lleconomy.h | ||
3 | * | ||
4 | * Copyright (c) 2002-2007, Linden Research, Inc. | ||
5 | * | ||
6 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
7 | * to you under the terms of the GNU General Public License, version 2.0 | ||
8 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
9 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
10 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
11 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
12 | * | ||
13 | * There are special exceptions to the terms and conditions of the GPL as | ||
14 | * it is applied to this Source Code. View the full text of the exception | ||
15 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
16 | * online at http://secondlife.com/developers/opensource/flossexception | ||
17 | * | ||
18 | * By copying, modifying or distributing this software, you acknowledge | ||
19 | * that you have read and understood your obligations described above, | ||
20 | * and agree to abide by those obligations. | ||
21 | * | ||
22 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
23 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
24 | * COMPLETENESS OR PERFORMANCE. | ||
25 | */ | ||
26 | |||
27 | #ifndef LL_LLECONOMY_H | ||
28 | #define LL_LLECONOMY_H | ||
29 | |||
30 | class LLMessageSystem; | ||
31 | class LLVector3; | ||
32 | |||
33 | class LLGlobalEconomy | ||
34 | { | ||
35 | public: | ||
36 | LLGlobalEconomy(); | ||
37 | virtual ~LLGlobalEconomy(); | ||
38 | |||
39 | virtual void print(); | ||
40 | |||
41 | static void processEconomyData(LLMessageSystem *msg, void **user_data); | ||
42 | |||
43 | S32 calculateTeleportCost(F32 distance) const; | ||
44 | S32 calculateLightRent(const LLVector3& object_size) const; | ||
45 | |||
46 | S32 getObjectCount() const { return mObjectCount; } | ||
47 | S32 getObjectCapacity() const { return mObjectCapacity; } | ||
48 | S32 getPriceObjectClaim() const { return mPriceObjectClaim; } | ||
49 | S32 getPricePublicObjectDecay() const { return mPricePublicObjectDecay; } | ||
50 | S32 getPricePublicObjectDelete() const { return mPricePublicObjectDelete; } | ||
51 | S32 getPricePublicObjectRelease() const { return mPriceObjectClaim - mPricePublicObjectDelete; } | ||
52 | S32 getPriceEnergyUnit() const { return mPriceEnergyUnit; } | ||
53 | S32 getPriceUpload() const { return mPriceUpload; } | ||
54 | S32 getPriceRentLight() const { return mPriceRentLight; } | ||
55 | S32 getTeleportMinPrice() const { return mTeleportMinPrice; } | ||
56 | F32 getTeleportPriceExponent() const { return mTeleportPriceExponent; } | ||
57 | S32 getPriceGroupCreate() const { return mPriceGroupCreate; } | ||
58 | |||
59 | |||
60 | void setObjectCount(S32 val) { mObjectCount = val; } | ||
61 | void setObjectCapacity(S32 val) { mObjectCapacity = val; } | ||
62 | void setPriceObjectClaim(S32 val) { mPriceObjectClaim = val; } | ||
63 | void setPricePublicObjectDecay(S32 val) { mPricePublicObjectDecay = val; } | ||
64 | void setPricePublicObjectDelete(S32 val) { mPricePublicObjectDelete = val; } | ||
65 | void setPriceEnergyUnit(S32 val) { mPriceEnergyUnit = val; } | ||
66 | void setPriceUpload(S32 val) { mPriceUpload = val; } | ||
67 | void setPriceRentLight(S32 val) { mPriceRentLight = val; } | ||
68 | void setTeleportMinPrice(S32 val) { mTeleportMinPrice = val; } | ||
69 | void setTeleportPriceExponent(F32 val) { mTeleportPriceExponent = val; } | ||
70 | void setPriceGroupCreate(S32 val) { mPriceGroupCreate = val; } | ||
71 | |||
72 | private: | ||
73 | S32 mObjectCount; | ||
74 | S32 mObjectCapacity; | ||
75 | S32 mPriceObjectClaim; // per primitive | ||
76 | S32 mPricePublicObjectDecay; // per primitive | ||
77 | S32 mPricePublicObjectDelete; // per primitive | ||
78 | S32 mPriceEnergyUnit; | ||
79 | S32 mPriceUpload; | ||
80 | S32 mPriceRentLight; | ||
81 | S32 mTeleportMinPrice; | ||
82 | F32 mTeleportPriceExponent; | ||
83 | S32 mPriceGroupCreate; | ||
84 | }; | ||
85 | |||
86 | |||
87 | class LLRegionEconomy : public LLGlobalEconomy | ||
88 | { | ||
89 | public: | ||
90 | LLRegionEconomy(); | ||
91 | ~LLRegionEconomy(); | ||
92 | |||
93 | static void processEconomyData(LLMessageSystem *msg, void **user_data); | ||
94 | static void processEconomyDataRequest(LLMessageSystem *msg, void **user_data); | ||
95 | |||
96 | void print(); | ||
97 | |||
98 | BOOL hasData() const; | ||
99 | F32 getPriceObjectRent() const { return mPriceObjectRent; } | ||
100 | F32 getPriceObjectScaleFactor() const {return mPriceObjectScaleFactor;} | ||
101 | F32 getEnergyEfficiency() const { return mEnergyEfficiency; } | ||
102 | S32 getPriceParcelClaim() const; | ||
103 | S32 getPriceParcelRent() const; | ||
104 | F32 getAreaOwned() const { return mAreaOwned; } | ||
105 | F32 getAreaTotal() const { return mAreaTotal; } | ||
106 | S32 getBasePriceParcelClaimActual() const { return mBasePriceParcelClaimActual; } | ||
107 | |||
108 | void setPriceObjectRent(F32 val) { mPriceObjectRent = val; } | ||
109 | void setPriceObjectScaleFactor(F32 val) { mPriceObjectScaleFactor = val; } | ||
110 | void setEnergyEfficiency(F32 val) { mEnergyEfficiency = val; } | ||
111 | |||
112 | void setBasePriceParcelClaimDefault(S32 val); | ||
113 | void setBasePriceParcelClaimActual(S32 val); | ||
114 | void setPriceParcelClaimFactor(F32 val); | ||
115 | void setBasePriceParcelRent(S32 val); | ||
116 | |||
117 | void setAreaOwned(F32 val) { mAreaOwned = val; } | ||
118 | void setAreaTotal(F32 val) { mAreaTotal = val; } | ||
119 | |||
120 | private: | ||
121 | F32 mPriceObjectRent; | ||
122 | F32 mPriceObjectScaleFactor; | ||
123 | F32 mEnergyEfficiency; | ||
124 | |||
125 | S32 mBasePriceParcelClaimDefault; | ||
126 | S32 mBasePriceParcelClaimActual; | ||
127 | F32 mPriceParcelClaimFactor; | ||
128 | S32 mBasePriceParcelRent; | ||
129 | |||
130 | F32 mAreaOwned; | ||
131 | F32 mAreaTotal; | ||
132 | |||
133 | }; | ||
134 | |||
135 | #endif | ||