Exemple #1
0
        // Token: 0x06000E45 RID: 3653 RVA: 0x0003FA00 File Offset: 0x0003DC00
        private void HandleGroupDiscovery(MinionOwnership.MinionGroup newGroup)
        {
            this.group = newGroup;
            Action <MinionOwnership> action = MinionOwnership.onMinionGroupChangedGlobal;

            if (action == null)
            {
                return;
            }
            action(this);
        }
Exemple #2
0
            private static void CCMinionPrint(ConCommandArgs args)
            {
                StringBuilder stringBuilder = new StringBuilder();

                for (int i = 0; i < MinionOwnership.MinionGroup.instancesList.Count; i++)
                {
                    MinionOwnership.MinionGroup minionGroup = MinionOwnership.MinionGroup.instancesList[i];
                    stringBuilder.Append("group [").Append(i).Append("] size=").Append(minionGroup._memberCount).Append(" id=").Append(minionGroup.ownerId).Append(" resolvedOwnerGameObject=").Append(minionGroup.resolvedOwnerGameObject).AppendLine();
                    for (int j = 0; j < minionGroup._memberCount; j++)
                    {
                        stringBuilder.Append("  ").Append("[").Append(j).Append("] member.name=").Append(minionGroup.members[j].name).AppendLine();
                    }
                }
                Debug.Log(stringBuilder.ToString());
            }
Exemple #3
0
 // Token: 0x06000E59 RID: 3673 RVA: 0x0003FDF4 File Offset: 0x0003DFF4
 private static void AddMinion(NetworkInstanceId ownerId, MinionOwnership minion)
 {
     MinionOwnership.MinionGroup minionGroup = null;
     for (int i = 0; i < MinionOwnership.MinionGroup.instancesList.Count; i++)
     {
         MinionOwnership.MinionGroup minionGroup2 = MinionOwnership.MinionGroup.instancesList[i];
         if (MinionOwnership.MinionGroup.instancesList[i].ownerId == ownerId)
         {
             minionGroup = minionGroup2;
             break;
         }
     }
     if (minionGroup == null)
     {
         minionGroup = new MinionOwnership.MinionGroup(ownerId);
     }
     minionGroup.AddMember(minion);
     minionGroup.AttemptToResolveOwner();
 }
Exemple #4
0
 // Token: 0x06000E5A RID: 3674 RVA: 0x0003FE58 File Offset: 0x0003E058
 private static void RemoveMinion(NetworkInstanceId ownerId, MinionOwnership minion)
 {
     MinionOwnership.MinionGroup minionGroup = null;
     for (int i = 0; i < MinionOwnership.MinionGroup.instancesList.Count; i++)
     {
         MinionOwnership.MinionGroup minionGroup2 = MinionOwnership.MinionGroup.instancesList[i];
         if (MinionOwnership.MinionGroup.instancesList[i].ownerId == ownerId)
         {
             minionGroup = minionGroup2;
             break;
         }
     }
     if (minionGroup == null)
     {
         throw new InvalidOperationException(string.Format("{0}.{1} Could not find group to which {2} belongs", "MinionGroup", "RemoveMinion", minion));
     }
     minionGroup.RemoveMember(minion);
     if (minionGroup.refCount == 0 && !minionGroup.resolvedOwnerGameObject)
     {
         minionGroup.Dispose();
     }
 }