void AddItemAniInfo(CItemAniInfo itemAniInfo) { if (itemAniInfo != null && itemAniInfo.m_nType > 0) { if (!s_ItemAniInfoMap.Contains(itemAniInfo.m_nType)) { s_ItemAniInfoMap.Add(itemAniInfo.m_nType, itemAniInfo); } } }
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); }