Fixes chaos damage bug with the spell system. Fixes various small other bugs. Fixes more merge cast type checks and uses default values.

This commit is contained in:
Kamron Batman 2018-09-16 21:04:36 -07:00
parent 9542c79ea4
commit c155c82325
115 changed files with 644 additions and 1041 deletions

View file

@ -77,8 +77,7 @@ namespace Server.SkillHandlers
protected override void OnTarget(Mobile from, object targeted)
{
BaseBook book = targeted as BaseBook;
if (book == null)
if (!(targeted is BaseBook book))
{
from.SendLocalizedMessage(1046296); // That is not a book
}
@ -122,9 +121,7 @@ namespace Server.SkillHandlers
if (m_BookSrc.Deleted)
return;
BaseBook bookDst = targeted as BaseBook;
if (bookDst == null)
if (!(targeted is BaseBook bookDst))
{
from.SendLocalizedMessage(1046296); // That is not a book
}