Adds style cop (#109)

This commit is contained in:
Kamron Batman 2020-04-26 00:16:02 -07:00 • committed by GitHub
parent 3e715bcb60
commit 556a17aba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1725 changed files with 33831 additions and 38046 deletions

View file

@ -31,18 +31,18 @@ namespace Server.Factions.AI
switch (version)
{
case 0:
{
Faction = Faction.ReadReference(reader);
Type = (ReactionType)reader.ReadEncodedInt();
{
Faction = Faction.ReadReference(reader);
Type = (ReactionType)reader.ReadEncodedInt();
break;
}
break;
}
}
}
public Faction Faction{ get; }
public Faction Faction { get; }
public ReactionType Type{ get; set; }
public ReactionType Type { get; set; }
public void Serialize(IGenericWriter writer)
{
@ -55,7 +55,7 @@ namespace Server.Factions.AI
public class Orders
{
private List<Reaction> m_Reactions;
private readonly List<Reaction> m_Reactions;
public Orders(BaseFactionGuard guard)
{
@ -73,30 +73,30 @@ namespace Server.Factions.AI
switch (version)
{
case 1:
{
Follow = reader.ReadMobile();
goto case 0;
}
{
Follow = reader.ReadMobile();
goto case 0;
}
case 0:
{
int count = reader.ReadEncodedInt();
m_Reactions = new List<Reaction>(count);
{
int count = reader.ReadEncodedInt();
m_Reactions = new List<Reaction>(count);
for (int i = 0; i < count; ++i)
m_Reactions.Add(new Reaction(reader));
for (int i = 0; i < count; ++i)
m_Reactions.Add(new Reaction(reader));
Movement = (MovementType)reader.ReadEncodedInt();
Movement = (MovementType)reader.ReadEncodedInt();
break;
}
break;
}
}
}
public BaseFactionGuard Guard{ get; }
public BaseFactionGuard Guard { get; }
public MovementType Movement{ get; set; }
public MovementType Movement { get; set; }
public Mobile Follow{ get; set; }
public Mobile Follow { get; set; }
public Reaction GetReaction(Faction faction)
{