Beispiel #1
0
 public void AddHeal(HealEvent heal)
 {
 }
Beispiel #2
0
 private void TrackHeal(HealEvent heal)
 {
     Add(heal.Source);
     Add(heal.Target);
 }
Beispiel #3
0
        public void Heal()
        {
            HealEvent heal   = null;
            var       parser = new LogParser(PLAYER);

            parser.OnHeal += (args) => heal = args;

            // you healing others
            heal = null;
            parser.ParseLine("[Sun May 22 11:02:53 2016] You have healed A lizard hireling for 15802 points.");
            Assert.NotNull(heal);
            Assert.Equal(PLAYER, heal.Source);
            Assert.Equal("A lizard hireling", heal.Target);
            Assert.Equal(15802, heal.Amount);

            // others healing you
            heal = null;
            parser.ParseLine("[Thu May 19 10:37:34 2016] Cleric has healed you for 61780 points.");
            Assert.NotNull(heal);
            Assert.Equal("Cleric", heal.Source);
            Assert.Equal(PLAYER, heal.Target);
            Assert.Equal(61780, heal.Amount);

            // self healing with a HoT
            heal = null;
            parser.ParseLine("[Sun May 22 11:40:18 2016] You have been healed for 10000 hit points by your Nature's Reprieve III.");
            Assert.NotNull(heal);
            Assert.Equal(PLAYER, heal.Source);
            Assert.Equal(PLAYER, heal.Target);
            Assert.Equal(10000, heal.Amount);

            // others healing you with a HoT
            heal = null;
            parser.ParseLine("[Sun May 22 11:04:19 2016] Cleric healed you for 7853 hit points by Ardent Elixir Rk. II.");
            Assert.NotNull(heal);
            Assert.Equal("Cleric", heal.Source);
            Assert.Equal(PLAYER, heal.Target);
            Assert.Equal(7853, heal.Amount);
            //Assert.Equal("Ardent Elixir Rk. II", heal.Spell);

            // dead cleric healing you with a HoT
            heal = null;
            parser.ParseLine("[Sun May 22 11:04:19 2016] Cleric's corpse healed you for 7853 hit points by Ardent Elixir Rk. II.");
            Assert.NotNull(heal);
            Assert.Equal("Cleric", heal.Source);
            Assert.Equal(PLAYER, heal.Target);
            Assert.Equal(7853, heal.Amount);

            // you healing others with a HoT
            heal = null;
            parser.ParseLine("[Thu Jun 16 16:09:25 2016] You have healed Rumstil for 1170 hit points with your Pious Elixir.");
            Assert.NotNull(heal);
            Assert.Equal(PLAYER, heal.Source);
            Assert.Equal("Rumstil", heal.Target);
            Assert.Equal(1170, heal.Amount);
            //Assert.Equal("Pious Elixir", heal.Spell);

            // others healing others (not shown in logs)
            heal = null;

            // attempted healing messages - the amount shown is the potential maximum rather than the actual healing
            heal = null;
            parser.ParseLine("[Sun May 22 11:04:37 2016] The promise of divine reformation is fulfilled. You have been healed for 34982 points.");
            Assert.Null(heal);
        }