[4.3.4] Item Class and Race Restrictions

Hey there,

I’m seeking more information about possible work arounds to the Item Class and Race restrictions presented in the Item_Template, and more importantly, the item-sparse.db2. Is there any way to remove all restrictions without having to decompile & recompile that db2 file? I understand that the items could be imported into the Item_template and the override could be set to true, but I would like to avoid the added burden the extra tables would put on database if possible. Anything leading me in the right direction is appreciated,

— Canned message start —

This thread is not related to the official Trinity codebase and was moved to the Custom Code section.

Please read the stickies next time.

— Canned message end —

I would think that the code to load items could be altered to enable all race/class options for the items as they are loaded. Since the 4.3.4 branch reads both database and db2 files, I would think it to be easiest to edit the loading routines to apply the “used by all” settings you desire. It would certainly remove the need to convert the db2, edit the contents, then rebuild the db2.

This is all assuming that the client isn’t using the local db2 and applying those restrictions despite your server edit(s).

Thanks for the help! While the text remains, the restrictions no longer seem to have an effect.

For anyone else looking for this sort of a fix, editing ObjectMgr.cpp seems to be the easiest way.

        /*itemTemplate.AllowableClass = sparse->AllowableClass;/*
        /*itemTemplate.AllowableRace = sparse->AllowableRace;*/
	itemTemplate.AllowableClass = -1;
	itemTemplate.AllowableRace = -1;

Glad you found what you needed. As for the text, that is likely still there as a result of the client looking at the local copy. It’s conflicting things like that which is why some changes aren’t recommended. The editing of the client, in any way, isn’t even something really supported on these forums, either.

Sorry, but you are talking about “override could set to true”… Where it is possible to set override to true? xD



Thanks, so that mean, if I use an item ID in DB, it will overwrite data loaded from Item-sparse.db2?

Any hint why this does not work? I edited the ObjectMgr and the config like said above but I am not able to wear the restricted items. Even an item I created manually in the item_template using unused entry ids are not wearable if class and race restrictions are set to -1

Maybe it’s a difference in core revisions. Rather than using -1, try setting the value to the combined bitmasks for all races and classes.

found what I was looking for in Player.cpp, thanks anyways