public override void Serialize(LittleEndianWriter writer) { if (animationOverrides.Count > byte.MaxValue) { throw new ArgumentOutOfRangeException(); } writer.WriteByte((byte)animationOverrides.Count); foreach (var t in animationOverrides) { writer.WriteSizedString(t.Key); writer.WriteSizedString(t.Value); } }
public void Serialize(LittleEndianWriter writer) { writer.WriteSizedString(SkinName); writer.WriteUInt(SkinId); byte bitfield = 0; if (OverrideSpells) { bitfield |= 1; } if (ModelOnly) { bitfield |= 2; } if (ReplaceCharacterPackage) { bitfield |= 4; } writer.WriteByte(bitfield); writer.WriteUInt(Id); }