diff options
Diffstat (limited to 'linden/indra/newview/llpanelinventory.cpp')
-rw-r--r-- | linden/indra/newview/llpanelinventory.cpp | 57 |
1 files changed, 28 insertions, 29 deletions
diff --git a/linden/indra/newview/llpanelinventory.cpp b/linden/indra/newview/llpanelinventory.cpp index 13cee05..13f07c0 100644 --- a/linden/indra/newview/llpanelinventory.cpp +++ b/linden/indra/newview/llpanelinventory.cpp | |||
@@ -223,39 +223,38 @@ void LLTaskInvFVBridge::buyItem() | |||
223 | { | 223 | { |
224 | gViewerWindow->alertXml("Cannot_Purchase_an_Attachment"); | 224 | gViewerWindow->alertXml("Cannot_Purchase_an_Attachment"); |
225 | llinfos << "Attempt to purchase an attachment" << llendl; | 225 | llinfos << "Attempt to purchase an attachment" << llendl; |
226 | delete inv; | ||
226 | } | 227 | } |
227 | else | 228 | else |
228 | { | 229 | { |
229 | 230 | LLString::format_map_t args; | |
230 | 231 | args["[PRICE]"] = llformat("%d",sale_info.getSalePrice()); | |
231 | LLString::format_map_t args; | 232 | args["[OWNER]"] = owner_name; |
232 | args["[PRICE]"] = llformat("%d",sale_info.getSalePrice()); | 233 | if (sale_info.getSaleType() != LLSaleInfo::FS_CONTENTS) |
233 | args["[OWNER]"] = owner_name; | 234 | { |
234 | if (sale_info.getSaleType() != LLSaleInfo::FS_CONTENTS) | 235 | U32 next_owner_mask = perm.getMaskNextOwner(); |
235 | { | 236 | args["[MODIFYPERM]"] = LLAlertDialog::getTemplateMessage((next_owner_mask & PERM_MODIFY) ? "PermYes" : "PermNo"); |
236 | U32 next_owner_mask = perm.getMaskNextOwner(); | 237 | args["[COPYPERM]"] = LLAlertDialog::getTemplateMessage((next_owner_mask & PERM_COPY) ? "PermYes" : "PermNo"); |
237 | args["[MODIFYPERM]"] = LLAlertDialog::getTemplateMessage((next_owner_mask & PERM_MODIFY) ? "PermYes" : "PermNo"); | 238 | args["[RESELLPERM]"] = LLAlertDialog::getTemplateMessage((next_owner_mask & PERM_TRANSFER) ? "PermYes" : "PermNo"); |
238 | args["[COPYPERM]"] = LLAlertDialog::getTemplateMessage((next_owner_mask & PERM_COPY) ? "PermYes" : "PermNo"); | ||
239 | args["[RESELLPERM]"] = LLAlertDialog::getTemplateMessage((next_owner_mask & PERM_TRANSFER) ? "PermYes" : "PermNo"); | ||
240 | } | ||
241 | |||
242 | LLString alertdesc; | ||
243 | switch(sale_info.getSaleType()) | ||
244 | { | ||
245 | case LLSaleInfo::FS_ORIGINAL: | ||
246 | alertdesc = owner_name.empty() ? "BuyOriginalNoOwner" : "BuyOriginal"; | ||
247 | break; | ||
248 | case LLSaleInfo::FS_COPY: | ||
249 | default: | ||
250 | alertdesc = owner_name.empty() ? "BuyCopyNoOwner" : "BuyCopy"; | ||
251 | break; | ||
252 | case LLSaleInfo::FS_CONTENTS: | ||
253 | alertdesc = owner_name.empty() ? "BuyContentsNoOwner" : "BuyContents"; | ||
254 | break; | ||
255 | } | ||
256 | |||
257 | gViewerWindow->alertXml(alertdesc, args, LLTaskInvFVBridge::commitBuyItem, (void*)inv); | ||
258 | } | 239 | } |
240 | |||
241 | LLString alertdesc; | ||
242 | switch(sale_info.getSaleType()) | ||
243 | { | ||
244 | case LLSaleInfo::FS_ORIGINAL: | ||
245 | alertdesc = owner_name.empty() ? "BuyOriginalNoOwner" : "BuyOriginal"; | ||
246 | break; | ||
247 | case LLSaleInfo::FS_CONTENTS: | ||
248 | alertdesc = owner_name.empty() ? "BuyContentsNoOwner" : "BuyContents"; | ||
249 | break; | ||
250 | case LLSaleInfo::FS_COPY: | ||
251 | default: | ||
252 | alertdesc = owner_name.empty() ? "BuyCopyNoOwner" : "BuyCopy"; | ||
253 | break; | ||
254 | } | ||
255 | |||
256 | gViewerWindow->alertXml(alertdesc, args, LLTaskInvFVBridge::commitBuyItem, (void*)inv); | ||
257 | } | ||
259 | } | 258 | } |
260 | 259 | ||
261 | S32 LLTaskInvFVBridge::getPrice() | 260 | S32 LLTaskInvFVBridge::getPrice() |