Jump to content

[GUIDE} Make any area a sanctuary without editing DBC files


Recommended Posts

Posted

I've done some testing on my own server, and I've found this to be the most reliable method for making an area into a Sanctuary (for a mall or other special purpose).

1. visit the area in-game and use the .gps command. This will show you the AreaID.

2. open up player.cpp (found in /source/game/player.cpp

3. Search for this line:

if(zone->flags & AREA_FLAG_SANCTUARY)                  // in sanctuary

4. Replace it with this line:

if((zone->flags & AREA_FLAG_SANCTUARY) || (GetAreaId() == 2477))                  // in sanctuary

Just replace "2477" with the area you want to be a sanctuary. If you want more than one area, just add them in like this:

if((zone->flags & AREA_FLAG_SANCTUARY) || (GetAreaId() == 2477) || (GetAreaId() == 1234))                  // in sanctuary

And so on. No illegal editing of DBC files needed :)

I understand this is probably simple for most of you, but I wanted to post it for posterity in case I need it again and forget how to do it.

Posted

So if I took out this...

   if(zone->flags & AREA_FLAG_SANCTUARY)                   // in sanctuary
    {
        SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY);
        if(sWorld.IsFFAPvPRealm())
            RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
    }
    else
    {
        RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY);
    }

Would that REMOVE sanctuaries entirely?

Posted
So if I took out this...

   if(zone->flags & AREA_FLAG_SANCTUARY)                   // in sanctuary
    {
        SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY);
        if(sWorld.IsFFAPvPRealm())
            RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
    }
    else
    {
        RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY);
    }

Would that REMOVE sanctuaries entirely?

You should keep the "RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY);" thing there.

Posted

Instead code edit with new spell_area table you can find appropriate spell with sanctuary effect and just make it always appliable at enter to zone, or pacific effect (last can't be removed by player in most cases and then will impossible attack, or both...

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use