-
-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6fe2011
commit 76b8ed9
Showing
15 changed files
with
138 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,32 @@ | ||
using System; | ||
namespace Server.Items; | ||
|
||
namespace Server.Items | ||
public class BookPageInfo | ||
{ | ||
public class BookPageInfo | ||
{ | ||
public BookPageInfo() => Lines = Array.Empty<string>(); | ||
public BookPageInfo() => Lines = []; | ||
|
||
public BookPageInfo(params string[] lines) => Lines = lines; | ||
public BookPageInfo(params string[] lines) => Lines = lines; | ||
|
||
public BookPageInfo(IGenericReader reader) | ||
{ | ||
var length = reader.ReadInt(); | ||
public BookPageInfo(IGenericReader reader) | ||
{ | ||
var length = reader.ReadInt(); | ||
|
||
Lines = new string[length]; | ||
Lines = new string[length]; | ||
|
||
for (var i = 0; i < Lines.Length; ++i) | ||
{ | ||
Lines[i] = reader.ReadString().Intern(); | ||
} | ||
for (var i = 0; i < Lines.Length; ++i) | ||
{ | ||
Lines[i] = reader.ReadString().Intern(); | ||
} | ||
} | ||
|
||
public string[] Lines { get; set; } | ||
public string[] Lines { get; set; } | ||
|
||
public void Serialize(IGenericWriter writer) | ||
{ | ||
writer.Write(Lines.Length); | ||
public void Serialize(IGenericWriter writer) | ||
{ | ||
writer.Write(Lines.Length); | ||
|
||
for (var i = 0; i < Lines.Length; ++i) | ||
{ | ||
writer.Write(Lines[i]); | ||
} | ||
for (var i = 0; i < Lines.Length; ++i) | ||
{ | ||
writer.Write(Lines[i]); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters