This is an evil hack; we might be better off without it… Fixes 1853852.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5859 c06c8d41-db1a-0410-9941-cceddc491573
JQXHFM4ZKMAD4ZF4AFHF7TP45LLCIMFLX5VB262AXPJTXRXNV2HQC
if ( check_warning_inscriptions( *(tmp_items[i].item), OPER_DROP))
items_for_multidrop.push_back(tmp_items[i]);
{
SelItem& si(tmp_items[i]);
const int item_quant = si.item->quantity;
// EVIL HACK: fix item quantity to match the quantity we will drop,
// in order to prevent misleading messages when dropping
// 15 of 25 arrows inscribed with {!d}.
if ( si.quantity && si.quantity != item_quant )
const_cast<item_def*>(si.item)->quantity = si.quantity;
// Check if we can add it to the multidrop list
bool warning_ok = check_warning_inscriptions(*(si.item), OPER_DROP);
// Restore the item quantity if we mangled it
if ( item_quant != si.item->quantity )
const_cast<item_def*>(si.item)->quantity = item_quant;
if ( warning_ok )
items_for_multidrop.push_back(si);
}