Exemplo n.º 1
0
 public void Init()
 {
     GS.ServerProperties.Properties.DISABLED_REGIONS    = "";
     GS.ServerProperties.Properties.DISABLED_EXPANSIONS = "";
     GS.ServerProperties.Properties.DEBUG_LOAD_REGIONS  = "";
     GameLiving.LoadCalculators();
 }
Exemplo n.º 2
0
        public void CalculateDamageBase_SpellDamageIs100FromGameNPCWithoutOwner_ReturnAround119()
        {
            GameLiving.LoadCalculators(); //temporal coupling and global state
            var spell  = Create.DamageSpell(100);
            var source = Create.FakeNPC();

            source.Level        = 50;
            source.Intelligence = 100;
            var target       = Create.FakePlayer();
            var spellLine    = new SpellLine("", "", "", false);
            var spellHandler = new SpellHandler(source, spell, spellLine);

            double actual = spellHandler.CalculateDamageBase(target);

            double expected = 100 * (100 + 200) / 275.0;

            Assert.AreEqual(expected, actual, 0.001);
        }
 public void Init()
 {
     GameLiving.LoadCalculators();
 }