diff options
Diffstat (limited to 'linden/indra/llinventory/llsaleinfo.cpp')
-rw-r--r-- | linden/indra/llinventory/llsaleinfo.cpp | 21 |
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 | ||
283 | LLSD 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 | |||
283 | void LLSaleInfo::packMessage(LLMessageSystem* msg) const | 294 | void 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 | ||
302 | void 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 | |||
291 | void LLSaleInfo::unpackMessage(LLMessageSystem* msg, const char* block) | 312 | void LLSaleInfo::unpackMessage(LLMessageSystem* msg, const char* block) |
292 | { | 313 | { |
293 | U8 sale_type; | 314 | U8 sale_type; |