Пример #1
0
        /// <summary>
        /// 战宠/溜宠/坐骑
        /// </summary>
        /// <param name="writer"></param>
        public void WritePet(IExternalWriter writer)
        {
            // 写宠物信息
            writer.WriteKey("Pet");
            var pet = m_pet;
            if (pet == null)
            {
                writer.WriteNull();
            }
            else
            {
                writer.WriteValue(new PetSimple(pet, 3));
            }

            // 溜宠信息
            writer.WriteKey("SlipPets");
            writer.WriteValue(m_slippets);

            // 写坐骑信息,
            writer.WriteKey("Mounts");
            var mount = m_mounts;
            if (mount == null)
            {
                writer.WriteNull();
            }
            else
            {
                writer.WriteValue(new MountsSimple(mount));
            }
        }