git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4237 c06c8d41-db1a-0410-9941-cceddc491573
TK2BJDNDUF2XVLLLSGFXTK3ESZOQ6GGJC3UXENOCMEQXC4AE6T6AC ASSERT(m_last_used_type != AMMO_INVALID);// I'd like to get rid of this first caseif (m_last_used_type == AMMO_INVALID)
const int slot = _get_pack_slot(m_last_used_of_type[m_last_used_type]);if (slot == -1)
const int slot = _get_pack_slot(m_last_used_of_type[m_last_used_type]);if (slot == -1){// Not in inv, but caller can at least get the type of the item.if (item_out) *item_out = &m_last_used_of_type[m_last_used_type];}else{// Return the item in inv, since it will have an accurate countif (item_out) *item_out = &you.inv[slot];}if (slot_out) *slot_out = slot;
// Return the item in inv, since it will have an accurate countif (item_out) *item_out = &you.inv[slot];