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:
@@ -765,14 +765,14 @@ namespace Game.Chat
|
||||
return false;
|
||||
}
|
||||
|
||||
uint offset = (uint)area.AreaBit / 64;
|
||||
uint offset = (uint)(area.AreaBit / ActivePlayerData.ExploredZonesBits);
|
||||
if (offset >= PlayerConst.ExploredZonesSize)
|
||||
{
|
||||
handler.SendSysMessage(CypherStrings.BadValue);
|
||||
return false;
|
||||
}
|
||||
|
||||
uint val = (1u << (area.AreaBit % 64));
|
||||
uint val = 1u << (area.AreaBit % ActivePlayerData.ExploredZonesBits);
|
||||
playerTarget.RemoveExploredZones(offset, val);
|
||||
|
||||
handler.SendSysMessage(CypherStrings.UnexploreArea);
|
||||
@@ -1750,14 +1750,14 @@ namespace Game.Chat
|
||||
return false;
|
||||
}
|
||||
|
||||
uint offset = (uint)area.AreaBit / 64;
|
||||
uint offset = (uint)(area.AreaBit / ActivePlayerData.ExploredZonesBits);
|
||||
if (offset >= PlayerConst.ExploredZonesSize)
|
||||
{
|
||||
handler.SendSysMessage(CypherStrings.BadValue);
|
||||
return false;
|
||||
}
|
||||
|
||||
ulong val = 1ul << (area.AreaBit % 64);
|
||||
ulong val = 1ul << (area.AreaBit % ActivePlayerData.ExploredZonesBits);
|
||||
playerTarget.AddExploredZones(offset, val);
|
||||
|
||||
handler.SendSysMessage(CypherStrings.ExploreArea);
|
||||
|
||||
Reference in New Issue
Block a user