More casting fixes
This commit is contained in:
parent
f211efc3bd
commit
20a80ea2f3
40 changed files with 125 additions and 211 deletions
|
|
@ -99,16 +99,11 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGotMeleeAttack( attacker );
|
||||
|
||||
if ( !Core.SE && 0.2 > Utility.RandomDouble() && attacker is BaseCreature )
|
||||
if ( !Core.SE && 0.2 > Utility.RandomDouble() && attacker is BaseCreature c && c.Controlled && c.ControlMaster != null )
|
||||
{
|
||||
BaseCreature c = (BaseCreature)attacker;
|
||||
|
||||
if ( c.Controlled && c.ControlMaster != null )
|
||||
{
|
||||
c.ControlTarget = c.ControlMaster;
|
||||
c.ControlOrder = OrderType.Attack;
|
||||
c.Combatant = c.ControlMaster;
|
||||
}
|
||||
c.ControlTarget = c.ControlMaster;
|
||||
c.ControlOrder = OrderType.Attack;
|
||||
c.Combatant = c.ControlMaster;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue