// Token: 0x06004B97 RID: 19351 RVA: 0x001768B4 File Offset: 0x00174AB4 public override object SerializeToClient() { DSHeroAssistantNtf dsheroAssistantNtf = new DSHeroAssistantNtf(); dsheroAssistantNtf.Version = (uint)base.Version; if (this.HeroAssistants != null) { foreach (HeroAssistantsTaskAssignment heroAssistantsTaskAssignment in this.HeroAssistants.Assignments) { ProHeroAssistantTask proHeroAssistantTask = new ProHeroAssistantTask { ConfigId = heroAssistantsTaskAssignment.TaskId, StartTime = heroAssistantsTaskAssignment.StartTime.Ticks, EndTime = heroAssistantsTaskAssignment.EndTime.Ticks, Slot = heroAssistantsTaskAssignment.Slot }; foreach (int item in heroAssistantsTaskAssignment.AssignedHeroIds) { proHeroAssistantTask.AssignedHeroIds.Add(item); } dsheroAssistantNtf.Tasks.Add(proHeroAssistantTask); } } return(dsheroAssistantNtf); }
// Token: 0x060070AC RID: 28844 RVA: 0x001F70A0 File Offset: 0x001F52A0 public void DeSerialize(DSHeroAssistantNtf ntf) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_DeSerializeDSHeroAssistantNtf_hotfix != null) { this.m_DeSerializeDSHeroAssistantNtf_hotfix.call(new object[] { this, ntf }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; this.m_heroAssistantsDS.ClearInitedData(); this.m_heroAssistantsDS.InitVersion((ushort)ntf.Version, (ushort)ntf.Version); this.m_heroAssistantsDS.HeroAssistants.ConfigDataLoader = base.m_configDataLoader; this.m_heroAssistantsDS.UpdateInstantiatedData(ntf); }
// Token: 0x06004B98 RID: 19352 RVA: 0x001769D4 File Offset: 0x00174BD4 public void UpdateInstantiatedData(DSHeroAssistantNtf DS) { using (List <ProHeroAssistantTask> .Enumerator enumerator = DS.Tasks.GetEnumerator()) { while (enumerator.MoveNext()) { ProHeroAssistantTask AT = enumerator.Current; HeroAssistantsTask heroAssistantsTask = this.HeroAssistants.Tasks.Find((HeroAssistantsTask t) => t.ConfigId == AT.ConfigId); if (heroAssistantsTask != null) { HeroAssistantsTaskAssignment item = new HeroAssistantsTaskAssignment { Task = heroAssistantsTask, TaskId = heroAssistantsTask.ConfigId, EndTime = new DateTime(AT.EndTime), StartTime = new DateTime(AT.StartTime), Slot = AT.Slot, AssignedHeroIds = AT.AssignedHeroIds }; this.HeroAssistants.Assignments.Add(item); } } } }