Пример #1
0
 private void EnsureChar(ref TestCharacter chr, CharacterPool pool)
 {
     chr = pool.Create();
     chr.SetMoney(100000);
     chr.GodMode = true;
     chr.EnsureInWorldAndLiving();
 }
Пример #2
0
 void EnsureChar(ref TestCharacter chr, CharacterPool pool)
 {
     //if (chr == null || chr.IsInWorld)
     {
         chr = pool.Create();
         chr.SetMoney(100000);
         chr.GodMode = true;
         chr.EnsureInWorldAndLiving();
     }
 }
Пример #3
0
        public void TestInitialize()
        {
            chr1.EnsureInWorldAndLiving();
            chr2.EnsureInWorldAndLiving();

            chr1.Inventory.Purge();
            chr2.Inventory.Purge();

            chr1.SetMoney(10000);
            chr2.SetMoney(1000);
        }
Пример #4
0
        public static Guild CreateGuild(int count)
        {
            var pool = Setup.AllianceCharacterPool;

            pool.EnsureLiving = true;

            Asser.GreaterThan(count, 1);

            // create
            leader.EnsureInWorldAndLiving();
            leader.EnsureNoGuild();

            new Guild(leader.Record, "TestGuild " + Utility.Random(1, 1000));

            var guild = leader.Guild;

            Assert.IsNotNull(guild);

            // invite
            var members = new TestCharacter[count - 1];

            for (uint i = 1; i < count; i++)
            {
                var member = members[i - 1] = pool.Create();
                member.EnsureInWorldAndLiving();
                member.EnsureNoGuild();
                Invite(leader, member);
            }

            // accept
            for (uint i = 1; i < count; i++)
            {
                var member = members[i - 1];

                Accept(leader, member);
                var character   = member;
                var guildMember = guild[character.Name];
                Assert.IsNotNull(guildMember);
            }

            Assert.AreEqual(count, guild.MemberCount);

            return(guild);
        }