public void RunCommand(string command, ICommandSender sender)
 {
     try
     {
         ICommand commandObj = Parser.Parse(command, sender);
         commandObj.Execute();
     }
     catch (CommandNotFoundException)
     {
         sender.SendLine("Invalid command.");
     }
     catch (UsageException)
     {
         sender.SendLine("Invalid usage.");
     }
     catch (InsufficientPermissionException)
     {
         sender.SendLine("Invalid permissions.");
     }
 }
예제 #2
0
 public void Examine(ICommandSender examiner)
 {
     examiner.SendLine(RantEngine.RunPattern("You are on \\a {0} tile.", Adjective));
 }
예제 #3
0
 protected void ExamineBasic(ICommandSender examiner)
 {
     examiner.SendLine(this.GetFullName().FirstCharToUpper() + ". " + Gender.ToSymbol());
 }
예제 #4
0
 protected void ExamineInjury(ICommandSender examiner)
 {
     if (!Alive)
     {
         examiner.SendLine();
         examiner.SendLine("{0}'s dead.", Pronoun.FirstCharToUpper());
     }
     else if (Hp < Attributes.MaxHp / 2)
     {
         examiner.SendLine();
         examiner.SendLine("{0} looks injured.", Pronoun.FirstCharToUpper());
     }
 }
예제 #5
0
 public void Examine(ICommandSender examiner)
 {
     examiner.SendLine("[{0}]: {1}", Identifier, Description);
 }
예제 #6
0
        public override void Examine(ICommandSender examiner)
        {
            ExamineBasic(examiner);
            examiner.SendLine("Level {0} {1}.", Level, Race.Name);

            ExamineInjury(examiner);
        }
예제 #7
0
 public void Examine(ICommandSender examiner)
 {
     examiner.SendLine(Description);
 }