Changes properties to use automatic property initializers
This commit is contained in:
parent
f0a48ad431
commit
06fa31a7bf
623 changed files with 13072 additions and 19304 deletions
|
|
@ -5,8 +5,8 @@ namespace Server.Mobiles
|
|||
public class ExodusMinion : BaseCreature
|
||||
{
|
||||
public override string CorpseName => "a minion's corpse";
|
||||
private bool m_FieldActive;
|
||||
public bool FieldActive => m_FieldActive;
|
||||
public bool FieldActive { get; private set; }
|
||||
|
||||
public bool CanUseField // TODO: an OSI bug prevents to verify this
|
||||
=> Hits >= HitsMax * 9 / 10;
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ namespace Server.Mobiles
|
|||
case 2: PackItem( new ClockworkAssembly() ); break;
|
||||
}
|
||||
|
||||
m_FieldActive = CanUseField;
|
||||
FieldActive = CanUseField;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
|
|
@ -93,13 +93,13 @@ namespace Server.Mobiles
|
|||
|
||||
public override void AlterMeleeDamageFrom( Mobile from, ref int damage )
|
||||
{
|
||||
if ( m_FieldActive )
|
||||
if ( FieldActive )
|
||||
damage = 0; // no melee damage when the field is up
|
||||
}
|
||||
|
||||
public override void AlterSpellDamageFrom( Mobile from, ref int damage )
|
||||
{
|
||||
if ( !m_FieldActive )
|
||||
if ( !FieldActive )
|
||||
damage = 0; // no spell damage when the field is down
|
||||
}
|
||||
|
||||
|
|
@ -110,14 +110,14 @@ namespace Server.Mobiles
|
|||
SendEBolt( from );
|
||||
}
|
||||
|
||||
if ( !m_FieldActive )
|
||||
if ( !FieldActive )
|
||||
{
|
||||
// should there be an effect when spells nullifying is on?
|
||||
FixedParticles( 0, 10, 0, 0x2522, EffectLayer.Waist );
|
||||
}
|
||||
else if ( m_FieldActive && !CanUseField )
|
||||
else if ( FieldActive && !CanUseField )
|
||||
{
|
||||
m_FieldActive = false;
|
||||
FieldActive = false;
|
||||
|
||||
// TODO: message and effect when field turns down; cannot be verified on OSI due to a bug
|
||||
FixedParticles( 0x3735, 1, 30, 0x251F, EffectLayer.Waist );
|
||||
|
|
@ -128,7 +128,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGotMeleeAttack( attacker );
|
||||
|
||||
if ( m_FieldActive )
|
||||
if ( FieldActive )
|
||||
{
|
||||
FixedParticles( 0x376A, 20, 10, 0x2530, EffectLayer.Waist );
|
||||
|
||||
|
|
@ -148,15 +148,15 @@ namespace Server.Mobiles
|
|||
base.OnThink();
|
||||
|
||||
// TODO: an OSI bug prevents to verify if the field can regenerate or not
|
||||
if ( !m_FieldActive && !IsHurt() )
|
||||
m_FieldActive = true;
|
||||
if ( !FieldActive && !IsHurt() )
|
||||
FieldActive = true;
|
||||
}
|
||||
|
||||
public override bool Move( Direction d )
|
||||
{
|
||||
bool move = base.Move( d );
|
||||
|
||||
if ( move && m_FieldActive && Combatant != null )
|
||||
if ( move && FieldActive && Combatant != null )
|
||||
FixedParticles( 0, 10, 0, 0x2530, EffectLayer.Waist );
|
||||
|
||||
return move;
|
||||
|
|
@ -185,7 +185,7 @@ namespace Server.Mobiles
|
|||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_FieldActive = CanUseField;
|
||||
FieldActive = CanUseField;
|
||||
|
||||
if ( Name == "Exodus Minion" )
|
||||
Name = null;
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ namespace Server.Mobiles
|
|||
public class ExodusOverseer : BaseCreature
|
||||
{
|
||||
public override string CorpseName => "an overseer's corpse";
|
||||
private bool m_FieldActive;
|
||||
public bool FieldActive => m_FieldActive;
|
||||
public bool FieldActive { get; private set; }
|
||||
|
||||
public bool CanUseField // TODO: an OSI bug prevents to verify this
|
||||
=> Hits >= HitsMax * 9 / 10;
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ namespace Server.Mobiles
|
|||
else
|
||||
PackItem( new ArcaneGem() );
|
||||
|
||||
m_FieldActive = CanUseField;
|
||||
FieldActive = CanUseField;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
|
|
@ -89,13 +89,13 @@ namespace Server.Mobiles
|
|||
|
||||
public override void AlterMeleeDamageFrom( Mobile from, ref int damage )
|
||||
{
|
||||
if ( m_FieldActive )
|
||||
if ( FieldActive )
|
||||
damage = 0; // no melee damage when the field is up
|
||||
}
|
||||
|
||||
public override void AlterSpellDamageFrom( Mobile caster, ref int damage )
|
||||
{
|
||||
if ( !m_FieldActive )
|
||||
if ( !FieldActive )
|
||||
damage = 0; // no spell damage when the field is down
|
||||
}
|
||||
|
||||
|
|
@ -106,14 +106,14 @@ namespace Server.Mobiles
|
|||
SendEBolt( from );
|
||||
}
|
||||
|
||||
if ( !m_FieldActive )
|
||||
if ( !FieldActive )
|
||||
{
|
||||
// should there be an effect when spells nullifying is on?
|
||||
FixedParticles( 0, 10, 0, 0x2522, EffectLayer.Waist );
|
||||
}
|
||||
else if ( m_FieldActive && !CanUseField )
|
||||
else if ( FieldActive && !CanUseField )
|
||||
{
|
||||
m_FieldActive = false;
|
||||
FieldActive = false;
|
||||
|
||||
// TODO: message and effect when field turns down; cannot be verified on OSI due to a bug
|
||||
FixedParticles( 0x3735, 1, 30, 0x251F, EffectLayer.Waist );
|
||||
|
|
@ -124,7 +124,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGotMeleeAttack( attacker );
|
||||
|
||||
if ( m_FieldActive )
|
||||
if ( FieldActive )
|
||||
{
|
||||
FixedParticles( 0x376A, 20, 10, 0x2530, EffectLayer.Waist );
|
||||
|
||||
|
|
@ -144,15 +144,15 @@ namespace Server.Mobiles
|
|||
base.OnThink();
|
||||
|
||||
// TODO: an OSI bug prevents to verify if the field can regenerate or not
|
||||
if ( !m_FieldActive && !IsHurt() )
|
||||
m_FieldActive = true;
|
||||
if ( !FieldActive && !IsHurt() )
|
||||
FieldActive = true;
|
||||
}
|
||||
|
||||
public override bool Move( Direction d )
|
||||
{
|
||||
bool move = base.Move( d );
|
||||
|
||||
if ( move && m_FieldActive && Combatant != null )
|
||||
if ( move && FieldActive && Combatant != null )
|
||||
FixedParticles( 0, 10, 0, 0x2530, EffectLayer.Waist );
|
||||
|
||||
return move;
|
||||
|
|
@ -181,7 +181,7 @@ namespace Server.Mobiles
|
|||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_FieldActive = CanUseField;
|
||||
FieldActive = CanUseField;
|
||||
|
||||
if ( Name == "Exodus Overseer" )
|
||||
Name = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue