aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llinventory/llsaleinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llinventory/llsaleinfo.cpp')
-rw-r--r--linden/indra/llinventory/llsaleinfo.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/linden/indra/llinventory/llsaleinfo.cpp b/linden/indra/llinventory/llsaleinfo.cpp
index e7c429b..bff075b 100644
--- a/linden/indra/llinventory/llsaleinfo.cpp
+++ b/linden/indra/llinventory/llsaleinfo.cpp
@@ -280,6 +280,17 @@ void LLSaleInfo::setSalePrice(S32 price)
280 mSalePrice = llclamp(mSalePrice, 0, S32_MAX); 280 mSalePrice = llclamp(mSalePrice, 0, S32_MAX);
281} 281}
282 282
283LLSD LLSaleInfo::packMessage() const
284{
285 LLSD result;
286
287 U8 sale_type = static_cast<U8>(mSaleType);
288 result["sale-type"] = (U8)sale_type;
289 result["sale-price"] = (S32)mSalePrice;
290 //result[_PREHASH_NextOwnerMask] = mNextOwnerPermMask;
291 return result;
292}
293
283void LLSaleInfo::packMessage(LLMessageSystem* msg) const 294void LLSaleInfo::packMessage(LLMessageSystem* msg) const
284{ 295{
285 U8 sale_type = static_cast<U8>(mSaleType); 296 U8 sale_type = static_cast<U8>(mSaleType);
@@ -288,6 +299,16 @@ void LLSaleInfo::packMessage(LLMessageSystem* msg) const
288 //msg->addU32Fast(_PREHASH_NextOwnerMask, mNextOwnerPermMask); 299 //msg->addU32Fast(_PREHASH_NextOwnerMask, mNextOwnerPermMask);
289} 300}
290 301
302void LLSaleInfo::unpackMessage(LLSD sales)
303{
304 U8 sale_type = (U8)sales["sale-type"].asInteger();
305 mSaleType = static_cast<EForSale>(sale_type);
306
307 mSalePrice = (S32)sales["sale-price"].asInteger();
308 mSalePrice = llclamp(mSalePrice, 0, S32_MAX);
309 //msg->getU32Fast(block, _PREHASH_NextOwnerMask, mNextOwnerPermMask);
310}
311
291void LLSaleInfo::unpackMessage(LLMessageSystem* msg, const char* block) 312void LLSaleInfo::unpackMessage(LLMessageSystem* msg, const char* block)
292{ 313{
293 U8 sale_type; 314 U8 sale_type;