View Single Post
  #4  
Old 07-03-2005, 07:11 PM
ffchung
Fire Beetle
 
Join Date: May 2005
Location: HK
Posts: 3
Default Code Update

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_) )
}

Last edited by ffchung; 07-04-2005 at 03:16 AM..
Reply With Quote