本文整理汇总了C++中LLParcelSelectionHandle::hasOthersSelected方法的典型用法代码示例。如果您正苦于以下问题:C++ LLParcelSelectionHandle::hasOthersSelected方法的具体用法?C++ LLParcelSelectionHandle::hasOthersSelected怎么用?C++ LLParcelSelectionHandle::hasOthersSelected使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLParcelSelectionHandle
的用法示例。
在下文中一共展示了LLParcelSelectionHandle::hasOthersSelected方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateParcelInfo
//.........这里部分代码省略.........
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;
if (!mParcelIsForSale
|| (mParcelPrice == 0 && authorizedBuyer.isNull()))
{
mCannotBuyReason = getString("parcel_not_for_sale");
return;
}
if (parcelOwner == newOwner)
{
if (mIsForGroup)
{
mCannotBuyReason = getString("group_already_owns");
}
else
{
mCannotBuyReason = getString("you_already_own");
}
return;
}
if (!authorizedBuyer.isNull() && buyer != authorizedBuyer)
{
// Maybe the parcel is set for sale to a group we are in.
bool authorized_group =
gAgent.hasPowerInGroup(authorizedBuyer,GP_LAND_DEED)
&& gAgent.hasPowerInGroup(authorizedBuyer,GP_LAND_SET_SALE_INFO);
if (!authorized_group)
{
mCannotBuyReason = getString("set_to_sell_to_other");
return;
}
}
}
else
{
if (mParcelActualArea == 0)
{
mCannotBuyReason = getString("no_public_land");
return;
}
if (mParcel->hasOthersSelected())
{
// Policy: Must not have someone else's land selected
mCannotBuyReason = getString("not_owned_by_you");
return;
}
}
mCanBuy = true;
}