Proleric has it right.
Your first line boils down to,
iItemType = BASE_ITEM_MAGICROD;
if(TRUE)
{
...
}
Basically the expression if(a&&b||c) becomes if( (a && b ) || c). Thus if c is TRUE, which is the case since BASE_ITEM_MAGICROD is not 0, then the whole expression is true.
There is a slight further complication in that if ( a && b ) is TRUE, then c will not be evaluated, because the expression will always end up true, so iItemType will not be changed.