• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] [Trinity] Making normal players able to see and purcahse other class specific items.

Status
Not open for further replies.

Andrew

ED Beta Tester
So I want to make it to where I can allow non gamemaster characters to see other class items within a vendor.

For example: A Paladin can view Warrior Season 4 items, and be able to purchase them.

I'm aware I can remkve the class requirements, but I don't want that because I don't want people using other class items, you know? This is solely for the purpose of transmog. I've looked for a whilw and even went through the entire Trinitycore SQL database, and couldnt find any fields or tables regarding this at all. So im assumjng its done via C++ or something like that.

Any help is appreciated.

Sorry for any typos im on a tablet so its kinda hard to type.
 

Rochet2

Moderator / Eluna Dev
https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Handlers/ItemHandler.cpp#L777
https://github.com/TrinityCore/Trin...server/game/Entities/Player/Player.cpp#L21719

Need to edit those.
Note that doing so may break some vendors if they have over 150 items on display.
The default TC DB doesnt seem to though. I ran a quick SQL to test it:

SELECT entry, count(item) as items FROM npc_vendor group by entry having items > 150 order by items desc;
however that doesnt take into account references (negative item), but they seemed ok as well.
 
Last edited:

Andrew

ED Beta Tester
https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Handlers/ItemHandler.cpp#L777
https://github.com/TrinityCore/Trin...server/game/Entities/Player/Player.cpp#L21719

Need to remove those.
Note that doing so may break some vendors if they have over 150 items on display.
The default TC DB doesnt seem to though. I ran a quick SQL to test it:

SELECT entry, count(item) as items FROM npc_vendor group by entry having items > 150 order by items desc;
however that doesnt take into account references (negative item), but they seemed ok as well.

If im to remove the handler.cpp and player.cpp what else exactly will that be effecting? I dont want every single vendor in the game to show all of these items. Rather just a select handful of vendors. can this be done?
 

Rochet2

Moderator / Eluna Dev
If im to remove the handler.cpp and player.cpp what else exactly will that be effecting? I dont want every single vendor in the game to show all of these items. Rather just a select handful of vendors. can this be done?

Then .. you could just add a special entry or something like:
if ((vendorGuid.GetEntry() != 123123 && vendorGuid.GetEntry() != 123123) && ..restoftheifcase

For example:
Code:
if ([COLOR="#00FF00"](vendorGuid.GetEntry() != 123123 && vendorGuid.GetEntry() != 123123) && [/COLOR]!(itemTemplate->AllowableClass & _player->getClassMask()) && itemTemplate->Bonding == BIND_WHEN_PICKED_UP && !_player->IsGameMaster())
    continue;
 
Status
Not open for further replies.
Top