Full List of all PLAYER_EXPLORED_ZONES_1 bit offsets! Below follows a complete list (as far as I know it's complete) of all the bit offsets for all of the explored regions. I have provided it as a c# enum. I extracted this from AreaTable.dbc
so I'm pretty sure it's complete. The value is stored in what WoWDev (DBFilesClient\AreaTable.dbc - WoWDev) was calling the Flag field, but it wasn't quite what they thought it was I guess.
The Enum:
[To many characters to post, download the attached text file for c# code at the bottom of this post.]
To check if a player has accessed one of these areas you do something like the following.
Create a bitarray class to hold all of the bool values:
Code:
public BitArray ExploredAreas
{
get
{
byte[] _data = ProcessManager.WowProcess.ReadBytes(Descriptors + ((uint)Descriptor.ePlayerFields.PLAYER_EXPLORED_ZONES_1 * 4), 512);
BitArray ba = new BitArray(_data);
return ba;
}
Then you can access the value like so (in this example seeing if the player has explored Ashwood Lake).
Code:
bool HasExplored = ExploredAreas((int)PlayerExploredBitIndex.Ashwood_Lake);
--Peter
----Original Post----
I am trying to find, and if that fails build, an index of areas as they correspond to PLAYER_EXPLORED_ZONES_1.
I did some searching online but all I could find were examples of how to set all areas to explored on private servers, but not a list of which indexes correspond to what areas.
I did come up with a way to build such a list myself, but it is a tedious and mind numbing method. So if a list already exists, or if someone can think of a much faster method please let me know.
Method:
1. Add some code to read the PLAYER_EXPLORED_ZONES_1 byte[512] data and convert it into a BitArray.
Code:
public BitArray ExploredAreas
{
get
{
byte[] _data = ProcessManager.WowProcess.ReadBytes(Descriptors + ((uint)Descriptor.ePlayerFields.PLAYER_EXPLORED_ZONES_1 * 4), 512);
BitArray ba = new BitArray(_data);
return ba;
}
2. Copy the BitArray into a bool[4096]
Code:
public bool[] ExploredAreasAsBool
{
get
{
bool[] _data = new bool[4096];
ExploredAreas.CopyTo(_data, 0);
return _data;
}
}
3. In debug mode in Visual Studio add a break point somewhere, doesn't really matter where, and add a watch for the ExploredAreasAsBool property and then expand the property in the watch window.
4. With your visual studio debugger paused on some point walk your character in WoW until you see that they have discovered a new area.
5. In Visual Studio right click the line you are paused at and click set next statement. This will cause all your watched values to update, and any changed ones will appear in red.
6. Scroll through the list until you find the one that is red (there should only be one as far as I understand it), then mark down the Area/Zone name and the index in a spreadsheet.
7. Repeat....
As you can see this is a very tedious process.... Does anyone have any ideas on how it could be done differently? One thing I did try was to set the bits of PLAYER_EXPLORED_ZONES_1 one at a time and then see if I got a message saying I had explored a new area, and I checked the achievements page to see if it was showing a new area as green in the exploration section (I did this with an area that I already knew it's index so it was checkable), but neither of these methods worked. The value did set in memory, and I was able to read it back out with my bit array, but it didn't actually do anything....
Thanks,
PeterAttachment 2567