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

@ -25,7 +25,6 @@ namespace Server.Menus.Questions
public class QuestionMenu : IMenu
{
private static int m_NextSerial;
private readonly int m_Serial;
public QuestionMenu(string question, string[] answers)
{
@ -34,18 +33,18 @@ namespace Server.Menus.Questions
do
{
m_Serial = ++m_NextSerial;
m_Serial &= 0x7FFFFFFF;
} while (m_Serial == 0);
Serial = ++m_NextSerial;
Serial &= 0x7FFFFFFF;
} while (Serial == 0);
}
public string Question{ get; set; }
public string Question { get; set; }
public string[] Answers{ get; }
public string[] Answers { get; }
int IMenu.Serial => m_Serial;
public int Serial { get; }
int IMenu.EntryLength => Answers.Length;
public int EntryLength => Answers.Length;
public virtual void OnCancel(NetState state)
{
@ -61,4 +60,4 @@ namespace Server.Menus.Questions
state.Send(new DisplayQuestionMenu(this));
}
}
}
}