示例#1
0
        public void TestCharEnum()
        {
            var account = Setup.AccountPool.CreateAccount();
            var client  = new TestFakeClient(account);

            var record1 = account.AddRecord();
            var record2 = account.AddRecord();

            CharacterHandler.SendCharEnum(client);

            var parser = client.DequeueSMSGInfo(RealmServerOpCode.SMSG_CHAR_ENUM).Parser;

            CheckCharEnumSize(parser, account.Characters);

            var charEnum = parser.ParsedPacket;

            Assert.IsNotNull(charEnum);

            var chars = charEnum["Characters"];

            var char1 = chars[0];
            var char2 = chars[1];

            Assert.AreEqual(char1["Id"].EntityIdValue, record1.EntityId);
            Assert.AreEqual(char2["Id"].EntityIdValue, record2.EntityId);
        }
示例#2
0
        public static void Init(TestContext testContext)
        {
            chr                       = Setup.AllianceCharacterPool.Create();
            client                    = chr.FakeClient;
            disenchantSpell           = SpellHandler.Get(SpellId.DisenchantPT);
            disenchantSpell.CastDelay = 0;              // we don't want to wait

            ItemMgr.LoadAll();
            //LootMgr.LoadAll();
            ContentMgr.Load <ItemLootItemEntry>();
        }
示例#3
0
 public void SendRandomPacket(TestFakeClient client)
 {
 }