Пример #1
0
        public void NpcIndex_Set_Get()
        {
            var packet = new NpcBuffs();

            packet.NpcIndex = 1;

            Assert.Equal(1, packet.NpcIndex);
        }
Пример #2
0
        public void Buffs_Set_Get()
        {
            var packet = new NpcBuffs();

            for (ushort i = 0; i < packet.Buffs.Length; ++i)
            {
                packet.Buffs[i] = new SerializableNpcBuff()
                {
                    Type = i, Time = (short)((i + 1) * 60)
                };
            }

            for (ushort i = 0; i < packet.Buffs.Length; ++i)
            {
                Assert.Equal(new SerializableNpcBuff()
                {
                    Type = i, Time = (short)((i + 1) * 60)
                }, packet.Buffs[i]);
            }
        }