Fixes casting, default parameters and null propogation in more files.

This commit is contained in:
Kamron Batman 2018-09-09 22:05:44 -07:00
parent 067dca8393
commit 403e2a8b9d
21 changed files with 328 additions and 523 deletions

View file

@ -96,13 +96,12 @@ namespace Server.Misc
return;
}
if ( from is PlayerMobile )
if ( @from is PlayerMobile pm )
{
int amt = ( from.Mounted ? 48 : 16 );
PlayerMobile pm = (PlayerMobile)from;
int amt = ( pm.Mounted ? 48 : 16 );
if ( (++pm.StepsTaken % amt) == 0 )
--from.Stam;
--pm.Stam;
}
Spells.Ninjitsu.DeathStrike.AddStep( from );
@ -129,4 +128,4 @@ namespace Server.Misc
return ( (Mobile.BodyWeight + m.TotalWeight) > (GetMaxWeight( m ) + OverloadAllowance) );
}
}
}
}