Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Serverside Modding => Topic started by: Chase on September 23, 2014, 02:57:53 am
-
I'm trying to set the allowable race on an item which has a race restriction. I want it to be able to be used by all races.
I looked at items that can be used by all races and some of the id's are -1, and some are 2147483647.
I changed my db2 to use -1, that didn't work, I tried 2147483647, that didn't work.
Then I tried a different approach. Allowing an item to be used by human means the value is 1, allowing it to be used by orcs means the value is 2. Allowing both humans and orcs means the value is 3.
Going with the doubling logic, all races should be, 8191. Except that appears to be Orc, Dwarf, Night Elf, Undead, Tauren, Gnome, Troll, Goblin, Blood Elf, Draenei.
I went up one more and now Human got added back in. From there I cannot seem to include Worgen and Pandaren, no matter how high I make the number.
Does anyone understand this?
-
I always used -1 for AllowableRace. And then there's Flags2 which seems to be a faction restriction. Setting all items to 8192 is what I put for that one. If I recall correctly it's 8193 for Alliance, 8194 for Horde, and 8192 for everyone. Maybe that has something to do with it. Because I'm pretty sure AllowableRace is supposed to be -1.
-
-1 means all can equip that item (no restrictions). 2097151 (rev 12340) means that "all" races in the game can equip. In the end, its the same, until you change client build or add new races.
You might want to check your FlagsExtra in item_template, this column controls if item is Horde/Alliance only or for both factions. One of my first edits in DB was setting this column in the whole table to 0, so all items are usable by both factions if there are no other class/race/reputation restrictions.
-
That's what I just suggested Amaroth ^_^ FlagsExtra and Flags2 are the same thing. However Chase mentioned he's using a db2 file which implies he's not on WotLK. Item_template is not used for item data on MoP and Cata. Instead, all the items are contained in Item-sparse.db2. Unless he modified the server database, or is using SkyFire which comes with it, then he's gonna wanna change Flags2 in Item-sparse.db2.
And yes setting this value to 0 would probably have the same effect, but the proper way of doing this is to set it to 8192. This is how almost all faction independent items in MoP and Cata are written. There are no 0 values. Though on second thought, you might want to explore some of the other numbers in there because Pandaren are not Horde or Alliance by default, and thus might not be included for 8192. Idk about worgen though, that seems odd to me.
-
Ah, didn't see that "db2". OK, I'm outta here, got no experience with newer than WotLK game builds :D.
-
Thanks guys, that worked! Totally forgot items can have faction restrictions too.