More casting fixes
This commit is contained in:
parent
f211efc3bd
commit
20a80ea2f3
40 changed files with 125 additions and 211 deletions
|
|
@ -64,12 +64,9 @@ namespace Server.Mobiles
|
|||
|
||||
public override void AlterMeleeDamageFrom( Mobile from, ref int damage )
|
||||
{
|
||||
if ( from is BaseCreature )
|
||||
if ( from is BaseCreature bc && (bc.Controlled || bc.BardTarget == this) )
|
||||
{
|
||||
BaseCreature bc = (BaseCreature)from;
|
||||
|
||||
if ( bc.Controlled || bc.BardTarget == this )
|
||||
damage = 0; // Immune to pets and provoked creatures
|
||||
damage = 0; // Immune to pets and provoked creatures
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,10 +66,8 @@ namespace Server.Mobiles
|
|||
|
||||
public override void AlterMeleeDamageFrom( Mobile from, ref int damage )
|
||||
{
|
||||
if ( from is BaseCreature )
|
||||
if ( @from is BaseCreature bc )
|
||||
{
|
||||
BaseCreature bc = (BaseCreature)from;
|
||||
|
||||
if ( bc.Controlled || bc.BardTarget == this )
|
||||
damage = 0; // Immune to pets and provoked creatures
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue