ModernUO/Projects/UOContent/Items/Books/BookPageInfo.cs
Kamron Batman a146955f6c
fix(core): Converts book packets (#413)
- [X] Splits out BaseBook
- [X] Converts book packets
- [X] Makes FixHtml faster
2021-01-16 18:49:53 -08:00

35 lines
797 B
C#

using System;
namespace Server.Items
{
public class BookPageInfo
{
public BookPageInfo() => Lines = Array.Empty<string>();
public BookPageInfo(params string[] lines) => Lines = lines;
public BookPageInfo(IGenericReader reader)
{
var length = reader.ReadInt();
Lines = new string[length];
for (var i = 0; i < Lines.Length; ++i)
{
Lines[i] = Utility.Intern(reader.ReadString());
}
}
public string[] Lines { get; set; }
public void Serialize(IGenericWriter writer)
{
writer.Write(Lines.Length);
for (var i = 0; i < Lines.Length; ++i)
{
writer.Write(Lines[i]);
}
}
}
}