Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 07-03-2005, 12:52 AM
ffchung
Fire Beetle
 
Join Date: May 2005
Location: HK
Posts: 3
Default Jr Dev Code

Want to try dev eqemu code . and how can I update code if needed.
just show at here ? .

// Can item be equipped?

bool ItemCommonInst::IsEquipable(int16 race, int16 class_) const
{
if (!m_item)
return false;

bool israce = false;
bool isclass = false;

if (m_item->Slots == 0) {
return false;
}

uint32 classes_ = m_item->Common.Classes;
uint32 races_ = m_item->Common.Races;
int32 race_ = 0;
#ifndef PACKETCOLLECTOR
race_ = GetArrayRace(race);
#endif
// @merth: can this be optimized? i.e., will (race & common->Races) suffice?
if( ((1<<(class_-1)) & classes_) > 0 )
{
isclass = true;
}
if( ((1<<(race-1)) & races_) > 0 )
{
isclass = true;
}
/*
for (int cur_class = 1; cur_class<=15; cur_class++) {
if (classes_ % 2 == 1) {
if (cur_class == class_) {
isclass = true;
}
}
classes_ >>= 1;
}

for (unsigned int cur_race = 1; cur_race <= 15; cur_race++) {

if (races_ % 2 == 1) {
if (cur_race == race_) {
israce = true;
}
}
races_ >>= 1;
}
*/
return (israce && isclass);
}

Last edited by ffchung; 07-03-2005 at 03:07 PM..
Reply With Quote
  #2  
Old 07-03-2005, 03:12 AM
RangerDown
Demi-God
 
Join Date: Mar 2004
Posts: 1,066
Default

Please explain what the above does

There's a line enclosed in #ifdef PACKETCOLLECTOR... there's a whole block just commented out. Did you even make any changes or did you just copy and paste a block from the code verbatim?
__________________
<idleRPG> Rogean ate a plate of discounted, day-old sushi. This terrible calamity has slowed them 0 days, 15:13:51 from level 48.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:32 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3