本文整理汇总了C++中LLParcel::getIsGroupOwned方法的典型用法代码示例。如果您正苦于以下问题:C++ LLParcel::getIsGroupOwned方法的具体用法?C++ LLParcel::getIsGroupOwned怎么用?C++ LLParcel::getIsGroupOwned使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLParcel
的用法示例。
在下文中一共展示了LLParcel::getIsGroupOwned方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateNames
void LLFloaterBuyLandUI::updateNames()
{
LLParcel* parcelp = mParcel->getParcel();
if (!parcelp)
{
mParcelSellerName = LLStringUtil::null;
return;
}
if (mIsClaim)
{
mParcelSellerName = "Linden Lab";
}
else if (parcelp->getIsGroupOwned())
{
gCacheName->get(parcelp->getGroupID(), TRUE,
boost::bind(&LLFloaterBuyLandUI::updateGroupName, this,
_1, _2, _3, _4));
}
else
{
mParcelSellerName =
LLSLURL::buildCommand("agent", parcelp->getOwnerID(), "inspect");
}
}
示例2: updateNames
void LLFloaterBuyLandUI::updateNames()
{
LLParcel* parcelp = mParcel->getParcel();
if (!parcelp)
{
mParcelSellerName = LLStringUtil::null;
return;
}
if (mIsClaim)
{
mParcelSellerName = "Linden Lab";
}
else if (parcelp->getIsGroupOwned())
{
gCacheName->getGroup(parcelp->getGroupID(),
boost::bind(&LLFloaterBuyLandUI::updateGroupName, this,
_1, _2, _3));
}
else
{
mParcelSellerName = LLSLURL("agent", parcelp->getOwnerID(), "completename").getSLURLString();
}
}
示例3: updateNames
void LLFloaterBuyLandUI::updateNames()
{
LLParcel* parcelp = mParcel->getParcel();
if (!parcelp)
{
mParcelSellerName = LLStringUtil::null;
return;
}
if (mIsClaim)
{
mParcelSellerName = "Linden Lab";
}
else if (parcelp->getIsGroupOwned())
{
mParcelSellerName = "(Loading...)";
gCacheName->getGroup(parcelp->getGroupID(),
boost::bind(&LLFloaterBuyLandUI::updateName, this,
_1, _2, _3));
}
else
{
mParcelSellerName = "(Loading...)";
gCacheName->get(parcelp->getOwnerID(), false,
boost::bind(&LLFloaterBuyLandUI::updateName, this,
_1, _2, _3));
}
}
示例4: updateNames
void LLFloaterBuyLandUI::updateNames()
{
LLParcel* parcelp = mParcel->getParcel();
if (!parcelp)
{
mParcelSellerName = LLStringUtil::null;
return;
}
if (mIsClaim)
{
mParcelSellerName = "Linden Lab";
}
else if (parcelp->getIsGroupOwned())
{
gCacheName->getGroupName(parcelp->getGroupID(), mParcelSellerName);
}
else
{
gCacheName->getFullName(parcelp->getOwnerID(), mParcelSellerName);
}
}
示例5: updateParcelInfo
void LLFloaterBuyLandUI::updateParcelInfo()
{
LLParcel* parcel = mParcel->getParcel();
mParcelValid = parcel && mRegion;
mParcelIsForSale = false;
mParcelIsGroupLand = false;
mParcelGroupContribution = 0;
mParcelPrice = 0;
mParcelActualArea = 0;
mParcelBillableArea = 0;
mParcelSupportedObjects = 0;
mParcelSoldWithObjects = false;
mParcelLocation = "";
mParcelSnapshot.setNull();
mParcelSellerName = "";
mCanBuy = false;
mCannotBuyIsError = false;
if (!mParcelValid)
{
mCannotBuyReason = getString("no_land_selected");
return;
}
if (mParcel->getMultipleOwners())
{
mCannotBuyReason = getString("multiple_parcels_selected");
return;
}
const LLUUID& parcelOwner = parcel->getOwnerID();
mIsClaim = parcel->isPublic();
if (!mIsClaim)
{
mParcelActualArea = parcel->getArea();
mParcelIsForSale = parcel->getForSale();
mParcelIsGroupLand = parcel->getIsGroupOwned();
mParcelPrice = mParcelIsForSale ? parcel->getSalePrice() : 0;
if (mParcelIsGroupLand)
{
LLUUID group_id = parcel->getGroupID();
mParcelGroupContribution = gAgent.getGroupContribution(group_id);
}
}
else
{
mParcelActualArea = mParcel->getClaimableArea();
mParcelIsForSale = true;
mParcelPrice = mParcelActualArea * parcel->getClaimPricePerMeter();
}
mParcelBillableArea =
llround(mRegion->getBillableFactor() * mParcelActualArea);
mParcelSupportedObjects = llround(
parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus());
// Can't have more than region max tasks, regardless of parcel
// object bonus factor.
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
if(region)
{
S32 max_tasks_per_region = (S32)region->getMaxTasks();
mParcelSupportedObjects = llmin(
mParcelSupportedObjects, max_tasks_per_region);
}
mParcelSoldWithObjects = parcel->getSellWithObjects();
LLVector3 center = parcel->getCenterpoint();
mParcelLocation = llformat("%s %d,%d",
mRegion->getName().c_str(),
(int)center[VX], (int)center[VY]
);
mParcelSnapshot = parcel->getSnapshotID();
updateNames();
bool haveEnoughCash = mParcelPrice <= mAgentCashBalance;
S32 cashBuy = haveEnoughCash ? 0 : (mParcelPrice - mAgentCashBalance);
mCurrency.setAmount(cashBuy, true);
mCurrency.setZeroMessage(haveEnoughCash ? getString("none_needed") : LLStringUtil::null);
// checks that we can buy the land
if(mIsForGroup && !gAgent.hasPowerInActiveGroup(GP_LAND_DEED))
{
mCannotBuyReason = getString("cant_buy_for_group");
return;
}
if (!mIsClaim)
{
const LLUUID& authorizedBuyer = parcel->getAuthorizedBuyerID();
const LLUUID buyer = gAgent.getID();
const LLUUID newOwner = mIsForGroup ? gAgent.getGroupID() : buyer;
//.........这里部分代码省略.........
示例6: rez_supply
void LLXmlImport::rez_supply()
{
if(sImportInProgress && sXmlImportOptions && (sPrimsNeeded > 0))
{
sPrimsNeeded--;
//group
LLUUID group_id = gAgent.getGroupID();
LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (gSavedSettings.getBOOL("AscentAlwaysRezInGroup"))
{
if (gAgent.isInGroup(parcel->getGroupID()))
{
group_id = parcel->getGroupID();
}
else if (gAgent.isInGroup(parcel->getOwnerID()))
{
group_id = parcel->getOwnerID();
}
}
else if (gAgent.hasPowerInGroup(parcel->getGroupID(), GP_LAND_ALLOW_CREATE) && !parcel->getIsGroupOwned())
{
group_id = parcel->getGroupID();
}
// Need moar prims
if(sXmlImportOptions->mSupplier == NULL)
{
gMessageSystem->newMessageFast(_PREHASH_ObjectAdd);
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
gMessageSystem->addUUIDFast(_PREHASH_GroupID, group_id);
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
gMessageSystem->addU8Fast(_PREHASH_PCode, 9);
gMessageSystem->addU8Fast(_PREHASH_Material, LL_MCODE_WOOD);
gMessageSystem->addU32Fast(_PREHASH_AddFlags, FLAGS_CREATE_SELECTED);
gMessageSystem->addU8Fast(_PREHASH_PathCurve, 16);
gMessageSystem->addU8Fast(_PREHASH_ProfileCurve, 1);
gMessageSystem->addU16Fast(_PREHASH_PathBegin, 0);
gMessageSystem->addU16Fast(_PREHASH_PathEnd, 0);
gMessageSystem->addU8Fast(_PREHASH_PathScaleX, 100);
gMessageSystem->addU8Fast(_PREHASH_PathScaleY, 100);
gMessageSystem->addU8Fast(_PREHASH_PathShearX, 0);
gMessageSystem->addU8Fast(_PREHASH_PathShearY, 0);
gMessageSystem->addS8Fast(_PREHASH_PathTwist, 0);
gMessageSystem->addS8Fast(_PREHASH_PathTwistBegin, 0);
gMessageSystem->addS8Fast(_PREHASH_PathRadiusOffset, 0);
gMessageSystem->addS8Fast(_PREHASH_PathTaperX, 0);
gMessageSystem->addS8Fast(_PREHASH_PathTaperY, 0);
gMessageSystem->addU8Fast(_PREHASH_PathRevolutions, 0);
gMessageSystem->addS8Fast(_PREHASH_PathSkew, 0);
gMessageSystem->addU16Fast(_PREHASH_ProfileBegin, 0);
gMessageSystem->addU16Fast(_PREHASH_ProfileEnd, 0);
gMessageSystem->addU16Fast(_PREHASH_ProfileHollow, 0);
gMessageSystem->addU8Fast(_PREHASH_BypassRaycast, 1);
LLVector3 rezpos = gAgent.getPositionAgent() + LLVector3(0.0f, 0.0f, 2.0f);
gMessageSystem->addVector3Fast(_PREHASH_RayStart, rezpos);
gMessageSystem->addVector3Fast(_PREHASH_RayEnd, rezpos);
gMessageSystem->addUUIDFast(_PREHASH_RayTargetID, LLUUID::null);
gMessageSystem->addU8Fast(_PREHASH_RayEndIsIntersection, 0);
gMessageSystem->addVector3Fast(_PREHASH_Scale, sSupplyParams->getScale());
gMessageSystem->addQuatFast(_PREHASH_Rotation, LLQuaternion::DEFAULT);
gMessageSystem->addU8Fast(_PREHASH_State, 0);
gMessageSystem->sendReliable(gAgent.getRegionHost());
}
else // have supplier
{
gMessageSystem->newMessageFast(_PREHASH_ObjectDuplicate);
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
gMessageSystem->addUUIDFast(_PREHASH_GroupID, group_id);
gMessageSystem->nextBlockFast(_PREHASH_SharedData);
LLVector3 rezpos = gAgent.getPositionAgent() + LLVector3(0.0f, 0.0f, 2.0f);
rezpos -= sSupplyParams->getPositionRegion();
gMessageSystem->addVector3Fast(_PREHASH_Offset, rezpos);
gMessageSystem->addU32Fast(_PREHASH_DuplicateFlags, FLAGS_CREATE_SELECTED);
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, sXmlImportOptions->mSupplier->getLocalID());
gMessageSystem->sendReliable(gAgent.getRegionHost());
}
LLFloaterImportProgress::update();
}
}
示例7: refresh
//.........这里部分代码省略.........
pos_x -= pos_x % 2;
pos_y -= pos_y % 2;
}
mRegionDetails.mTime = mTextTime->getText();
mRegionDetails.mBalance = mBalance;
mRegionDetails.mAccessString = region->getSimAccessString();
mRegionDetails.mPing = region->getNetDetailsForLCD();
if (parcel)
{
location_name = region->getName()
+ llformat(" %d, %d, %d (%s) - %s",
pos_x, pos_y, pos_z,
region->getSimAccessString().c_str(),
parcel->getName().c_str());
// keep these around for the LCD to use
mRegionDetails.mRegionName = region->getName();
mRegionDetails.mParcelName = parcel->getName();
mRegionDetails.mX = pos_x;
mRegionDetails.mY = pos_y;
mRegionDetails.mZ = pos_z;
mRegionDetails.mArea = parcel->getArea();
mRegionDetails.mForSale = parcel->getForSale();
mRegionDetails.mTraffic = LLViewerParcelMgr::getInstance()->getDwelling();
if (parcel->isPublic())
{
mRegionDetails.mOwner = "Public";
}
else
{
if (parcel->getIsGroupOwned())
{
if(!parcel->getGroupID().isNull())
{
gCacheName->getGroupName(parcel->getGroupID(), mRegionDetails.mOwner);
}
else
{
mRegionDetails.mOwner = "Group Owned";
}
}
else
{
// Figure out the owner's name
gCacheName->getFullName(parcel->getOwnerID(), mRegionDetails.mOwner);
}
}
}
else
{
location_name = region->getName()
+ llformat(" %d, %d, %d (%s)",
pos_x, pos_y, pos_z,
region->getSimAccessString().c_str());
// keep these around for the LCD to use
mRegionDetails.mRegionName = region->getName();
mRegionDetails.mParcelName = "Unknown";
mRegionDetails.mX = pos_x;
mRegionDetails.mY = pos_y;
mRegionDetails.mZ = pos_z;
mRegionDetails.mArea = 0;
mRegionDetails.mForSale = FALSE;
示例8: refresh
//.........这里部分代码省略.........
pos_x -= pos_x % 2;
pos_y -= pos_y % 2;
}
mRegionDetails.mTime = mTextTime->getText();
mRegionDetails.mBalance = mBalance;
mRegionDetails.mAccessString = region->getSimAccessString();
mRegionDetails.mPing = region->getNetDetailsForLCD();
if (parcel)
{
location_name = region->getName()
+ llformat(" %d, %d, %d (%s) - %s",
pos_x, pos_y, pos_z,
region->getSimAccessString().c_str(),
parcel->getName().c_str());
// keep these around for the LCD to use
mRegionDetails.mRegionName = region->getName();
mRegionDetails.mParcelName = parcel->getName();
mRegionDetails.mX = pos_x;
mRegionDetails.mY = pos_y;
mRegionDetails.mZ = pos_z;
mRegionDetails.mArea = parcel->getArea();
mRegionDetails.mForSale = parcel->getForSale();
mRegionDetails.mTraffic = LLViewerParcelMgr::getInstance()->getDwelling();
if (parcel->isPublic())
{
mRegionDetails.mOwner = "Public";
}
else
{
if (parcel->getIsGroupOwned())
{
if(!parcel->getGroupID().isNull())
{
gCacheName->getGroupName(parcel->getGroupID(), mRegionDetails.mOwner);
}
else
{
mRegionDetails.mOwner = "Group Owned";
}
}
else
{
// Figure out the owner's name
gCacheName->getFullName(parcel->getOwnerID(), mRegionDetails.mOwner);
}
}
}
else
{
location_name = region->getName()
+ llformat(" %d, %d, %d (%s)",
pos_x, pos_y, pos_z,
region->getSimAccessString().c_str());
// keep these around for the LCD to use
mRegionDetails.mRegionName = region->getName();
mRegionDetails.mParcelName = "Unknown";
mRegionDetails.mX = pos_x;
mRegionDetails.mY = pos_y;
mRegionDetails.mZ = pos_z;
mRegionDetails.mArea = 0;
mRegionDetails.mForSale = FALSE;