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
@@ -3469,6 +3469,9 @@ namespace Game.Entities
public class ActivePlayerData : BaseUpdateData<Player>
{
public static int ExploredZonesSize;
public static int ExploredZonesBits;
public UpdateField<bool> BackpackAutoSortDisabled = new(0, 1);
public UpdateField<bool> BankAutoSortDisabled = new(0, 2);
public UpdateField<bool> SortBagsRightToLeft = new(0, 3);
@@ -3595,7 +3598,11 @@ namespace Game.Entities
public UpdateFieldArray<uint> BankBagSlotFlags = new(7, 670, 671);
public UpdateFieldArray<ulong> QuestCompleted = new(875, 678, 679);
public ActivePlayerData() : base(0, TypeId.ActivePlayer, 1554) { }
public ActivePlayerData() : base(0, TypeId.ActivePlayer, 1554)
{
ExploredZonesSize = ExploredZones.GetSize();
ExploredZonesBits = sizeof(ulong) * 8;
}
public void WriteCreate(WorldPacket data, UpdateFieldFlag fieldVisibilityFlags, Player owner, Player receiver)
{