fix: Various code cleanup (#756)

This commit is contained in:
Kamron Batman 2021-09-03 19:41:12 -07:00 • committed by GitHub
parent f4378acd05
commit dbd4d6f13f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 117 additions and 280 deletions

View file

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Server.Items;
using Server.Targeting;
@ -43,7 +42,18 @@ namespace Server.SkillHandlers
public static bool IsEmpty(BaseBook book)
{
return book.Pages.SelectMany(page => page.Lines).All(line => line.Trim().Length == 0);
foreach (var page in book.Pages)
{
foreach (var line in page.Lines)
{
if (!string.IsNullOrEmpty(line))
{
return false;
}
}
}
return true;
}
public static void Copy(BaseBook bookSrc, BaseBook bookDst)