aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llinventory/llparcel.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:46 -0500
committerJacek Antonelli2008-08-15 23:44:46 -0500
commit38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch)
treeadca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/llinventory/llparcel.h
parentREADME.txt (diff)
downloadmeta-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 'linden/indra/llinventory/llparcel.h')
-rw-r--r--linden/indra/llinventory/llparcel.h595
1 files changed, 595 insertions, 0 deletions
diff --git a/linden/indra/llinventory/llparcel.h b/linden/indra/llinventory/llparcel.h
new file mode 100644
index 0000000..54936e2
--- /dev/null
+++ b/linden/indra/llinventory/llparcel.h
@@ -0,0 +1,595 @@
1/**
2 * @file llparcel.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_LLPARCEL_H
28#define LL_LLPARCEL_H
29
30#include <time.h>
31#include <iostream>
32
33#include "lldarray.h"
34#include "lluuid.h"
35#include "llparcelflags.h"
36#include "llpermissions.h"
37#include "v3math.h"
38
39
40// Grid out of which parcels taken is stepped every 4 meters.
41const F32 PARCEL_GRID_STEP_METERS = 4.f;
42
43// Area of one "square" of parcel
44const S32 PARCEL_UNIT_AREA = 16;
45
46// Height _above_ground_ that parcel boundary ends
47const F32 PARCEL_HEIGHT = 50.f;
48
49//Height above ground which parcel boundries exist for explicitly banned avatars
50const F32 BAN_HEIGHT = 768.f;
51
52// Maximum number of entries in an access list
53const S32 PARCEL_MAX_ACCESS_LIST = 300;
54//Maximum number of entires in an update packet
55//for access/ban lists.
56const F32 PARCEL_MAX_ENTRIES_PER_PACKET = 48.f;
57
58// Weekly charge for listing a parcel in the directory
59const S32 PARCEL_DIRECTORY_FEE = 30;
60
61const S32 PARCEL_PASS_PRICE_DEFAULT = 10;
62const F32 PARCEL_PASS_HOURS_DEFAULT = 1.f;
63
64// Number of "chunks" in which parcel overlay data is sent
65// Chunk 0 = southern rows, entire width
66const S32 PARCEL_OVERLAY_CHUNKS = 4;
67
68// Bottom three bits are a color index for the land overlay
69const U8 PARCEL_COLOR_MASK = 0x07;
70const U8 PARCEL_PUBLIC = 0x00;
71const U8 PARCEL_OWNED = 0x01;
72const U8 PARCEL_GROUP = 0x02;
73const U8 PARCEL_SELF = 0x03;
74const U8 PARCEL_FOR_SALE = 0x04;
75const U8 PARCEL_AUCTION = 0x05;
76// unused 0x06
77// unused 0x07
78// flag, unused 0x08
79// flag, unused 0x10
80const U8 PARCEL_SOUND_LOCAL = 0x20;
81const U8 PARCEL_WEST_LINE = 0x40; // flag, property line on west edge
82const U8 PARCEL_SOUTH_LINE = 0x80; // flag, property line on south edge
83
84// Transmission results for parcel properties
85const S32 PARCEL_RESULT_NO_DATA = -1;
86const S32 PARCEL_RESULT_SUCCESS = 0; // got exactly one parcel
87const S32 PARCEL_RESULT_MULTIPLE = 1; // got multiple parcels
88
89const S32 SELECTED_PARCEL_SEQ_ID = -10000;
90const S32 COLLISION_NOT_IN_GROUP_PARCEL_SEQ_ID = -20000;
91const S32 COLLISION_BANNED_PARCEL_SEQ_ID = -30000;
92const S32 COLLISION_NOT_ON_LIST_PARCEL_SEQ_ID = -40000;
93const S32 HOVERED_PARCEL_SEQ_ID = -50000;
94
95const U32 RT_NONE = 0x1 << 0;
96const U32 RT_OWNER = 0x1 << 1;
97const U32 RT_GROUP = 0x1 << 2;
98const U32 RT_OTHER = 0x1 << 3;
99const U32 RT_LIST = 0x1 << 4;
100const U32 RT_SELL = 0x1 << 5;
101
102class LLMessageSystem;
103
104class LLAccessEntry
105{
106public:
107 LLUUID mID;
108 S32 mTime;
109 U32 mFlags;
110};
111
112typedef std::map<LLUUID,LLAccessEntry>::iterator access_map_iterator;
113typedef std::map<LLUUID,LLAccessEntry>::const_iterator access_map_const_iterator;
114
115class LLParcel
116{
117public:
118 enum EOwnershipStatus
119 {
120 OS_LEASED = 0,
121 OS_LEASE_PENDING = 1,
122 OS_ABANDONED = 2,
123 OS_COUNT = 3,
124 OS_NONE = -1
125 };
126 enum ECategory
127 {
128 C_NONE = 0,
129 C_LINDEN,
130 C_ADULT,
131 C_ARTS, // "arts & culture"
132 C_BUSINESS, // was "store"
133 C_EDUCATIONAL,
134 C_GAMING, // was "game"
135 C_HANGOUT, // was "gathering place"
136 C_NEWCOMER,
137 C_PARK, // "parks & nature"
138 C_RESIDENTIAL, // was "homestead"
139 C_SHOPPING,
140 C_STAGE,
141 C_OTHER,
142 C_COUNT,
143 C_ANY = -1 // only useful in queries
144 };
145 enum EAction
146 {
147 A_CREATE = 0,
148 A_RELEASE = 1,
149 A_ABSORB = 2,
150 A_ABSORBED = 3,
151 A_DIVIDE = 4,
152 A_DIVISION = 5,
153 A_ACQUIRE = 6,
154 A_RELINQUISH = 7,
155 A_CONFIRM = 8,
156 A_COUNT = 9,
157 A_UNKNOWN = -1
158 };
159
160 enum ELandingType
161 {
162 L_NONE = 0,
163 L_LANDING_POINT = 1,
164 L_DIRECT = 2
165 };
166
167 // CREATORS
168 LLParcel();
169 LLParcel( const LLUUID &owner_id,
170 BOOL modify, BOOL terraform, BOOL damage,
171 time_t claim_date, S32 claim_price, S32 rent_price, S32 area, S32 sim_object_limit, F32 parcel_object_bonus,
172 BOOL is_group_owned = FALSE);
173 virtual ~LLParcel();
174
175 void init( const LLUUID &owner_id,
176 BOOL modify, BOOL terraform, BOOL damage,
177 time_t claim_date, S32 claim_price, S32 rent_price,
178 S32 area, S32 sim_object_limit, F32 parcel_object_bonus, BOOL is_group_owned = FALSE);
179
180 // TODO: make an actual copy constructor for this
181 void overrideParcelFlags(U32 flags);
182 // if you specify an agent id here, the group id will be zeroed
183 void overrideOwner(const LLUUID& owner_id, BOOL is_group_owned = FALSE);
184 void overrideSaleTimerExpires(F32 secs_left) { mSaleTimerExpires.setTimerExpirySec(secs_left); }
185
186 // MANIPULATORS
187 void generateNewID() { mID.generate(); }
188 void setName(const char* name);
189 void setDesc(const char* desc);
190 void setMusicURL(const char* url);
191 void setMediaURL(const char* url);
192 void setMediaID(const LLUUID& id) { mMediaID = id; }
193 void setMediaAutoScale ( U8 flagIn ) { mMediaAutoScale = flagIn; }
194 virtual void setLocalID(S32 local_id);
195
196 // blow away all the extra crap lurking in parcels, including urls, access lists, etc
197 void clearParcel();
198
199 // This value is not persisted out to the parcel file, it is only
200 // a per-process blocker for attempts to purchase.
201 void setInEscrow(bool in_escrow) { mInEscrow = in_escrow; }
202
203 void setAuthorizedBuyerID(const LLUUID& id) { mAuthBuyerID = id; }
204 //void overrideBuyerID(const LLUUID& id) { mBuyerID = id; }
205 void setCategory(ECategory category) { mCategory = category; }
206 void setSnapshotID(const LLUUID& id) { mSnapshotID = id; }
207 void setUserLocation(const LLVector3& pos) { mUserLocation = pos; }
208 void setUserLookAt(const LLVector3& rot) { mUserLookAt = rot; }
209 void setLandingType(const ELandingType type) { mLandingType = type; }
210
211 void setAuctionID(U32 auction_id) { mAuctionID = auction_id;}
212 void setReservedForNewbie(BOOL reserve) { mIsReservedForNewbie = reserve; }
213
214 void setAllParcelFlags(U32 flags) { mParcelFlags = flags; }
215 void setParcelFlag(U32 flag, BOOL b);
216
217 void setArea(S32 area, S32 sim_object_limit);
218 void setDiscountRate(F32 rate);
219
220 void setAllowModify(BOOL b) { setParcelFlag(PF_CREATE_OBJECTS, b); }
221 void setAllowGroupModify(BOOL b) { setParcelFlag(PF_CREATE_GROUP_OBJECTS, b); }
222 void setAllowAllObjectEntry(BOOL b) { setParcelFlag(PF_ALLOW_ALL_OBJECT_ENTRY, b); }
223 void setAllowGroupObjectEntry(BOOL b) { setParcelFlag(PF_ALLOW_GROUP_OBJECT_ENTRY, b); }
224 void setAllowTerraform(BOOL b){setParcelFlag(PF_ALLOW_TERRAFORM, b); }
225 void setAllowDamage(BOOL b) { setParcelFlag(PF_ALLOW_DAMAGE, b); }
226 void setAllowFly(BOOL b) { setParcelFlag(PF_ALLOW_FLY, b); }
227 void setAllowLandmark(BOOL b){ setParcelFlag(PF_ALLOW_LANDMARK, b); }
228 void setAllowGroupScripts(BOOL b) { setParcelFlag(PF_ALLOW_GROUP_SCRIPTS, b); }
229 void setAllowOtherScripts(BOOL b) { setParcelFlag(PF_ALLOW_OTHER_SCRIPTS, b); }
230 void setAllowDeedToGroup(BOOL b) { setParcelFlag(PF_ALLOW_DEED_TO_GROUP, b); }
231 void setContributeWithDeed(BOOL b) { setParcelFlag(PF_CONTRIBUTE_WITH_DEED, b); }
232 void setForSale(BOOL b) { setParcelFlag(PF_FOR_SALE, b); }
233 void setSoundOnly(BOOL b) { setParcelFlag(PF_SOUND_LOCAL, b); }
234 void setDenyAnonymous(BOOL b) { setParcelFlag(PF_DENY_ANONYMOUS, b); }
235 void setDenyIdentified(BOOL b) { setParcelFlag(PF_DENY_IDENTIFIED, b); }
236 void setDenyTransacted(BOOL b) { setParcelFlag(PF_DENY_TRANSACTED, b); }
237 void setRestrictPushObject(BOOL b) { setParcelFlag(PF_RESTRICT_PUSHOBJECT, b); }
238
239 void setDrawDistance(F32 dist) { mDrawDistance = dist; }
240 void setSalePrice(S32 price) { mSalePrice = price; }
241 void setGroupID(const LLUUID& id) { mGroupID = id; }
242 //void setGroupName(const char* s) { mGroupName.assign(s); }
243 void setPassPrice(S32 price) { mPassPrice = price; }
244 void setPassHours(F32 hours) { mPassHours = hours; }
245
246 BOOL importStream(std::istream& input_stream);
247 BOOL importAccessEntry(std::istream& input_stream, LLAccessEntry* entry);
248 BOOL exportStream(std::ostream& output_stream);
249
250 void packMessage(LLMessageSystem* msg);
251 void unpackMessage(LLMessageSystem* msg);
252
253 void packAccessEntries(LLMessageSystem* msg,
254 const std::map<LLUUID,LLAccessEntry>& list);
255 void unpackAccessEntries(LLMessageSystem* msg,
256 std::map<LLUUID,LLAccessEntry>* list);
257
258 void setAABBMin(const LLVector3& min) { mAABBMin = min; }
259 void setAABBMax(const LLVector3& max) { mAABBMax = max; }
260
261 // Extend AABB to include rectangle from min to max.
262 void extendAABB(const LLVector3& box_min, const LLVector3& box_max);
263
264 void dump();
265
266 // Scans the pass list and removes any items with an expiration
267 // time earlier than "now".
268 void expirePasses(S32 now);
269
270 // Add to list, suppressing duplicates. Returns TRUE if added.
271 BOOL addToAccessList(const LLUUID& agent_id, S32 time);
272 BOOL addToBanList(const LLUUID& agent_id, S32 time);
273 BOOL removeFromAccessList(const LLUUID& agent_id);
274 BOOL removeFromBanList(const LLUUID& agent_id);
275
276 // ACCESSORS
277 const LLUUID& getID() { return mID; }
278 const char* getName() const { return mName.c_str(); }
279 const char* getDesc() const { return mDesc.c_str(); }
280 const char* getMusicURL() const { return mMusicURL.c_str(); }
281 const char* getMediaURL() const { return mMediaURL.c_str(); }
282 const LLUUID& getMediaID() const { return mMediaID; }
283 const U8 getMediaAutoScale() const { return mMediaAutoScale; }
284 S32 getLocalID() const { return mLocalID; }
285 const LLUUID& getOwnerID() const { return mOwnerID; }
286 const LLUUID& getGroupID() const { return mGroupID; }
287 //const char* getGroupName() const { return mGroupName.c_str(); }
288 S32 getPassPrice() const { return mPassPrice; }
289 F32 getPassHours() const { return mPassHours; }
290 BOOL getIsGroupOwned() const { return mGroupOwned; }
291
292 U32 getAuctionID() { return mAuctionID; }
293 BOOL getReservedForNewbie() { return mIsReservedForNewbie; }
294 bool isInEscrow() const { return mInEscrow; }
295
296 BOOL isPublic() const;
297
298 // Region-local user-specified position
299 const LLVector3& getUserLocation() const { return mUserLocation; }
300 const LLVector3& getUserLookAt() const { return mUserLookAt; }
301 ELandingType getLandingType() const { return mLandingType; }
302
303 // User-specified snapshot
304 const LLUUID& getSnapshotID() const { return mSnapshotID; }
305
306 // the authorized buyer id is the person who is the only
307 // agent/group that has authority to purchase. (ie, ui specified a
308 // particular agent could buy the plot).
309 const LLUUID& getAuthorizedBuyerID() const { return mAuthBuyerID; }
310
311 // helper function
312 BOOL isBuyerAuthorized(const LLUUID& buyer_id) const;
313
314 // The buyer of a plot is set when someone indicates they want to
315 // buy the plot, and the system is simply waiting for tier-up
316 // approval
317 //const LLUUID& getBuyerID() const { return mBuyerID; }
318
319 // functions to deal with ownership status.
320 EOwnershipStatus getOwnershipStatus() const { return mStatus; }
321 static const char* getOwnershipStatusString(EOwnershipStatus status);
322 void setOwnershipStatus(EOwnershipStatus status) { mStatus = status; }
323
324 // dealing with parcel category information
325 ECategory getCategory() const {return mCategory; }
326 static const char* getCategoryString(ECategory category);
327 static const char* getCategoryUIString(ECategory category);
328 static ECategory getCategoryFromString(const char* string);
329 static ECategory getCategoryFromUIString(const char* string);
330
331 // functions for parcel action (used for logging)
332 static const char* getActionString(EAction action);
333
334 // dealing with sales and parcel conversion.
335 //
336 // the isSaleTimerExpired will trivially return FALSE if there is
337 // no sale going on. Pass in the current time in usec which will
338 // be used for comparison.
339 BOOL isSaleTimerExpired(const U64& time);
340
341 F32 getSaleTimerExpires() { return mSaleTimerExpires.getRemainingTimeF32(); }
342
343 // should the parcel join on complete?
344 //U32 getJoinNeighbors() const { return mJoinNeighbors; }
345
346 // need to record a few things with the parcel when a sale
347 // starts.
348 void startSale(const LLUUID& buyer_id, BOOL is_buyer_group);
349
350 // do the expiration logic, which needs to return values usable in
351 // a money transaction.
352 void expireSale(U32& type, U8& flags, LLUUID& from_id, LLUUID& to_id);
353 void completeSale(U32& type, U8& flags, LLUUID& to_id);
354 void clearSale();
355
356 // this function returns TRUE if the parcel needs conversion to a
357 // lease from a non-owned-status state.
358 BOOL getRecordTransaction() const { return mRecordTransaction; }
359 void setRecordTransaction(BOOL record) { mRecordTransaction = record; }
360
361
362 // more accessors
363 U32 getParcelFlags() const { return mParcelFlags; }
364
365 BOOL getParcelFlag(U32 flag) const
366 { return (mParcelFlags & flag) ? TRUE : FALSE; }
367
368 // objects can be added or modified by anyone (only parcel owner if disabled)
369 BOOL getAllowModify() const
370 { return (mParcelFlags & PF_CREATE_OBJECTS) ? TRUE : FALSE; }
371
372 // objects can be added or modified by group members
373 BOOL getAllowGroupModify() const
374 { return (mParcelFlags & PF_CREATE_GROUP_OBJECTS) ? TRUE : FALSE; }
375
376 // the parcel can be deeded to the group
377 BOOL getAllowDeedToGroup() const
378 { return (mParcelFlags & PF_ALLOW_DEED_TO_GROUP) ? TRUE : FALSE; }
379
380 // Does the owner want to make a contribution along with the deed.
381 BOOL getContributeWithDeed() const
382 { return (mParcelFlags & PF_CONTRIBUTE_WITH_DEED) ? TRUE : FALSE; }
383
384 // heightfield can be modified
385 BOOL getAllowTerraform() const
386 { return (mParcelFlags & PF_ALLOW_TERRAFORM) ? TRUE : FALSE; }
387
388 // avatars can be hurt here
389 BOOL getAllowDamage() const
390 { return (mParcelFlags & PF_ALLOW_DAMAGE) ? TRUE : FALSE; }
391
392 BOOL getAllowFly() const
393 { return (mParcelFlags & PF_ALLOW_FLY) ? TRUE : FALSE; }
394
395 BOOL getAllowLandmark() const
396 { return (mParcelFlags & PF_ALLOW_LANDMARK) ? TRUE : FALSE; }
397
398 BOOL getAllowGroupScripts() const
399 { return (mParcelFlags & PF_ALLOW_GROUP_SCRIPTS) ? TRUE : FALSE; }
400
401 BOOL getAllowOtherScripts() const
402 { return (mParcelFlags & PF_ALLOW_OTHER_SCRIPTS) ? TRUE : FALSE; }
403
404 BOOL getAllowAllObjectEntry() const
405 { return (mParcelFlags & PF_ALLOW_ALL_OBJECT_ENTRY) ? TRUE : FALSE; }
406
407 BOOL getAllowGroupObjectEntry() const
408 { return (mParcelFlags & PF_ALLOW_GROUP_OBJECT_ENTRY) ? TRUE : FALSE; }
409
410 BOOL getForSale() const
411 { return (mParcelFlags & PF_FOR_SALE) ? TRUE : FALSE; }
412 BOOL getSoundLocal() const
413 { return (mParcelFlags & PF_SOUND_LOCAL) ? TRUE : FALSE; }
414 BOOL getAllowPublish() const
415 { return (mParcelFlags & PF_ALLOW_PUBLISH) ? TRUE : FALSE; }
416 BOOL getMaturePublish() const
417 { return (mParcelFlags & PF_MATURE_PUBLISH) ? TRUE : FALSE; }
418 BOOL getRestrictPushObject() const
419 { return (mParcelFlags & PF_RESTRICT_PUSHOBJECT) ? TRUE : FALSE; }
420 BOOL getRegionPushOverride() const
421 { return mRegionPushOverride; }
422 BOOL getRegionDenyAnonymousOverride() const
423 { return mRegionDenyAnonymousOverride; }
424 BOOL getRegionDenyIdentifiedOverride() const
425 { return mRegionDenyIdentifiedOverride; }
426 BOOL getRegionDenyTransactedOverride() const
427 { return mRegionDenyTransactedOverride; }
428
429 F32 getDrawDistance() const { return mDrawDistance; }
430 S32 getSalePrice() const { return mSalePrice; }
431 time_t getClaimDate() const { return mClaimDate; }
432 S32 getClaimPricePerMeter() const { return mClaimPricePerMeter; }
433 S32 getRentPricePerMeter() const { return mRentPricePerMeter; }
434
435 // Area is NOT automatically calculated. You must calculate it
436 // and store it with setArea.
437 S32 getArea() const { return mArea; }
438
439 // deprecated 12/11/2003
440 //F32 getDiscountRate() const { return mDiscountRate; }
441
442 S32 getClaimPrice() const { return mClaimPricePerMeter * mArea; }
443
444 // Can this agent create objects here?
445 BOOL allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) const;
446
447 // Can this agent change the shape of the land?
448 BOOL allowTerraformBy(const LLUUID &agent_id) const;
449
450 // Returns 0 if access is OK, otherwise a BA_ return code above.
451 S32 blockAccess(const LLUUID& agent_id, const LLUUID& group_id, const BOOL is_agent_identified, const BOOL is_agent_transacted) const;
452
453 // Only checks if the agent is explicitly banned from this parcel
454 BOOL isAgentBanned(const LLUUID& agent_id) const;
455
456 static bool isAgentBlockedFromParcel(LLParcel* parcelp,
457 const LLUUID& agent_id,
458 const std::vector<LLUUID>& group_ids,
459 const BOOL is_agent_identified,
460 const BOOL is_agent_transacted);
461
462 bool operator==(const LLParcel &rhs) const;
463
464 // Calculate rent - area * rent * discount rate
465 S32 getTotalRent() const;
466 F32 getAdjustedRentPerMeter() const;
467
468 const LLVector3& getAABBMin() const { return mAABBMin; }
469 const LLVector3& getAABBMax() const { return mAABBMax; }
470 LLVector3 getCenterpoint() const;
471
472 // simwide
473 S32 getSimWideMaxPrimCapacity() const { return mSimWideMaxPrimCapacity; }
474 S32 getSimWidePrimCount() const { return mSimWidePrimCount; }
475
476 // this parcel only (not simwide)
477 S32 getMaxPrimCapacity() const { return mMaxPrimCapacity; }
478 S32 getPrimCount() const { return mOwnerPrimCount + mGroupPrimCount + mOtherPrimCount + mSelectedPrimCount; }
479 S32 getOwnerPrimCount() const { return mOwnerPrimCount; }
480 S32 getGroupPrimCount() const { return mGroupPrimCount; }
481 S32 getOtherPrimCount() const { return mOtherPrimCount; }
482 S32 getSelectedPrimCount() const{ return mSelectedPrimCount; }
483 S32 getTempPrimCount() const { return mTempPrimCount; }
484 F32 getParcelPrimBonus() const { return mParcelPrimBonus; }
485
486 S32 getCleanOtherTime() const { return mCleanOtherTime; }
487
488 void setMaxPrimCapacity(S32 max) { mMaxPrimCapacity = max; }
489 // simwide
490 void setSimWideMaxPrimCapacity(S32 current) { mSimWideMaxPrimCapacity = current; }
491 void setSimWidePrimCount(S32 current) { mSimWidePrimCount = current; }
492
493 // this parcel only (not simwide)
494 void setOwnerPrimCount(S32 current) { mOwnerPrimCount = current; }
495 void setGroupPrimCount(S32 current) { mGroupPrimCount = current; }
496 void setOtherPrimCount(S32 current) { mOtherPrimCount = current; }
497 void setSelectedPrimCount(S32 current) { mSelectedPrimCount = current; }
498 void setTempPrimCount(S32 current) { mTempPrimCount = current; }
499 void setParcelPrimBonus(F32 bonus) { mParcelPrimBonus = bonus; }
500
501 void setCleanOtherTime(S32 time) { mCleanOtherTime = time; }
502 void setRegionPushOverride(BOOL override) {mRegionPushOverride = override; }
503 void setRegionDenyAnonymousOverride(BOOL override) { mRegionDenyAnonymousOverride = override; }
504 void setRegionDenyIdentifiedOverride(BOOL override) { mRegionDenyIdentifiedOverride = override; }
505 void setRegionDenyTransactedOverride(BOOL override) { mRegionDenyTransactedOverride = override; }
506
507 // Accessors for parcel sellWithObjects
508 void setPreviousOwnerID(LLUUID prev_owner) { mPreviousOwnerID = prev_owner; }
509 void setPreviouslyGroupOwned(BOOL b) { mPreviouslyGroupOwned = b; }
510 void setSellWithObjects(BOOL b) { setParcelFlag(PF_SELL_PARCEL_OBJECTS, b); }
511
512 LLUUID getPreviousOwnerID() const { return mPreviousOwnerID; }
513 BOOL getPreviouslyGroupOwned() const { return mPreviouslyGroupOwned; }
514 BOOL getSellWithObjects() const { return (mParcelFlags & PF_SELL_PARCEL_OBJECTS) ? TRUE : FALSE; }
515
516protected:
517 LLUUID mID;
518 LLUUID mOwnerID;
519 LLUUID mGroupID;
520 BOOL mGroupOwned; // TRUE if mOwnerID is a group_id
521 LLUUID mPreviousOwnerID;
522 BOOL mPreviouslyGroupOwned;
523
524 EOwnershipStatus mStatus;
525 ECategory mCategory;
526 LLUUID mAuthBuyerID;
527 LLUUID mSnapshotID;
528 LLVector3 mUserLocation;
529 LLVector3 mUserLookAt;
530 ELandingType mLandingType;
531 LLTimer mSaleTimerExpires;
532 S32 mGraceExtension;
533 BOOL mRecordTransaction;
534
535
536 // This value is non-zero if there is an auction associated with
537 // the parcel.
538 U32 mAuctionID;
539
540 // This value is TRUE if the land is reserved for a newbie.
541 BOOL mIsReservedForNewbie;
542
543 // value used to temporarily lock attempts to purchase the parcel.
544 bool mInEscrow;
545
546 time_t mClaimDate; // UTC Unix-format time
547 S32 mClaimPricePerMeter; // meter squared
548 S32 mRentPricePerMeter; // meter squared
549 S32 mArea; // meter squared
550 F32 mDiscountRate; // 0.0-1.0
551 F32 mDrawDistance;
552 U32 mParcelFlags;
553 S32 mSalePrice; // linden dollars
554 std::string mName;
555 std::string mDesc;
556 std::string mMusicURL;
557 std::string mMediaURL;
558 U8 mMediaAutoScale;
559 LLUUID mMediaID;
560 S32 mPassPrice;
561 F32 mPassHours;
562 LLVector3 mAABBMin;
563 LLVector3 mAABBMax;
564 S32 mMaxPrimCapacity;
565 S32 mSimWidePrimCount;
566 S32 mSimWideMaxPrimCapacity;
567 //S32 mSimWidePrimCorrection;
568 S32 mOwnerPrimCount;
569 S32 mGroupPrimCount;
570 S32 mOtherPrimCount;
571 S32 mSelectedPrimCount;
572 S32 mTempPrimCount;
573 F32 mParcelPrimBonus;
574 S32 mCleanOtherTime;
575 BOOL mRegionPushOverride;
576 BOOL mRegionDenyAnonymousOverride;
577 BOOL mRegionDenyIdentifiedOverride;
578 BOOL mRegionDenyTransactedOverride;
579
580
581public:
582 // HACK, make private
583 S32 mLocalID;
584 LLUUID mBanListTransactionID;
585 LLUUID mAccessListTransactionID;
586 std::map<LLUUID,LLAccessEntry> mAccessList;
587 std::map<LLUUID,LLAccessEntry> mBanList;
588 std::map<LLUUID,LLAccessEntry> mTempBanList;
589 std::map<LLUUID,LLAccessEntry> mTempAccessList;
590
591 //LLDynamicArray<LLAccessEntry> mRenterList;
592};
593
594
595#endif