fix: Various code cleanup (#756)
This commit is contained in:
parent
f4378acd05
commit
dbd4d6f13f
40 changed files with 117 additions and 280 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue