/// <summary> /// 加载列表 /// </summary> protected override void LoadList(MMO_MemoryStream ms) { int rows = ms.ReadInt(); int columns = ms.ReadInt(); for (int i = 0; i < rows; i++) { SkillEntity entity = new SkillEntity(); entity.Id = ms.ReadInt(); entity.SkillName = ms.ReadUTF8String(); entity.SkillDesc = ms.ReadUTF8String(); entity.SkillIcon = ms.ReadUTF8String(); entity.SkillIndex = ms.ReadInt(); entity.SkillNeedTime = ms.ReadInt(); entity.Skill_Effect_Name = ms.ReadUTF8String(); entity.Skill_Effect_Time = ms.ReadFloat(); entity.SoundId = ms.ReadInt(); entity.LevelLimit = ms.ReadInt(); entity.IsPhyAttack = ms.ReadInt(); entity.AttackTargetCount = ms.ReadInt(); entity.AttackRange = ms.ReadFloat(); entity.AreaAttackRadius = ms.ReadFloat(); entity.ShowHurtEffectDelaySecond = ms.ReadFloat(); m_List.Add(entity); m_Dic[entity.Id] = entity; } }
/// <summary> /// 加载列表 /// </summary> protected override void LoadList(MMO_MemoryStream ms) { int rows = ms.ReadInt(); ms.ReadInt(); for (int i = 0; i < rows; i++) { LocalzationDic[ms.ReadUTF8String()] = ms.ReadUTF8String(); } }
/// <summary> /// 解析版本资源列表 /// </summary> /// <param name="fileUri">版本资源列表文件路径</param> /// <param name="bytes">要解析的数据</param> /// <param name="errorMessage">错误信息</param> private void ParseVersionList(string fileUri, byte[] bytes, string errorMessage) { if (m_VersionListReady) { throw new Exception("Version list has been parsed."); } if (bytes == null || bytes.Length <= 0) { throw new Exception(TextUtil.Format("Version list '{0}' is invalid, error message is '{1}'.", fileUri, string.IsNullOrEmpty(errorMessage) ? "<Empty>" : errorMessage)); } try { using (MMO_MemoryStream ms = new MMO_MemoryStream(bytes)) { int assetCount = ms.ReadInt(); m_ResourceManager.AssetsInfos = new Dictionary <string, string>(assetCount); int resourceCount = ms.ReadInt(); m_ResourceManager.ResourceInfos = new Dictionary <string, ResourceInfo>(resourceCount); for (int i = 0; i < resourceCount; i++) { string resourceName = ms.ReadUTF8String(); int length = ms.ReadInt(); int hashCode = ms.ReadInt(); int zipLength = ms.ReadInt(); int zipHashCode = ms.ReadInt(); int assetNamesCount = ms.ReadInt(); for (int j = 0; j < assetNamesCount; j++) { string assetName = ms.ReadUTF8String(); m_ResourceManager.AssetsInfos.Add(assetName, resourceName); m_ResourceManager.AssetsNames.Add(assetName); } SetVersionInfo(resourceName, length, hashCode, zipLength, zipHashCode); } } m_VersionListReady = true; RefreshCheckInfoStatus(); } catch (Exception exception) { throw new Exception(TextUtil.Format("Parse version list exception '{0}'.", exception.Message), exception); } }
/// <summary> /// 加载列表 /// </summary> protected override void LoadList(MMO_MemoryStream ms) { int rows = ms.ReadInt(); int columns = ms.ReadInt(); for (int i = 0; i < rows; i++) { MusicEntity entity = new MusicEntity(); entity.Id = ms.ReadInt(); entity.Desc = ms.ReadUTF8String(); entity.AssetName = ms.ReadUTF8String(); m_List.Add(entity); m_Dic[entity.Id] = entity; } }
/// <summary> /// 加载列表 /// </summary> protected override void LoadList(MMO_MemoryStream ms) { int rows = ms.ReadInt(); int columns = ms.ReadInt(); for (int i = 0; i < rows; i++) { UIFormEntity entity = new UIFormEntity(); entity.Id = ms.ReadInt(); entity.Desc = ms.ReadUTF8String(); entity.AssetName = ms.ReadUTF8String(); entity.UIGroupName = ms.ReadUTF8String(); entity.AllowMultiInstance = ms.ReadBool(); entity.PauseCoveredUIForm = ms.ReadBool(); m_List.Add(entity); m_Dic[entity.Id] = entity; } }
/// <summary> /// 加载列表 /// </summary> protected override void LoadList(MMO_MemoryStream ms) { int rows = ms.ReadInt(); int columns = ms.ReadInt(); for (int i = 0; i < rows; i++) { ChapterEntity entity = new ChapterEntity(); entity.Id = ms.ReadInt(); entity.ChapterName = ms.ReadUTF8String(); entity.GameLevelCount = ms.ReadInt(); entity.BG_Pic = ms.ReadUTF8String(); entity.Uvx = ms.ReadFloat(); entity.Uvy = ms.ReadFloat(); m_List.Add(entity); m_Dic[entity.Id] = entity; } }
/// <summary> /// 加载列表 /// </summary> protected override void LoadList(MMO_MemoryStream ms) { int rows = ms.ReadInt(); int columns = ms.ReadInt(); for (int i = 0; i < rows; i++) { RideEntity entity = new RideEntity(); entity.Id = ms.ReadInt(); entity.AssetName = ms.ReadUTF8String(); entity.RideType = ms.ReadInt(); entity.Point = ms.ReadUTF8String(); entity.RideName = ms.ReadUTF8String(); entity.RideFighting = ms.ReadInt(); m_List.Add(entity); m_Dic[entity.Id] = entity; } }
/// <summary> /// 加载列表 /// </summary> protected override void LoadList(MMO_MemoryStream ms) { int rows = ms.ReadInt(); int columns = ms.ReadInt(); for (int i = 0; i < rows; i++) { SceneEntity entity = new SceneEntity(); entity.Id = ms.ReadInt(); entity.Desc = ms.ReadUTF8String(); entity.AssetName = ms.ReadUTF8String(); entity.BackgroundMusicId = ms.ReadInt(); entity.RoleBirthPos = ms.ReadUTF8String(); entity.SmallMapImageAssets = ms.ReadUTF8String(); entity.SmallMapSize = ms.ReadInt(); m_List.Add(entity); m_Dic[entity.Id] = entity; } }
/// <summary> /// 解析资源包资源列表 /// </summary> /// <param name="fileUri">版本资源列表文件路径</param> /// <param name="bytes">要解析的数据</param> /// <param name="errorMessage">错误信息</param> private void ParsePackageList(string fileUri, byte[] bytes, string errorMessage) { if (bytes == null || bytes.Length <= 0) { throw new Exception(TextUtil.Format("Package list '{0}' is invalid, error message is '{1}'.", fileUri, string.IsNullOrEmpty(errorMessage) ? "<Empty>" : errorMessage)); } try { using (MMO_MemoryStream ms = new MMO_MemoryStream(bytes)) { int assetCount = ms.ReadInt(); m_ResourceManager.AssetsInfos = new Dictionary <string, string>(assetCount); int resourceCount = ms.ReadInt(); m_ResourceManager.ResourceInfos = new Dictionary <string, ResourceInfo>(resourceCount); for (int i = 0; i < resourceCount; i++) { string resourceName = ms.ReadUTF8String(); int length = ms.ReadInt(); int hashCode = ms.ReadInt(); int assetNamesCount = ms.ReadInt(); for (int j = 0; j < assetNamesCount; j++) { string assetName = ms.ReadUTF8String(); m_ResourceManager.AssetsInfos.Add(assetName, resourceName); m_ResourceManager.AssetsNames.Add(assetName); } ProcessResourceInfo(resourceName, length, hashCode); } } ResourceInitComplete(); } catch (Exception exception) { throw new Exception(TextUtil.Format("Parse package list exception '{0}'.", exception.Message), exception); } }
/// <summary> /// 加载列表 /// </summary> protected override void LoadList(MMO_MemoryStream ms) { int rows = ms.ReadInt(); int columns = ms.ReadInt(); for (int i = 0; i < rows; i++) { SoundEntity entity = new SoundEntity(); entity.Id = ms.ReadInt(); entity.Desc = ms.ReadUTF8String(); entity.AssetName = ms.ReadUTF8String(); entity.Priority = ms.ReadInt(); entity.Loop = ms.ReadBool(); entity.Volume = ms.ReadFloat(); entity.SpatialBlend = ms.ReadFloat(); entity.MaxDistance = ms.ReadFloat(); m_List.Add(entity); m_Dic[entity.Id] = entity; } }
/// <summary> /// 加载列表 /// </summary> protected override void LoadList(MMO_MemoryStream ms) { int rows = ms.ReadInt(); int columns = ms.ReadInt(); for (int i = 0; i < rows; i++) { JobWingsEntity entity = new JobWingsEntity(); entity.Id = ms.ReadInt(); entity.JobId = ms.ReadInt(); entity.WingId = ms.ReadInt(); entity.AssetName = ms.ReadUTF8String(); entity.WingFighting = ms.ReadInt(); m_List.Add(entity); m_Dic[entity.Id] = entity; } }
/// <summary> /// 解析读写区资源列表 /// </summary> /// <param name="fileUri">读写区资源列表文件路径</param> /// <param name="bytes">要解析的数据</param> /// <param name="errorMessage">错误信息</param> private void ParseReadWriteList(string fileUri, byte[] bytes, string errorMessage) { if (m_ReadWriteListReady) { throw new Exception("Read-write list has been parsed."); } if (bytes == null || bytes.Length <= 0) { m_ReadWriteListReady = true; RefreshCheckInfoStatus(); return; } try { using (MMO_MemoryStream ms = new MMO_MemoryStream(bytes)) { int resourceCount = ms.ReadInt(); for (int i = 0; i < resourceCount; i++) { string resourceName = ms.ReadUTF8String(); int length = ms.ReadInt(); int hashCode = ms.ReadInt(); SetReadWriteInfo(resourceName, length, hashCode); if (m_ResourceManager.ReadWriteResourceInfos.ContainsKey(resourceName)) { throw new Exception(TextUtil.Format("Read-write resource info '{0}' is already exist.", resourceName)); } m_ResourceManager.ReadWriteResourceInfos.Add(resourceName, new ReadWriteResourceInfo(length, hashCode)); } } m_ReadWriteListReady = true; RefreshCheckInfoStatus(); } catch (Exception exception) { throw new Exception(TextUtil.Format("Parse read-write list exception '{0}'.", exception.Message), exception); } }
/// <summary> /// 解析只读区资源列表 /// </summary> /// <param name="fileUri">只读区资源列表文件路径</param> /// <param name="bytes">要解析的数据</param> /// <param name="errorMessage">错误信息</param> private void ParseReadOnlyList(string fileUri, byte[] bytes, string errorMessage) { if (m_ReadOnlyListReady) { throw new Exception("Readonly list has been parsed."); } if (bytes == null || bytes.Length <= 0) { m_ReadOnlyListReady = true; RefreshCheckInfoStatus(); return; } try { using (MMO_MemoryStream ms = new MMO_MemoryStream(bytes)) { int resourceCount = ms.ReadInt(); for (int i = 0; i < resourceCount; i++) { string name = ms.ReadUTF8String(); int length = ms.ReadInt(); int hashCode = ms.ReadInt(); SetReadOnlyInfo(name, length, hashCode); } } m_ReadOnlyListReady = true; RefreshCheckInfoStatus(); } catch (Exception exception) { throw new Exception(TextUtil.Format("Parse readonly list exception '{0}'.", exception.Message), exception); } }
/// <summary> /// 加载列表 /// </summary> protected override void LoadList(MMO_MemoryStream ms) { int rows = ms.ReadInt(); int columns = ms.ReadInt(); for (int i = 0; i < rows; i++) { JobEntity entity = new JobEntity(); entity.Id = ms.ReadInt(); entity.Name = ms.ReadUTF8String(); entity.CreateRoleAssetName = ms.ReadUTF8String(); entity.AssetName = ms.ReadUTF8String(); entity.Sex = ms.ReadInt(); entity.HeadNotSelectAssetName = ms.ReadUTF8String(); entity.HeadSelectAssetName = ms.ReadUTF8String(); entity.DescImageAssetName = ms.ReadUTF8String(); entity.DescAllAssetName = ms.ReadUTF8String(); entity.DescSpecificAssetName = ms.ReadUTF8String(); entity.Attack = ms.ReadInt(); entity.Defense = ms.ReadInt(); entity.Hit = ms.ReadInt(); entity.Dodge = ms.ReadInt(); entity.Cri = ms.ReadInt(); entity.Res = ms.ReadInt(); entity.UsedPhyAttackIds = ms.ReadUTF8String(); entity.UsedSkillIds = ms.ReadUTF8String(); entity.RoleController = ms.ReadUTF8String(); entity.WeaponPointCount = ms.ReadInt(); entity.WeaponPoint1 = ms.ReadUTF8String(); entity.WeaponPoint2 = ms.ReadUTF8String(); entity.WeaponPoint3 = ms.ReadUTF8String(); entity.WeaponPoint4 = ms.ReadUTF8String(); entity.WingPoint = ms.ReadUTF8String(); entity.WingController = ms.ReadUTF8String(); entity.TrumpPoint = ms.ReadUTF8String(); m_List.Add(entity); m_Dic[entity.Id] = entity; } }