Core/Players: Fixed ExploredZones size and PLAYER_EXPLORED_ZONES_SIZE desync

Port From (https://github.com/TrinityCore/TrinityCore/commit/cb99b08b86f8773563276bf16ccc2210003b056b)
This commit is contained in:
hondacrx
2022-07-18 22:01:10 -04:00
parent cee989c731
commit 31d207c2ab
7 changed files with 23 additions and 17 deletions
+2 -2
View File
@@ -5852,7 +5852,7 @@ namespace Game.Entities
return;
}
int offset = areaEntry.AreaBit / 64;
int offset = areaEntry.AreaBit / ActivePlayerData.ExploredZonesBits;
if (offset >= PlayerConst.ExploredZonesSize)
{
Log.outError(LogFilter.Player, "Wrong area flag {0} in map data for (X: {1} Y: {2}) point to field PLAYER_EXPLORED_ZONES_1 + {3} ( {4} must be < {5} ).",
@@ -5860,7 +5860,7 @@ namespace Game.Entities
return;
}
ulong val = 1ul << (areaEntry.AreaBit % 64);
ulong val = 1ul << (areaEntry.AreaBit % ActivePlayerData.ExploredZonesBits);
ulong currFields = m_activePlayerData.ExploredZones[offset];
if (!Convert.ToBoolean(currFields & val))