void LLParcel::clearParcel() { overrideParcelFlags(PF_DEFAULT); setName(LLStringUtil::null); setDesc(LLStringUtil::null); setMediaURL(LLStringUtil::null); setMediaType(LLStringUtil::null); setMediaID(LLUUID::null); setMediaDesc(LLStringUtil::null); setMediaAutoScale(0); setMediaLoop(TRUE); mMediaWidth = 0; mMediaHeight = 0; setMediaCurrentURL(LLStringUtil::null); setMediaAllowNavigate(TRUE); setMediaPreventCameraZoom(FALSE); setMediaURLTimeout(0.0f); setMusicURL(LLStringUtil::null); setInEscrow(FALSE); setAuthorizedBuyerID(LLUUID::null); setCategory(C_NONE); setSnapshotID(LLUUID::null); setUserLocation(LLVector3::zero); setUserLookAt(LLVector3::x_axis); setLandingType(L_LANDING_POINT); setAuctionID(0); setGroupID(LLUUID::null); setPassPrice(0); setPassHours(0.f); mAccessList.clear(); mBanList.clear(); //mRenterList.reset(); }
void LLParcel::unpackMessage(LLMessageSystem* msg) { std::string buffer; msg->getU32Fast( _PREHASH_ParcelData,_PREHASH_ParcelFlags, mParcelFlags ); msg->getS32Fast( _PREHASH_ParcelData,_PREHASH_SalePrice, mSalePrice ); msg->getStringFast( _PREHASH_ParcelData,_PREHASH_Name, buffer ); setName(buffer); msg->getStringFast( _PREHASH_ParcelData,_PREHASH_Desc, buffer ); setDesc(buffer); msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MusicURL, buffer ); setMusicURL(buffer); msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MediaURL, buffer ); setMediaURL(buffer); // non-optimized version msg->getU8 ( "ParcelData", "MediaAutoScale", mMediaAutoScale ); msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_MediaID, mMediaID ); msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_GroupID, mGroupID ); msg->getS32Fast( _PREHASH_ParcelData,_PREHASH_PassPrice, mPassPrice ); msg->getF32Fast( _PREHASH_ParcelData,_PREHASH_PassHours, mPassHours ); U8 category; msg->getU8Fast( _PREHASH_ParcelData,_PREHASH_Category, category); mCategory = (ECategory)category; msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_AuthBuyerID, mAuthBuyerID); msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_SnapshotID, mSnapshotID); msg->getVector3Fast(_PREHASH_ParcelData,_PREHASH_UserLocation, mUserLocation); msg->getVector3Fast(_PREHASH_ParcelData,_PREHASH_UserLookAt, mUserLookAt); U8 landing_type; msg->getU8Fast( _PREHASH_ParcelData,_PREHASH_LandingType, landing_type); mLandingType = (ELandingType)landing_type; // New Media Data // Note: the message has been converted to TCP if(msg->has("MediaData")) { msg->getString("MediaData", "MediaDesc", buffer); setMediaDesc(buffer); msg->getString("MediaData", "MediaType", buffer); setMediaType(buffer); msg->getS32("MediaData", "MediaWidth", mMediaWidth); msg->getS32("MediaData", "MediaHeight", mMediaHeight); msg->getU8 ( "MediaData", "MediaLoop", mMediaLoop ); msg->getU8 ( "MediaData", "ObscureMedia", mObscureMedia ); msg->getU8 ( "MediaData", "ObscureMusic", mObscureMusic ); } else { setMediaType(std::string("video/vnd.secondlife.qt.legacy")); setMediaDesc(std::string("No Description available without Server Upgrade")); mMediaLoop = true; mObscureMedia = true; mObscureMusic = true; } }
void LLParcel::unpackMessage(LLMessageSystem* msg) { std::string buffer; msg->getU32Fast( _PREHASH_ParcelData,_PREHASH_ParcelFlags, mParcelFlags ); msg->getS32Fast( _PREHASH_ParcelData,_PREHASH_SalePrice, mSalePrice ); msg->getStringFast( _PREHASH_ParcelData,_PREHASH_Name, buffer ); setName(buffer); msg->getStringFast( _PREHASH_ParcelData,_PREHASH_Desc, buffer ); setDesc(buffer); msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MusicURL, buffer ); setMusicURL(buffer); msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MediaURL, buffer ); setMediaURL(buffer); BOOL see_avs = TRUE; // All default to true for legacy server behavior BOOL any_av_sounds = TRUE; BOOL group_av_sounds = TRUE; bool have_new_parcel_limit_data = (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_SeeAVs) > 0); // New version of server should send all 3 of these values have_new_parcel_limit_data &= (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_AnyAVSounds) > 0); have_new_parcel_limit_data &= (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_GroupAVSounds) > 0); if (have_new_parcel_limit_data) { msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_SeeAVs, see_avs); msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_AnyAVSounds, any_av_sounds); msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_GroupAVSounds, group_av_sounds); } setSeeAVs((bool) see_avs); setAllowAnyAVSounds((bool) any_av_sounds); setAllowGroupAVSounds((bool) group_av_sounds); setHaveNewParcelLimitData(have_new_parcel_limit_data); // non-optimized version msg->getU8 ( "ParcelData", "MediaAutoScale", mMediaAutoScale ); msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_MediaID, mMediaID ); msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_GroupID, mGroupID ); msg->getS32Fast( _PREHASH_ParcelData,_PREHASH_PassPrice, mPassPrice ); msg->getF32Fast( _PREHASH_ParcelData,_PREHASH_PassHours, mPassHours ); U8 category; msg->getU8Fast( _PREHASH_ParcelData,_PREHASH_Category, category); mCategory = (ECategory)category; msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_AuthBuyerID, mAuthBuyerID); msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_SnapshotID, mSnapshotID); msg->getVector3Fast(_PREHASH_ParcelData,_PREHASH_UserLocation, mUserLocation); msg->getVector3Fast(_PREHASH_ParcelData,_PREHASH_UserLookAt, mUserLookAt); U8 landing_type; msg->getU8Fast( _PREHASH_ParcelData,_PREHASH_LandingType, landing_type); mLandingType = (ELandingType)landing_type; // New Media Data // Note: the message has been converted to TCP if(msg->has("MediaData")) { msg->getString("MediaData", "MediaDesc", buffer); setMediaDesc(buffer); msg->getString("MediaData", "MediaType", buffer); setMediaType(buffer); msg->getS32("MediaData", "MediaWidth", mMediaWidth); msg->getS32("MediaData", "MediaHeight", mMediaHeight); msg->getU8 ( "MediaData", "MediaLoop", mMediaLoop ); // the ObscureMedia and ObscureMusic flags previously set here are no longer used } else { setMediaType(std::string("video/vnd.secondlife.qt.legacy")); setMediaDesc(std::string("No Description available without Server Upgrade")); mMediaLoop = true; } if(msg->getNumberOfBlocks("MediaLinkSharing") > 0) { msg->getString("MediaLinkSharing", "MediaCurrentURL", buffer); setMediaCurrentURL(buffer); msg->getU8 ( "MediaLinkSharing", "MediaAllowNavigate", mMediaAllowNavigate ); msg->getU8 ( "MediaLinkSharing", "MediaPreventCameraZoom", mMediaPreventCameraZoom ); msg->getF32( "MediaLinkSharing", "MediaURLTimeout", mMediaURLTimeout); } else { setMediaCurrentURL(LLStringUtil::null); } }
void LLParcel::init(const LLUUID &owner_id, BOOL modify, BOOL terraform, BOOL damage, time_t claim_date, S32 claim_price_per_meter, S32 rent_price_per_meter, S32 area, S32 sim_object_limit, F32 parcel_object_bonus, BOOL is_group_owned) { mID.setNull(); mOwnerID = owner_id; mGroupOwned = is_group_owned; mClaimDate = claim_date; mClaimPricePerMeter = claim_price_per_meter; mRentPricePerMeter = rent_price_per_meter; mArea = area; mDiscountRate = 1.0f; mDrawDistance = 512.f; mUserLookAt.setVec(0.0f, 0.f, 0.f); // Default to using the parcel's landing point, if any. mLandingType = L_LANDING_POINT; // *FIX: if owner_id != null, should be owned or sale pending, // investigate init callers. mStatus = OS_NONE; mCategory = C_NONE; mAuthBuyerID.setNull(); //mBuyerID.setNull(); //mJoinNeighbors = 0x0; mSaleTimerExpires.setTimerExpirySec(0); mSaleTimerExpires.stop(); mGraceExtension = 0; //mExpireAction = STEA_REVERT; //mRecordTransaction = FALSE; mAuctionID = 0; mInEscrow = false; mParcelFlags = PF_DEFAULT; setParcelFlag(PF_CREATE_OBJECTS, modify); setParcelFlag(PF_ALLOW_TERRAFORM, terraform); setParcelFlag(PF_ALLOW_DAMAGE, damage); mSalePrice = 10000; setName(LLStringUtil::null); setDesc(LLStringUtil::null); setMusicURL(LLStringUtil::null); setMediaURL(LLStringUtil::null); setMediaDesc(LLStringUtil::null); setMediaType(LLStringUtil::null); mMediaID.setNull(); mMediaAutoScale = 0; mMediaLoop = TRUE; mMediaWidth = 0; mMediaHeight = 0; setMediaCurrentURL(LLStringUtil::null); mMediaAllowNavigate = TRUE; mMediaURLTimeout = 0.0f; mMediaPreventCameraZoom = FALSE; mGroupID.setNull(); mPassPrice = PARCEL_PASS_PRICE_DEFAULT; mPassHours = PARCEL_PASS_HOURS_DEFAULT; mAABBMin.setVec(SOME_BIG_NUMBER, SOME_BIG_NUMBER, SOME_BIG_NUMBER); mAABBMax.setVec(SOME_BIG_NEG_NUMBER, SOME_BIG_NEG_NUMBER, SOME_BIG_NEG_NUMBER); mLocalID = INVALID_PARCEL_ID; //mSimWidePrimCorrection = 0; setMaxPrimCapacity((S32)(sim_object_limit * area / (F32)(REGION_WIDTH_METERS * REGION_WIDTH_METERS))); setSimWideMaxPrimCapacity(0); setSimWidePrimCount(0); setOwnerPrimCount(0); setGroupPrimCount(0); setOtherPrimCount(0); setSelectedPrimCount(0); setTempPrimCount(0); setCleanOtherTime(0); setRegionPushOverride(FALSE); setRegionDenyAnonymousOverride(FALSE); setRegionDenyAgeUnverifiedOverride(FALSE); setParcelPrimBonus(parcel_object_bonus); setPreviousOwnerID(LLUUID::null); setPreviouslyGroupOwned(FALSE); setSeeAVs(TRUE); setAllowGroupAVSounds(TRUE); setAllowAnyAVSounds(TRUE); setHaveNewParcelLimitData(FALSE); }
void LLParcel::unpackMessage(LLMessageSystem* msg) { std::string buffer; msg->getU32Fast( _PREHASH_ParcelData,_PREHASH_ParcelFlags, mParcelFlags ); msg->getS32Fast( _PREHASH_ParcelData,_PREHASH_SalePrice, mSalePrice ); msg->getStringFast( _PREHASH_ParcelData,_PREHASH_Name, buffer ); setName(buffer); msg->getStringFast( _PREHASH_ParcelData,_PREHASH_Desc, buffer ); setDesc(buffer); msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MusicURL, buffer ); setMusicURL(buffer); msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MediaURL, buffer ); setMediaURL(buffer); // non-optimized version msg->getU8 ( "ParcelData", "MediaAutoScale", mMediaAutoScale ); msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_MediaID, mMediaID ); msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_GroupID, mGroupID ); msg->getS32Fast( _PREHASH_ParcelData,_PREHASH_PassPrice, mPassPrice ); msg->getF32Fast( _PREHASH_ParcelData,_PREHASH_PassHours, mPassHours ); U8 category; msg->getU8Fast( _PREHASH_ParcelData,_PREHASH_Category, category); mCategory = (ECategory)category; msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_AuthBuyerID, mAuthBuyerID); msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_SnapshotID, mSnapshotID); msg->getVector3Fast(_PREHASH_ParcelData,_PREHASH_UserLocation, mUserLocation); msg->getVector3Fast(_PREHASH_ParcelData,_PREHASH_UserLookAt, mUserLookAt); U8 landing_type; msg->getU8Fast( _PREHASH_ParcelData,_PREHASH_LandingType, landing_type); mLandingType = (ELandingType)landing_type; // New Media Data // Note: the message has been converted to TCP if(msg->has("MediaData")) { msg->getString("MediaData", "MediaDesc", buffer); setMediaDesc(buffer); msg->getString("MediaData", "MediaType", buffer); setMediaType(buffer); msg->getS32("MediaData", "MediaWidth", mMediaWidth); msg->getS32("MediaData", "MediaHeight", mMediaHeight); msg->getU8 ( "MediaData", "MediaLoop", mMediaLoop ); } else { setMediaType(std::string("")); //having mMediaType empty causes autodetect, // thats what we want -- AW setMediaDesc(std::string("No Description available without Server Upgrade")); mMediaLoop = true; } if(msg->getNumberOfBlocks("MediaLinkSharing") > 0) { msg->getString("MediaLinkSharing", "MediaCurrentURL", buffer); setMediaCurrentURL(buffer); msg->getU8 ( "MediaLinkSharing", "MediaAllowNavigate", mMediaAllowNavigate ); msg->getU8 ( "MediaLinkSharing", "MediaURLFilterEnable", mMediaURLFilterEnable ); msg->getU8 ( "MediaLinkSharing", "MediaPreventCameraZoom", mMediaPreventCameraZoom ); msg->getF32( "MediaLinkSharing", "MediaURLTimeout", mMediaURLTimeout); } else { setMediaCurrentURL(LLStringUtil::null); } }