diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2010-06-17 16:25:44 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2010-06-17 16:25:44 -0700 |
commit | a6774820bc455160c6e7be70506aac205ca7eac2 (patch) | |
tree | de0f17e7590bb55c7856f39a9cdea69f9cc63302 | |
parent | abd4a4e966f71966694b95ed213553a0f007cd11 (diff) |
EXT-7297 Viewer does not verify that a user has sufficient L$ when buying "contents" of an object
reviewed by richard, cc Review #217
-rw-r--r-- | indra/newview/llviewermenu.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 2c7ae539ce..59e21d0590 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3278,16 +3278,6 @@ void handle_buy_object(LLSaleInfo sale_info) return; } - S32 price = sale_info.getSalePrice(); - - if (price > 0 && price > gStatusBar->getBalance()) - { - LLStringUtil::format_map_t args; - args["AMOUNT"] = llformat("%d", price); - LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("this_object_costs", args), price ); - return; - } - LLFloaterBuy::show(sale_info); } @@ -4554,6 +4544,16 @@ void handle_buy() BOOL valid = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info); if (!valid) return; + S32 price = sale_info.getSalePrice(); + + if (price > 0 && price > gStatusBar->getBalance()) + { + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", price); + LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("this_object_costs", args), price ); + return; + } + if (sale_info.getSaleType() == LLSaleInfo::FS_CONTENTS) { handle_buy_contents(sale_info); |