Formatting FIxes (#58)
This commit is contained in:
parent
57fb9fb525
commit
096d39609e
1318 changed files with 11633 additions and 22129 deletions
|
|
@ -17,26 +17,6 @@ namespace Server.Mobiles
|
|||
|
||||
public override bool DoActionWander()
|
||||
{
|
||||
// Old:
|
||||
#if false
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, true, false, true))
|
||||
{
|
||||
m_Mobile.DebugSay( "There is something near, I go away" );
|
||||
Action = ActionType.Backoff;
|
||||
}
|
||||
else if ( m_Mobile.IsHurt() || m_Mobile.Combatant != null )
|
||||
{
|
||||
m_Mobile.DebugSay( "I am hurt or being attacked, I flee" );
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionWander();
|
||||
}
|
||||
|
||||
return true;
|
||||
#endif
|
||||
|
||||
// New, only flee @ 10%
|
||||
|
||||
double hitPercent = (double)m_Mobile.Hits / m_Mobile.HitsMax;
|
||||
|
|
|
|||
|
|
@ -789,10 +789,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
|
||||
public virtual bool OnAtWayPoint()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public virtual bool OnAtWayPoint() => true;
|
||||
|
||||
public virtual bool DoActionWander()
|
||||
{
|
||||
|
|
@ -901,15 +898,9 @@ namespace Server.Mobiles
|
|||
return true;
|
||||
}
|
||||
|
||||
public virtual bool DoActionInteract()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public virtual bool DoActionInteract() => true;
|
||||
|
||||
public virtual bool DoActionBackoff()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public virtual bool DoActionBackoff() => true;
|
||||
|
||||
public virtual bool Obey()
|
||||
{
|
||||
|
|
@ -1785,15 +1776,9 @@ namespace Server.Mobiles
|
|||
return delay;
|
||||
}
|
||||
|
||||
public virtual bool CheckMove()
|
||||
{
|
||||
return Core.TickCount - NextMove >= 0;
|
||||
}
|
||||
public virtual bool CheckMove() => Core.TickCount - NextMove >= 0;
|
||||
|
||||
public virtual bool DoMove(Direction d)
|
||||
{
|
||||
return DoMove(d, false);
|
||||
}
|
||||
public virtual bool DoMove(Direction d) => DoMove(d, false);
|
||||
|
||||
public virtual bool DoMove(Direction d, bool badStateOk)
|
||||
{
|
||||
|
|
@ -2561,10 +2546,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
}
|
||||
|
||||
public static bool IsInCombat(BaseCreature creature)
|
||||
{
|
||||
return creature != null && (creature.Aggressors.Count > 0 || creature.Aggressed.Count > 0);
|
||||
}
|
||||
public static bool IsInCombat(BaseCreature creature) => creature != null && (creature.Aggressors.Count > 0 || creature.Aggressed.Count > 0);
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -137,20 +137,11 @@ namespace Server.Mobiles
|
|||
return null;
|
||||
}
|
||||
|
||||
private static bool NeedCure(Mobile m)
|
||||
{
|
||||
return m.Poisoned;
|
||||
}
|
||||
private static bool NeedCure(Mobile m) => m.Poisoned;
|
||||
|
||||
private static bool NeedGHeal(Mobile m)
|
||||
{
|
||||
return m.Hits < m.HitsMax - 40;
|
||||
}
|
||||
private static bool NeedGHeal(Mobile m) => m.Hits < m.HitsMax - 40;
|
||||
|
||||
private static bool NeedLHeal(Mobile m)
|
||||
{
|
||||
return m.Hits < m.HitsMax - 10;
|
||||
}
|
||||
private static bool NeedLHeal(Mobile m) => m.Hits < m.HitsMax - 10;
|
||||
|
||||
private delegate bool NeedDelegate(Mobile m);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,10 +76,7 @@ namespace Server.Mobiles
|
|||
return base.Think();
|
||||
}
|
||||
|
||||
public virtual double ScaleBySkill(double v, SkillName skill)
|
||||
{
|
||||
return v * m_Mobile.Skills[skill].Value / 100;
|
||||
}
|
||||
public virtual double ScaleBySkill(double v, SkillName skill) => v * m_Mobile.Skills[skill].Value / 100;
|
||||
|
||||
public override bool DoActionWander()
|
||||
{
|
||||
|
|
@ -252,10 +249,7 @@ namespace Server.Mobiles
|
|||
return false;
|
||||
}
|
||||
|
||||
public virtual Spell GetRandomDamageSpell()
|
||||
{
|
||||
return UseNecromancy() ? GetRandomDamageSpellNecro() : GetRandomDamageSpellMage();
|
||||
}
|
||||
public virtual Spell GetRandomDamageSpell() => UseNecromancy() ? GetRandomDamageSpellNecro() : GetRandomDamageSpellMage();
|
||||
|
||||
public virtual Spell GetRandomDamageSpellNecro()
|
||||
{
|
||||
|
|
@ -308,10 +302,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
|
||||
public virtual Spell GetRandomCurseSpell()
|
||||
{
|
||||
return UseNecromancy() ? GetRandomCurseSpellNecro() : GetRandomCurseSpellMage();
|
||||
}
|
||||
public virtual Spell GetRandomCurseSpell() => UseNecromancy() ? GetRandomCurseSpellNecro() : GetRandomCurseSpellMage();
|
||||
|
||||
public virtual Spell GetRandomCurseSpellNecro()
|
||||
{
|
||||
|
|
@ -947,11 +938,9 @@ namespace Server.Mobiles
|
|||
return null;
|
||||
}
|
||||
|
||||
public bool CanDispel(Mobile m)
|
||||
{
|
||||
return m is BaseCreature creature && creature.Summoned && m_Mobile.CanBeHarmful(creature, false) &&
|
||||
!creature.IsAnimatedDead;
|
||||
}
|
||||
public bool CanDispel(Mobile m) =>
|
||||
m is BaseCreature creature && creature.Summoned && m_Mobile.CanBeHarmful(creature, false) &&
|
||||
!creature.IsAnimatedDead;
|
||||
|
||||
private bool ProcessTarget()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,10 +7,7 @@ namespace Server
|
|||
{
|
||||
private Type[][] m_Types;
|
||||
|
||||
public OppositionGroup(Type[][] types)
|
||||
{
|
||||
m_Types = types;
|
||||
}
|
||||
public OppositionGroup(Type[][] types) => m_Types = types;
|
||||
|
||||
public static OppositionGroup TerathansAndOphidians{ get; } = new OppositionGroup(new[]
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue