View Single Post
  #3  
Old 07-17-2015, 11:33 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Should change is_weapon into a ternary like how is_arrow is written above would look like this... (hopefully no typos here... I just woke up :p)

Code:
bool is_arrow = (item->ItemType == ItemTypeArrow) ? true : false;
                                int slot_id = thief->GetInv().FindFreeSlot(false, true, inst->GetItem()->Size, is_arrow);
                                bool is_weapon = (item->ItemType == ItemType1HSlash || item->ItemType == ItemType2HSlash || item->ItemType == ItemType1HPiercing || item->ItemType == ItemType1HBlunt || item->ItemType == ItemType2HBlunt || item->ItemType == ItemType2HPiercing) ? true : false;
				if (/*!Equipped(item->ID) &&*/
                                        !item->Magic && item->NoDrop != 0 && !inst->IsType(ItemClassContainer) && slot_id != INVALID_INDEX && !is_weapon
Reply With Quote