Fixes/cleanups from b026ee7ef8, And misc fixes/crashes.
This commit is contained in:
@@ -5437,25 +5437,62 @@ namespace Game.Entities
|
||||
public class VisualAnim : BaseUpdateData<AreaTrigger>
|
||||
{
|
||||
public UpdateField<bool> Field_C = new(0, 1);
|
||||
public UpdateField<uint> AnimationDataID = new(0, 2);
|
||||
public UpdateField<int> AnimationDataID = new(0, 2);
|
||||
public UpdateField<uint> AnimKitID = new(0, 3);
|
||||
public UpdateField<uint> AnimProgress = new(0, 4);
|
||||
|
||||
public VisualAnim() : base(0, TypeId.AreaTrigger, 5) { }
|
||||
|
||||
void WriteCreate(WorldPacket data, AreaTrigger owner, Player receiver)
|
||||
public void WriteCreate(WorldPacket data, AreaTrigger owner, Player receiver)
|
||||
{
|
||||
|
||||
data.WriteInt32(AnimationDataID);
|
||||
data.WriteUInt32(AnimKitID);
|
||||
data.WriteUInt32(AnimProgress);
|
||||
data.WriteBit(Field_C);
|
||||
data.FlushBits();
|
||||
}
|
||||
|
||||
void WriteUpdate(WorldPacket data, bool ignoreChangesMask, AreaTrigger owner, Player receiver)
|
||||
public void WriteUpdate(WorldPacket data, bool ignoreChangesMask, AreaTrigger owner, Player receiver)
|
||||
{
|
||||
UpdateMask changesMask = _changesMask;
|
||||
if (ignoreChangesMask)
|
||||
changesMask.SetAll();
|
||||
|
||||
data.WriteBits(changesMask.GetBlock(0), 5);
|
||||
|
||||
if (changesMask[0])
|
||||
{
|
||||
if (changesMask[1])
|
||||
{
|
||||
data.WriteBit(Field_C);
|
||||
}
|
||||
}
|
||||
data.FlushBits();
|
||||
if (changesMask[0])
|
||||
{
|
||||
if (changesMask[2])
|
||||
{
|
||||
data.WriteInt32(AnimationDataID);
|
||||
}
|
||||
if (changesMask[3])
|
||||
{
|
||||
data.WriteUInt32(AnimKitID);
|
||||
}
|
||||
if (changesMask[4])
|
||||
{
|
||||
data.WriteUInt32(AnimProgress);
|
||||
}
|
||||
}
|
||||
data.FlushBits();
|
||||
}
|
||||
|
||||
public override void ClearChangesMask()
|
||||
{
|
||||
|
||||
ClearChangesMask(Field_C);
|
||||
ClearChangesMask(AnimationDataID);
|
||||
ClearChangesMask(AnimKitID);
|
||||
ClearChangesMask(AnimProgress);
|
||||
_changesMask.ResetAll();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user