Core/PacketIO: Fixed SMSG_UPDATE_OBJECT fragment changes mask initialization

Port From (https://github.com/TrinityCore/TrinityCore/commit/0435f22d0d58589d0d6a4c9c764ce20a01e196e5)
This commit is contained in:
Hondacrx
2024-11-11 21:16:40 -05:00
parent fb7b17b908
commit 7a50f06e8c
@@ -66,8 +66,8 @@ namespace Game.Entities
public EntityFragment[] UpdateableIds = [EntityFragment.End, EntityFragment.End];
public byte[] UpdateableMasks = new byte[2];
public byte UpdateableCount = 0;
public byte ContentsChangedMask = EntityDefinitionsConst.CGObjectActiveMask;
public byte UpdateableCount;
public byte ContentsChangedMask;
public void Add(EntityFragment fragment, bool update)
{
@@ -101,7 +101,10 @@ namespace Game.Entities
{
UpdateableMasks[i] = (byte)(1 << maskIndex++);
if (IsIndirectFragment(UpdateableIds[i]))
{
ContentsChangedMask |= UpdateableMasks[i]; // set the first bit to true to activate fragment
UpdateableMasks[i] |= (byte)(1 << maskIndex++);
}
}
}