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

@ -4,7 +4,7 @@ namespace Server.Items
{
public class PowerScroll : SpecialScroll
{
private static SkillName[] m_Skills =
private static readonly SkillName[] m_Skills =
{
SkillName.Blacksmith,
SkillName.Tailoring,
@ -30,7 +30,7 @@ namespace Server.Items
SkillName.Peacemaking
};
private static SkillName[] m_AOSSkills =
private static readonly SkillName[] m_AOSSkills =
{
SkillName.Chivalry,
SkillName.Focus,
@ -40,13 +40,13 @@ namespace Server.Items
SkillName.SpiritSpeak
};
private static SkillName[] m_SESkills =
private static readonly SkillName[] m_SESkills =
{
SkillName.Ninjitsu,
SkillName.Bushido
};
private static SkillName[] m_MLSkills =
private static readonly SkillName[] m_MLSkills =
{
SkillName.Spellweaving
};
@ -65,7 +65,7 @@ namespace Server.Items
};
*/
private static List<SkillName> _Skills = new List<SkillName>();
private static readonly List<SkillName> _Skills = new List<SkillName>();
[Constructible]
public PowerScroll(SkillName skill = SkillName.Alchemy, double value = 0.0) : base(skill, value)
@ -80,11 +80,13 @@ namespace Server.Items
{
}
/* Using a scroll increases the maximum amount of a specific skill or your maximum statistics.
* When used, the effect is not immediately seen without a gain of points with that skill or statistics.
* You can view your maximum skill values in your skills window.
* You can view your maximum statistic value in your statistics window.
*/
public override int Message =>
1049469; /* Using a scroll increases the maximum amount of a specific skill or your maximum statistics.
* When used, the effect is not immediately seen without a gain of points with that skill or statistics.
* You can view your maximum skill values in your skills window.
* You can view your maximum statistic value in your statistics window. */
1049469;
public override int Title
{
@ -92,11 +94,13 @@ namespace Server.Items
{
double level = (Value - 105.0) / 5.0;
/* Wonderous Scroll (105 Skill): OR
* Exalted Scroll (110 Skill): OR
* Mythical Scroll (115 Skill): OR
* Legendary Scroll (120 Skill):
*/
if (level >= 0.0 && level <= 3.0 && Value % 5.0 == 0.0)
return 1049635 + (int)level; /* Wonderous Scroll (105 Skill): OR
* Exalted Scroll (110 Skill): OR
* Mythical Scroll (115 Skill): OR
* Legendary Scroll (120 Skill): */
return 1049635 + (int)level;
return 0;
}
@ -154,10 +158,12 @@ namespace Server.Items
double level = (Value - 105.0) / 5.0;
if (level >= 0.0 && level <= 3.0 && Value % 5.0 == 0.0)
list.Add(1049639 + (int)level, GetNameLocalized()); /* a wonderous scroll of ~1_type~ (105 Skill) OR
* an exalted scroll of ~1_type~ (110 Skill) OR
* a mythical scroll of ~1_type~ (115 Skill) OR
* a legendary scroll of ~1_type~ (120 Skill) */
/* a wonderous scroll of ~1_type~ (105 Skill) OR
* an exalted scroll of ~1_type~ (110 Skill) OR
* a mythical scroll of ~1_type~ (115 Skill) OR
* a legendary scroll of ~1_type~ (120 Skill)
*/
list.Add(1049639 + (int)level, GetNameLocalized());
else
list.Add("a power scroll of {0} ({1} Skill)", GetName(), Value);
}