//scene public bool Load() { DestroyScene(); XQFileStream file = new XQFileStream(); if (file != null) { file.Open("Data/sceneinfo"); if (file.IsOpen()) { UInt16 usNumber = 0; file.ReadUShort(ref usNumber); for (UInt16 i = 0; i < usNumber; i++) { CSceneInfo sceneinfo = new CSceneInfo(); sceneinfo.Load(ref file); RegistSceneInfo(sceneinfo); } file.Close(); s_SceneInfoMap.Sort(); return(true); } } return(false); }
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); }
public bool Load(XQFileStream file) { DestroyModel(); if (file != null && file.IsOpen()) { UInt16 usNumber = 0; file.ReadUShort(ref usNumber); for (UInt16 i = 0; i < usNumber; i++) { CModelInfo modelinfo = new CModelInfo(); modelinfo.Load(ref file); RegistModelInfo(modelinfo); } s_ModelInfoMap.Sort(); return(true); } return(false); }