Example #1
0
        // Token: 0x0600374C RID: 14156 RVA: 0x000F81C8 File Offset: 0x000F63C8
        private BehaviorGroup CreateGroup(int id)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CreateGroupInt32_hotfix != null)
            {
                return((BehaviorGroup)this.m_CreateGroupInt32_hotfix.call(new object[]
                {
                    this,
                    id
                }));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            BehaviorGroup behaviorGroup = this.GetGroup(id);

            if (behaviorGroup != null)
            {
                if (this.Battle.IsEnableDebugLog())
                {
                    DebugUtility.LogError(string.Format("group {0} already exist.", id));
                }
                return(behaviorGroup);
            }
            behaviorGroup = new BehaviorGroup(id, this);
            this.m_groups.Add(behaviorGroup);
            return(behaviorGroup);
        }
Example #2
0
 // 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
             }));
         }
     }
 }
Example #3
0
 // 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);
         }
     }
 }
Example #4
0
 // Token: 0x06003773 RID: 14195 RVA: 0x000F9590 File Offset: 0x000F7790
 public LuaExportHelper(BehaviorGroup owner)
 {
     this.m_owner = owner;
 }