That is code in eqemu
commom\item.cpp
I have optimize the code. And I think there was a bug that BERSERKER always return false.
I am not sure what
Function : ItemCommonInst::IsEquipable
Code:
Code:
bool ItemCommonInst::IsEquipable(int16 race, int16 class_) const
{
if (!m_item)
return false;
if (m_item->Slots == 0) {
return false;
}
uint32 classes_ = m_item->Common.Classes;
uint32 races_ = m_item->Common.Races;
// ************************************
// ffchung :
// I dont know what it realy want to
// As I see it want to convent the the race value
// but why only use when PacketCollector
// else race_ only will keep at zero .
// then it will never return true
// so I am not to use it at this time.
// but keep the code here for later use.
// ************************************
int32 race_ = 0;
#ifndef PACKETCOLLECTOR
race_ = GetArrayRace(race);
#endif
// ************************************
retrun ( ((1<<(class_-1)) & classes_) && ((1<<(race-1)) & races_) )
}