This line of code sets the "m_byEnhanceTimes" member variable of the object pointed to by "pItem" to a value calculated from the "iidentify" member variable of the object pointed to by "pItemData".

The ">>" operator is the bitwise right-shift operator, which shifts the binary representation of the value to its left by the number of bits specified on the right side of the operator. In this case, "(pItemData->iidentify >> 4)" shifts the binary representation of "iidentify" 4 bits to the right, effectively removing the 4 least significant bits.

The "&" operator is the bitwise AND operator, which compares the binary representation of two values and returns a value consisting of the bits that are set in both values. In this case, the result of "(pItemData->iidentify >> 4) & 15" is a value between 0 and 15 (inclusive), which is stored in the "m_byEnhanceTimes" member variable of the object pointed to by "pItem".

Overall, this line of code extracts a value from the "iidentify" member variable of an object pointed to by "pItemData", and uses that value to set the "m_byEnhanceTimes" member variable of another object pointed to by "pItem". The purpose and meaning of these member variables are not clear from this line of code alone

pItem-m_byEnhanceTimes = pItemData-iidentify 4 & 15;

原文地址: https://www.cveoy.top/t/topic/g8TL 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录