View Full Version : Set all items to be gnome usable?
gnode
08-16-2009, 11:05 AM
How would I go about setting all items to be gnome usable? That way I can turn any class into a gnome and they would work.
The race field in the items table seems a bit odd to me (and class for that matter). I was expecting to see a column per race y/n, but I guess thats not how it works here...
Or even better maybe, just race all if that is easier.
gnode
08-16-2009, 11:13 AM
Well, I answered my 2nd question. Just set all races to 65535.
Is there no trick to make everything gnome usable though? I would rather do that if possible...
steve
08-17-2009, 08:01 PM
You mean add Gnome to every item's existing race list? No.
You could set everything Gnome only or ALL like you suggested above.
pfyon
08-17-2009, 09:37 PM
Looks like the race entry uses individual bits in a 16 bit number to set which races can use it. If you could find an item that is gnome only already, then I think I can give you a query to allow add gnome to every item.
AndMetal
08-18-2009, 01:04 AM
It's a bitmask.
Here's an excerpt from the Wiki (http://www.eqemulator.net/wiki/wikka.php?wakka=EQEmuDBSchemaitems):
races
* What race or races can use the item. Rememeber to add up the results.
o 0 = None
o 1 = Human
o 2 = Barbarian
o 4 = Erudite
o 8 = ELF
o 16 = HIE
o 32 = Dark Elf
o 64 = HEF
o 128 = Dwarf
o 256 = Troll
o 512 = Ogre
o 1024 = HFL
o 2048 = Gnome
o 4096 = Iksar
o 8192 = Vah Shir
o 16384 = Froglok
o 32768 = Shroud
* These are combined values, but with special meaning:
o 32767 = Any/All
o 65535 = Usually a container
So, using the bitwise operator (http://dev.mysql.com/doc/refman/5.0/en/bit-functions.html) AND (&) (http://dev.mysql.com/doc/refman/5.0/en/bit-functions.html#operator_bitwise-and), running this query will make all items usable by Gnomes:
UPDATE items SET races = races & 2048
ChaosSlayerZ
08-18-2009, 11:56 AM
where is the drakkin btw?
GeorgeS
08-20-2009, 12:55 AM
BTW the bitwise operations are a godsend for cases like this.
GeorgeS
trevius
08-20-2009, 02:54 AM
where is the drakkin btw?
From races.h
#define human_1 1
#define barbarian_1 2
#define erudite_1 4
#define woodelf_1 8
#define highelf_1 16
#define darkelf_1 32
#define halfelf_1 64
#define dwarf_1 128
#define troll_1 256
#define ogre_1 512
#define halfling_1 1024
#define gnome_1 2048
#define iksar_1 4096
#define vahshir_1 8192
#define rall_1 16384 //froglok?
#define drakkin_1 32768
Drakkin is now 32768, and I am not sure what shroud would be, but guessing 65535ish.
gnode
09-02-2009, 12:00 AM
WARNING:
UPDATE items SET races = races & 2048
Makes all items gnome only (or in many cases bugs them to not have a race listed). It does not add gnome to all items.
What I am trying to do is add gnome to all items.
Maybe George can make an feature for eqitems to add a race to all items? :)
realityincarnate
09-02-2009, 12:15 AM
To add to the race list instead of replace it, you want to use a bitwise OR, not AND.
UPDATE items SET races = races | 2048
GeorgeS
09-16-2009, 10:41 AM
WARNING:
UPDATE items SET races = races & 2048
Makes all items gnome only (or in many cases bugs them to not have a race listed). It does not add gnome to all items.
What I am trying to do is add gnome to all items.
Maybe George can make an feature for eqitems to add a race to all items? :)
Actually I am thinking of adding this, perhaps to a new tool that does mass alterations of this sort...
GeorgeS
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.