Formatting FIxes (#58)
This commit is contained in:
parent
57fb9fb525
commit
096d39609e
1318 changed files with 11633 additions and 22129 deletions
|
|
@ -216,20 +216,11 @@ namespace Server.Factions
|
|||
}
|
||||
}
|
||||
|
||||
public bool IsCandidate(Mobile mob)
|
||||
{
|
||||
return FindCandidate(mob) != null;
|
||||
}
|
||||
public bool IsCandidate(Mobile mob) => FindCandidate(mob) != null;
|
||||
|
||||
public bool CanVote(Mobile mob)
|
||||
{
|
||||
return CurrentState == ElectionState.Election && !HasVoted(mob);
|
||||
}
|
||||
public bool CanVote(Mobile mob) => CurrentState == ElectionState.Election && !HasVoted(mob);
|
||||
|
||||
public bool HasVoted(Mobile mob)
|
||||
{
|
||||
return FindVoter(mob) != null;
|
||||
}
|
||||
public bool HasVoted(Mobile mob) => FindVoter(mob) != null;
|
||||
|
||||
public Candidate FindCandidate(Mobile mob)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,10 +27,7 @@ namespace Server.Factions
|
|||
private FactionDefinition m_Definition;
|
||||
public int ZeroRankOffset;
|
||||
|
||||
public Faction()
|
||||
{
|
||||
State = new FactionState(this);
|
||||
}
|
||||
public Faction() => State = new FactionState(this);
|
||||
|
||||
public StrongholdRegion StrongholdRegion{ get; set; }
|
||||
|
||||
|
|
@ -88,10 +85,7 @@ namespace Server.Factions
|
|||
|
||||
public static List<Faction> Factions => Reflector.Factions;
|
||||
|
||||
public int CompareTo(Faction f)
|
||||
{
|
||||
return m_Definition.Sort - (f?.m_Definition.Sort ?? 0);
|
||||
}
|
||||
public int CompareTo(Faction f) => m_Definition.Sort - (f?.m_Definition.Sort ?? 0);
|
||||
|
||||
public void Broadcast(string text)
|
||||
{
|
||||
|
|
@ -505,10 +499,7 @@ namespace Server.Factions
|
|||
return mob.AccessLevel >= AccessLevel.GameMaster || mob == Commander;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return m_Definition.FriendlyName;
|
||||
}
|
||||
public override string ToString() => m_Definition.FriendlyName;
|
||||
|
||||
public static bool CheckLeaveTimer(Mobile mob)
|
||||
{
|
||||
|
|
@ -1160,10 +1151,7 @@ namespace Server.Factions
|
|||
{
|
||||
private Faction m_Faction;
|
||||
|
||||
public BroadcastPrompt(Faction faction)
|
||||
{
|
||||
m_Faction = faction;
|
||||
}
|
||||
public BroadcastPrompt(Faction faction) => m_Faction = faction;
|
||||
|
||||
public override void OnResponse(Mobile from, string text)
|
||||
{
|
||||
|
|
@ -1184,10 +1172,7 @@ namespace Server.Factions
|
|||
public Timer m_Timer;
|
||||
}
|
||||
|
||||
public static bool InSkillLoss(Mobile mob)
|
||||
{
|
||||
return m_SkillLoss.ContainsKey(mob);
|
||||
}
|
||||
public static bool InSkillLoss(Mobile mob) => m_SkillLoss.ContainsKey(mob);
|
||||
|
||||
public static void ApplySkillLoss(Mobile mob)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -67,9 +67,6 @@ namespace Server.Factions
|
|||
}
|
||||
}
|
||||
|
||||
private static bool CheckExistance(Point3D loc, Map facet, Type type)
|
||||
{
|
||||
return facet.GetItemsInRange(loc, 0).Any(type.IsInstanceOfType);
|
||||
}
|
||||
private static bool CheckExistance(Point3D loc, Map facet, Type type) => facet.GetItemsInRange(loc, 0).Any(type.IsInstanceOfType);
|
||||
}
|
||||
}
|
||||
|
|
@ -76,10 +76,7 @@ namespace Server.Factions
|
|||
return false;
|
||||
}
|
||||
|
||||
public static bool IsQualified(Mobile mob, MerchantTitle title)
|
||||
{
|
||||
return IsQualified(mob, GetInfo(title));
|
||||
}
|
||||
public static bool IsQualified(Mobile mob, MerchantTitle title) => IsQualified(mob, GetInfo(title));
|
||||
|
||||
public static bool IsQualified(Mobile mob, MerchantTitleInfo info)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,10 +14,7 @@ namespace Server.Factions
|
|||
base.Delete();
|
||||
}
|
||||
|
||||
public FactionPersistance(Serial serial) : base(serial)
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
public FactionPersistance(Serial serial) : base(serial) => Instance = this;
|
||||
|
||||
public static FactionPersistance Instance{ get; private set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -241,10 +241,7 @@ namespace Server.Factions
|
|||
|
||||
public bool IsActive{ get; set; }
|
||||
|
||||
public int CompareTo(PlayerState ps)
|
||||
{
|
||||
return (ps?.m_KillPoints ?? 0) - m_KillPoints;
|
||||
}
|
||||
public int CompareTo(PlayerState ps) => (ps?.m_KillPoints ?? 0) - m_KillPoints;
|
||||
|
||||
public bool CanGiveSilverTo(Mobile mob)
|
||||
{
|
||||
|
|
@ -295,9 +292,6 @@ namespace Server.Factions
|
|||
writer.Write(Leaving);
|
||||
}
|
||||
|
||||
public static PlayerState Find(Mobile mob)
|
||||
{
|
||||
return mob is PlayerMobile mobile ? mobile.FactionPlayerState : null;
|
||||
}
|
||||
public static PlayerState Find(Mobile mob) => mob is PlayerMobile mobile ? mobile.FactionPlayerState : null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@ namespace Server.Factions
|
|||
return Faction.Find(m, true, true) != null;
|
||||
}
|
||||
|
||||
public override bool AllowHousing(Mobile from, Point3D p)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public override bool AllowHousing(Mobile from, Point3D p) => false;
|
||||
}
|
||||
}
|
||||
|
|
@ -132,10 +132,7 @@ namespace Server.Factions
|
|||
|
||||
public static List<Town> Towns => Reflector.Towns;
|
||||
|
||||
public int CompareTo(Town other)
|
||||
{
|
||||
return Definition.Sort - (other?.Definition.Sort ?? 0);
|
||||
}
|
||||
public int CompareTo(Town other) => Definition.Sort - (other?.Definition.Sort ?? 0);
|
||||
|
||||
public static Town FromRegion(Region reg)
|
||||
{
|
||||
|
|
@ -379,17 +376,13 @@ namespace Server.Factions
|
|||
CommandSystem.Register("GrantTownSilver", AccessLevel.Administrator, GrantTownSilver_OnCommand);
|
||||
}
|
||||
|
||||
public bool IsSheriff(Mobile mob)
|
||||
{
|
||||
return mob?.Deleted == false &&
|
||||
(mob.AccessLevel >= AccessLevel.GameMaster || mob == Sheriff);
|
||||
}
|
||||
public bool IsSheriff(Mobile mob) =>
|
||||
mob?.Deleted == false &&
|
||||
(mob.AccessLevel >= AccessLevel.GameMaster || mob == Sheriff);
|
||||
|
||||
public bool IsFinance(Mobile mob)
|
||||
{
|
||||
return mob?.Deleted == false &&
|
||||
(mob.AccessLevel >= AccessLevel.GameMaster || mob == Finance);
|
||||
}
|
||||
public bool IsFinance(Mobile mob) =>
|
||||
mob?.Deleted == false &&
|
||||
(mob.AccessLevel >= AccessLevel.GameMaster || mob == Finance);
|
||||
|
||||
public void Capture(Faction f)
|
||||
{
|
||||
|
|
@ -445,10 +438,7 @@ namespace Server.Factions
|
|||
ConstructGuardLists();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Definition.FriendlyName;
|
||||
}
|
||||
public override string ToString() => Definition.FriendlyName;
|
||||
|
||||
public static void WriteReference(GenericWriter writer, Town town)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,10 +7,7 @@ namespace Server.Factions
|
|||
private Mobile m_Finance;
|
||||
private Mobile m_Sheriff;
|
||||
|
||||
public TownState(Town town)
|
||||
{
|
||||
Town = town;
|
||||
}
|
||||
public TownState(Town town) => Town = town;
|
||||
|
||||
public TownState(GenericReader reader)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue