Formatting FIxes (#58)

This commit is contained in:
Kamron Batman 2019-10-04 23:08:13 -07:00 committed by GitHub
parent 57fb9fb525
commit 096d39609e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1318 changed files with 11633 additions and 22129 deletions

View file

@ -96,15 +96,9 @@ namespace Server.Spells.Ninjitsu
return base.CheckCast();
}
public override bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable)
{
return false;
}
public override bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable) => false;
private bool CasterIsMoving()
{
return Core.TickCount - Caster.LastMoveTime <= Caster.ComputeMovementSpeed(Caster.Direction);
}
private bool CasterIsMoving() => Core.TickCount - Caster.LastMoveTime <= Caster.ComputeMovementSpeed(Caster.Direction);
public override void OnBeginCast()
{
@ -114,11 +108,7 @@ namespace Server.Spells.Ninjitsu
m_WasMoving = CasterIsMoving();
}
public override bool CheckFizzle()
{
// Spell is initially always successful, and with no skill gain.
return true;
}
public override bool CheckFizzle() => true;
public override void OnCast()
{
@ -188,10 +178,7 @@ namespace Server.Spells.Ninjitsu
FinishSequence();
}
public int GetLastAnimalForm(Mobile m)
{
return m_LastAnimalForms.TryGetValue(m, out int value) ? value : -1;
}
public int GetLastAnimalForm(Mobile m) => m_LastAnimalForms.TryGetValue(m, out int value) ? value : -1;
public static MorphResult Morph(Mobile m, int entryID)
{
@ -311,20 +298,11 @@ namespace Server.Spells.Ninjitsu
context.Timer.Stop();
}
public static AnimalFormContext GetContext(Mobile m)
{
return m_Table.TryGetValue(m, out AnimalFormContext context) ? context : null;
}
public static AnimalFormContext GetContext(Mobile m) => m_Table.TryGetValue(m, out AnimalFormContext context) ? context : null;
public static bool UnderTransformation(Mobile m)
{
return m_Table.ContainsKey(m);
}
public static bool UnderTransformation(Mobile m) => m_Table.ContainsKey(m);
public static bool UnderTransformation(Mobile m, Type type)
{
return GetContext(m)?.Type == type;
}
public static bool UnderTransformation(Mobile m, Type type) => GetContext(m)?.Type == type;
/*
private delegate void AnimalFormCallback( Mobile from );

View file

@ -15,10 +15,7 @@ namespace Server.Spells.Ninjitsu
public override TextDefinition AbilityMessage =>
new TextDefinition(1063091); // You prepare to hit your opponent with a Death Strike.
public override double GetDamageScalar(Mobile attacker, Mobile defender)
{
return 0.5;
}
public override double GetDamageScalar(Mobile attacker, Mobile defender) => 0.5;
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{

View file

@ -48,10 +48,7 @@ namespace Server.Spells.Ninjitsu
return 1.0 + (bonus * 3 + 0.01);
}
public override bool OnBeforeDamage(Mobile attacker, Mobile defender)
{
return Validate(attacker) && CheckMana(attacker, true);
}
public override bool OnBeforeDamage(Mobile attacker, Mobile defender) => Validate(attacker) && CheckMana(attacker, true);
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{

View file

@ -29,10 +29,7 @@ namespace Server.Spells.Ninjitsu
public override bool BlockedByAnimalForm => false;
public static bool HasClone(Mobile m)
{
return m_CloneCount.ContainsKey(m);
}
public static bool HasClone(Mobile m) => m_CloneCount.ContainsKey(m);
public static void AddClone(Mobile m)
{
@ -77,10 +74,7 @@ namespace Server.Spells.Ninjitsu
return base.CheckCast();
}
public override bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable)
{
return false;
}
public override bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable) => false;
public override void OnBeginCast()
{
@ -179,10 +173,7 @@ namespace Server.Mobiles
public override bool IsDispellable => false;
public override bool Commandable => false;
public override bool IsHumanInTown()
{
return false;
}
public override bool IsHumanInTown() => false;
private Item CloneItem(Item item)
{
@ -239,10 +230,7 @@ namespace Server.Mobiles
{
public class CloneAI : BaseAI
{
public CloneAI(Clone m) : base(m)
{
m.CurrentSpeed = m.ActiveSpeed;
}
public CloneAI(Clone m) : base(m) => m.CurrentSpeed = m.ActiveSpeed;
public override bool CanDetectHidden => false;

View file

@ -24,10 +24,7 @@ namespace Server.Spells.Ninjitsu
public override int CastRecoveryBase => 7;
public static bool CheckExpansion(Mobile from)
{
return (from as PlayerMobile)?.NetState?.SupportsExpansion(Expansion.SE) == true;
}
public static bool CheckExpansion(Mobile from) => (from as PlayerMobile)?.NetState?.SupportsExpansion(Expansion.SE) == true;
public override bool CheckCast()
{
@ -92,9 +89,6 @@ namespace Server.Spells.Ninjitsu
max = RequiredSkill + 37.5;
}
public override int GetMana()
{
return 0;
}
public override int GetMana() => 0;
}
}

View file

@ -40,10 +40,7 @@ namespace Server.Spells.Ninjitsu
return base.CheckCast();
}
public override bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable)
{
return false;
}
public override bool CheckDisturb(DisturbType type, bool firstCircle, bool resistable) => false;
public override void OnCast()
{