本文整理汇总了C++中LLParcelSelectionHandle::getMultipleOwners方法的典型用法代码示例。如果您正苦于以下问题:C++ LLParcelSelectionHandle::getMultipleOwners方法的具体用法?C++ LLParcelSelectionHandle::getMultipleOwners怎么用?C++ LLParcelSelectionHandle::getMultipleOwners使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLParcelSelectionHandle
的用法示例。
在下文中一共展示了LLParcelSelectionHandle::getMultipleOwners方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
//.........这里部分代码省略.........