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

@ -5,7 +5,7 @@ namespace Server.Engines.Harvest
public class HarvestBank
{
private int m_Current;
private int m_Maximum;
private readonly int m_Maximum;
private DateTime m_NextRespawn;
private HarvestVein m_Vein, m_DefaultVein;
@ -19,7 +19,7 @@ namespace Server.Engines.Harvest
Definition = def;
}
public HarvestDefinition Definition{ get; }
public HarvestDefinition Definition { get; }
public int Current
{
@ -56,7 +56,7 @@ namespace Server.Engines.Harvest
m_Current = m_Maximum;
if (Definition.RandomizeVeins) m_DefaultVein = Definition.GetVeinFrom(Utility.RandomDouble());
if (Definition.RandomizeVeins) m_DefaultVein = Definition.GetVeinFrom(Utility.Random(Definition.VeinWeights));
m_Vein = m_DefaultVein;
}
@ -74,8 +74,8 @@ namespace Server.Engines.Harvest
m_Current = m_Maximum - amount;
double minutes = min + rnd * (max - min);
if (Definition.RaceBonus && from.Race == Race.Elf) //def.RaceBonus = Core.ML
minutes *= .75; //25% off the time.
if (Definition.RaceBonus && from.Race == Race.Elf) // def.RaceBonus = Core.ML
minutes *= .75; // 25% off the time.
m_NextRespawn = DateTime.UtcNow + TimeSpan.FromMinutes(minutes);
}
@ -88,4 +88,4 @@ namespace Server.Engines.Harvest
m_Current = 0;
}
}
}
}