So, you're carrying two variables over to an item. Collection of flags applied to it (say, this item gets a socket and avoidance bonus, so two bits set, the rest unset) and ilvl bonus. If the bonus is 5, it's warforged. If it's over 5, it's titanforged. I am assuming that the bonus is...