示例#1
0
 void AddSkinInfo(CSkinInfo skinInfo)
 {
     if (skinInfo != null && skinInfo.m_nType > 0)
     {
         if (!s_SkinInfoMap.Contains(skinInfo.m_nType))
         {
             s_SkinInfoMap.Add(skinInfo.m_nType, skinInfo);
         }
     }
 }
示例#2
0
        bool ParseFile(XQFileStream file)
        {
            if (file != null && file.IsOpen())
            {
                UInt16 usNumber = 0;
                file.ReadUShort(ref usNumber);

                for (UInt16 i = 0; i < usNumber; i++)
                {
                    CItemInfo iteminfo = new CItemInfo();
                    iteminfo.Load(ref file);
                    RegistItemInfo(iteminfo);
                }

                // 额外时尚值 客户端不使用
                List <PlaceFashionInfo> m_PlaceFashionList = new List <PlaceFashionInfo>();
                _Load <PlaceFashionInfo>(file, m_PlaceFashionList);

                // 光效石属性
                XQDataLoadHelper.LoadToDic <byte, uint>(ref m_dicEffectStoneInfo, file, XQDataLoadHelper.ReadByte, XQDataLoadHelper.ReadUInt, false);

                // skin
                usNumber = 0;
                file.ReadUShort(ref usNumber);

                for (UInt16 i = 0; i < usNumber; i++)
                {
                    CSkinInfo skinInfo = new CSkinInfo();
                    skinInfo.Load(ref file);
                    AddSkinInfo(skinInfo);
                }

                //Item animation
                file.ReadUShort(ref usNumber);
                for (UInt16 i = 0; i < usNumber; i++)
                {
                    CItemAniInfo itemAniInfo = new CItemAniInfo();
                    itemAniInfo.Load(ref file);
                    AddItemAniInfo(itemAniInfo);
                }

                file.Close();
                s_ItemInfoMap.Sort();
                s_SkinInfoMap.Sort();
                s_ItemAniInfoMap.Sort();
                return(true);
            }
            return(false);
        }