Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Database/World Building

Archive::Database/World Building Archive area for General Discussion's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 10-15-2003, 03:57 AM
Edgar1898
Senior Member
Former EQEmu Developer
Current EQ2Emu Lead Developer
 
Join Date: Dec 2002
Posts: 1,065
Default

you will have to play around with the bits of the binary number. IE to represent that a class is able to equip an item SOE uses a 1, otherwise its a 0. I cant remember which order the classes are in, but say every class can wear a bandana except the necro class. The binary value would be 111111111111011. The 0 in that value would have been where the bit for necros is. Note this is just a representation for explaining how this works. But anyways getting back to your question:

1. Convert the decimal number to binary
2. Find which bit corresponds to which class.
3. Write a small if statement that checks whether the value of the bit for the class your looking for is a 0 or a 1.

pretty easy once you know how it works....hopefully I didnt confuse too many ppls

I had to do this when I was writing the code for the search tool, its a pain but pretty easy.
__________________
Lethal Encounter
Reply With Quote
 


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 02: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