Sign in to follow this  

Delete items restrictions Legion


Description

Delete restrictions items of factions, class, race, skills and specs in TrinityCore 7.2.5 Legion

Hi, i've one tutorial for delete items restrictions in Legion 7.2.5 (And perhaps, others versions)

I think, this is the correct category for i can share it with you.

Sorry for my english.

 

The first step, it's download the next DB2:
(LINK)

After, you must go to source code of emulator, in this case, TrinityCore.
You go to TrinityCore/src/server/game/Entities and you must modify the Player.cpp

When you've opened the file, you must find:

bool allowEquip = false;

and change it to:

bool allowEquip = true;

After, you must find: 

// Used by group, function GroupLoot, to know if a prototype can be used by a player

    if (!proto)
        return EQUIP_ERR_ITEM_NOT_FOUND;

    if (proto->GetFlags2() & ITEM_FLAG2_INTERNAL_ITEM)
        return EQUIP_ERR_CANT_EQUIP_EVER;

    if ((proto->GetFlags2() & ITEM_FLAG2_FACTION_HORDE) && GetTeam() != HORDE)
        return EQUIP_ERR_CANT_EQUIP_EVER;

    if ((proto->GetFlags2() & ITEM_FLAG2_FACTION_ALLIANCE) && GetTeam() != ALLIANCE)
        return EQUIP_ERR_CANT_EQUIP_EVER;

    if ((proto->GetAllowableClass() & getClassMask()) == 0 || (proto->GetAllowableRace() & getRaceM$
        return EQUIP_ERR_CANT_EQUIP_EVER;

    if (proto->GetRequiredSkill() != 0)
    {
        if (GetSkillValue(proto->GetRequiredSkill()) == 0)
            return EQUIP_ERR_PROFICIENCY_NEEDED;
        else if (GetSkillValue(proto->GetRequiredSkill()) < proto->GetRequiredSkillRank())
            return EQUIP_ERR_CANT_EQUIP_SKILL;
    }

And change it to:

// Used by group, function GroupLoot, to know if a prototype can be used by a player

    if (!proto)
        return EQUIP_ERR_ITEM_NOT_FOUND;

    if (proto->GetFlags2() & ITEM_FLAG2_INTERNAL_ITEM)
        return EQUIP_ERR_OK;

    if ((proto->GetFlags2() & ITEM_FLAG2_FACTION_HORDE) && GetTeam() != HORDE)
        return EQUIP_ERR_OK;

    if ((proto->GetFlags2() & ITEM_FLAG2_FACTION_ALLIANCE) && GetTeam() != ALLIANCE)
        return EQUIP_ERR_OK;

    if ((proto->GetAllowableClass() & getClassMask()) == 0 || (proto->GetAllowableRace() & getRaceM$
        return EQUIP_ERR_OK;

    if (proto->GetRequiredSkill() != 0)
    {
        if (GetSkillValue(proto->GetRequiredSkill()) == 0)
            return EQUIP_ERR_PROFICIENCY_NEEDED;
        else if (GetSkillValue(proto->GetRequiredSkill()) < proto->GetRequiredSkillRank())
            return EQUIP_ERR_CANT_EQUIP_SKILL;
    }


By last, you must find:

if (ArtifactEntry const* artifact = sArtifactStore.LookupEntry(proto->GetArtifactID()))
        if (artifact->SpecID != GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID))
            return EQUIP_ERR_CANT_EQUIP_EVER;

And change it to:

if (ArtifactEntry const* artifact = sArtifactStore.LookupEntry(proto->GetArtifactID()))
        if (artifact->SpecID != GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID))
            return EQUIP_ERR_OK;

Now you must recompile the core, restart the server, after you put the db2 files in the datastore dbc from your core and you must create one folder with name "DBFilesClient" in the root folder of World of Warcraft 7.2.5 client.
Ready and enjoy it :P

It's working for Items restrictions of Class, Race, Specs (include Artifacts) and Factions, Skills too.

I wait this tutorial help you.
Thanks to Magna and WoW Team for the help.

DBFilesClient.zip



Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now