Welcome to JadaDev

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • JadaDev

      Themes   10/08/2018

      You're able to change theme in the bottom of the site.
Sign in to follow this  
Followers 0
ghost

How to make an area a sanctuary

In this guide I will be showing how to make any zone or area a sanctuary without needing a patch. This method is less cpu consuming on your core and works better client side then its dbc counterpart.

1. Navigate to src\game\Entities\player.cpp
At around line 1681: Change this

Spoiler

if (zone->flags & AREA_FLAG_SANCTUARY)                  // in sanctuary
    {
        SetPvPSanctuary(true);

        UpdatePvP(false, true);

        if (sWorld.IsFFAPvPRealm())
            SetPvPFreeForAll(false);
    }
    else
    {
        SetPvPSanctuary(false);
    }

to this
 

Spoiler

if (zone->flags & AREA_FLAG_SANCTUARY || GetZoneId() == 0 || GetAreaId() == 0)                  // in sanctuary
    {
        SetPvPSanctuary(true);

        UpdatePvP(false, true);

        if (sWorld.IsFFAPvPRealm())
            SetPvPFreeForAll(false);
    }
    else
    {
        SetPvPSanctuary(false);
    }

Replace 0 with whatever zone or area you want. You can keep adding more by using ||. Zone/Area id 0 is for maps that have not been used (like behind silithus or in dev areas).

Rebuild!

Edited by ghost
1

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0