// Token: 0x06000E62 RID: 3682 RVA: 0x00040064 File Offset: 0x0003E264 private void RemoveMemberAt(int i) { MinionOwnership minionOwnership = this.members[i]; HGArrayUtilities.ArrayRemoveAt <MinionOwnership>(ref this.members, ref this._memberCount, i, 1); minionOwnership.HandleOwnerDiscovery(null); minionOwnership.HandleGroupDiscovery(null); }
// Token: 0x06000E60 RID: 3680 RVA: 0x0003FFF4 File Offset: 0x0003E1F4 public void AddMember(MinionOwnership minion) { HGArrayUtilities.ArrayAppend <MinionOwnership>(ref this.members, ref this._memberCount, ref minion); this.refCount++; minion.HandleGroupDiscovery(this); if (this.resolvedOwnerMaster) { minion.HandleOwnerDiscovery(this.resolvedOwnerMaster); } }
// Token: 0x06000E58 RID: 3672 RVA: 0x0003FDA4 File Offset: 0x0003DFA4 public static void SetMinionOwner(MinionOwnership minion, NetworkInstanceId ownerId) { if (minion.group != null) { if (minion.group.ownerId == ownerId) { return; } MinionOwnership.MinionGroup.RemoveMinion(minion.group.ownerId, minion); } if (ownerId != NetworkInstanceId.Invalid) { MinionOwnership.MinionGroup.AddMinion(ownerId, minion); } }
// 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(); }
// 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(); } }
// Token: 0x06000E61 RID: 3681 RVA: 0x00040042 File Offset: 0x0003E242 public void RemoveMember(MinionOwnership minion) { this.RemoveMemberAt(Array.IndexOf <MinionOwnership>(this.members, minion)); this.refCount--; }