From cd17687f01420952712a500107e0f93e7ab8d5f8 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:34 -0500 Subject: Second Life viewer sources 1.19.1.0 --- linden/indra/llinventory/llsaleinfo.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'linden/indra/llinventory/llsaleinfo.cpp') 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) mSalePrice = llclamp(mSalePrice, 0, S32_MAX); } +LLSD LLSaleInfo::packMessage() const +{ + LLSD result; + + U8 sale_type = static_cast(mSaleType); + result["sale-type"] = (U8)sale_type; + result["sale-price"] = (S32)mSalePrice; + //result[_PREHASH_NextOwnerMask] = mNextOwnerPermMask; + return result; +} + void LLSaleInfo::packMessage(LLMessageSystem* msg) const { U8 sale_type = static_cast(mSaleType); @@ -288,6 +299,16 @@ void LLSaleInfo::packMessage(LLMessageSystem* msg) const //msg->addU32Fast(_PREHASH_NextOwnerMask, mNextOwnerPermMask); } +void LLSaleInfo::unpackMessage(LLSD sales) +{ + U8 sale_type = (U8)sales["sale-type"].asInteger(); + mSaleType = static_cast(sale_type); + + mSalePrice = (S32)sales["sale-price"].asInteger(); + mSalePrice = llclamp(mSalePrice, 0, S32_MAX); + //msg->getU32Fast(block, _PREHASH_NextOwnerMask, mNextOwnerPermMask); +} + void LLSaleInfo::unpackMessage(LLMessageSystem* msg, const char* block) { U8 sale_type; -- cgit v1.1