Core/PacketIO: Fixed SMSG_UPDATE_OBJECT fragment changes mask initialization
Port From (https://github.com/TrinityCore/TrinityCore/commit/0435f22d0d58589d0d6a4c9c764ce20a01e196e5)
This commit is contained in:
@@ -66,8 +66,8 @@ namespace Game.Entities
|
|||||||
|
|
||||||
public EntityFragment[] UpdateableIds = [EntityFragment.End, EntityFragment.End];
|
public EntityFragment[] UpdateableIds = [EntityFragment.End, EntityFragment.End];
|
||||||
public byte[] UpdateableMasks = new byte[2];
|
public byte[] UpdateableMasks = new byte[2];
|
||||||
public byte UpdateableCount = 0;
|
public byte UpdateableCount;
|
||||||
public byte ContentsChangedMask = EntityDefinitionsConst.CGObjectActiveMask;
|
public byte ContentsChangedMask;
|
||||||
|
|
||||||
public void Add(EntityFragment fragment, bool update)
|
public void Add(EntityFragment fragment, bool update)
|
||||||
{
|
{
|
||||||
@@ -101,7 +101,10 @@ namespace Game.Entities
|
|||||||
{
|
{
|
||||||
UpdateableMasks[i] = (byte)(1 << maskIndex++);
|
UpdateableMasks[i] = (byte)(1 << maskIndex++);
|
||||||
if (IsIndirectFragment(UpdateableIds[i]))
|
if (IsIndirectFragment(UpdateableIds[i]))
|
||||||
|
{
|
||||||
|
ContentsChangedMask |= UpdateableMasks[i]; // set the first bit to true to activate fragment
|
||||||
UpdateableMasks[i] |= (byte)(1 << maskIndex++);
|
UpdateableMasks[i] |= (byte)(1 << maskIndex++);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user