// Token: 0x0600374E RID: 14158 RVA: 0x000F8340 File Offset: 0x000F6540 public void UpdateGroups() { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_UpdateGroups_hotfix != null) { this.m_UpdateGroups_hotfix.call(new object[] { this }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; foreach (BattleActor battleActor in this.m_actors) { if (battleActor.Group == null) { BehaviorGroup behaviorGroup = this.GetGroup(battleActor.GroupId); if (behaviorGroup == null) { behaviorGroup = this.CreateGroup(battleActor.GroupId); if (behaviorGroup == null) { if (this.Battle.IsEnableDebugLog()) { DebugUtility.LogError(string.Format("Failed to creat group: {0}.", battleActor.GroupId)); } return; } } behaviorGroup.AddActor(battleActor); } } this.m_groups.Sort((BehaviorGroup a, BehaviorGroup b) => a.ID - b.ID); foreach (BehaviorGroup behaviorGroup2 in this.m_groups) { int bahvior; if (this.m_groupBehaviorDict != null && this.m_groupBehaviorDict.TryGetValue(behaviorGroup2.ID, out bahvior)) { behaviorGroup2.SetBahvior(bahvior); } } foreach (BehaviorGroup behaviorGroup3 in this.m_groups) { if (this.Battle.IsEnableDebugLog()) { DebugUtility.Log(string.Format("!@# UpdateGroups() Team {0} Group {1} Behavior {2} Members count {3}", new object[] { this.TeamNumber, behaviorGroup3.ID, (behaviorGroup3.Behavior != null) ? behaviorGroup3.Behavior.ID : -1, behaviorGroup3.Actors.Count })); } } }
// Token: 0x0600374A RID: 14154 RVA: 0x000F7F38 File Offset: 0x000F6138 public void CreateGroups() { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CreateGroups_hotfix != null) { this.m_CreateGroups_hotfix.call(new object[] { this }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; this.m_groups.Clear(); foreach (BattleActor battleActor in this.m_actors) { BehaviorGroup behaviorGroup = this.GetGroup(battleActor.GroupId); if (behaviorGroup == null) { behaviorGroup = this.CreateGroup(battleActor.GroupId); if (behaviorGroup == null) { if (this.Battle.IsEnableDebugLog()) { DebugUtility.LogError(string.Format("Failed to creat group: {0}.", battleActor.GroupId)); } return; } } behaviorGroup.AddActor(battleActor); } this.m_groups.Sort((BehaviorGroup a, BehaviorGroup b) => a.ID - b.ID); foreach (BehaviorGroup behaviorGroup2 in this.m_groups) { int bahvior; if (this.m_groupBehaviorDict != null && this.m_groupBehaviorDict.TryGetValue(behaviorGroup2.ID, out bahvior)) { behaviorGroup2.SetBahvior(bahvior); } } }