Example #1
0
        private static bool GetMinionMembers(MinionOwnership.MinionGroup minionGroup, out MinionOwnership[] members)
        {
            members = null;

            if (minionGroup != null)
            {
                members = minionGroup.GetFieldValue <MinionOwnership[]>("members");
            }
            else
            {
                Debug.LogError("Miniongroup did not exist");
            }
            return(members != null);
        }
Example #2
0
 private void CheckMinions(MinionOwnership minion)
 {
     if (base.isUserAlive && base.meetsBodyRequirement)
     {
         if (minion != null)
         {
             MinionOwnership.MinionGroup group = minion.group;
             if (group != null)
             {
                 CharacterMaster playerMaster = base.localUser.cachedMasterController.master;
                 if (playerMaster != null)
                 {
                     if (group.ownerId == playerMaster.netId)
                     {
                         MinionOwnership[] minionArray = group.members;
                         if (minionArray != null)
                         {
                             int validDrones = 0;
                             foreach (MinionOwnership tempMinion in minionArray)
                             {
                                 if (tempMinion != null)
                                 {
                                     List <string> nameList = new List <string>();
                                     foreach (string tempName in validDroneNames)
                                     {
                                         nameList.Add(tempName + "Master(Clone)");
                                     }
                                     string droneName = tempMinion.name;
                                     if (nameList.Contains(droneName))
                                     {
                                         validDrones += 1;
                                     }
                                 }
                             }
                             if (validDrones >= 8)
                             {
                                 base.Grant();
                             }
                         }
                     }
                 }
             }
         }
     }
 }
        // Token: 0x0600292F RID: 10543 RVA: 0x000AD948 File Offset: 0x000ABB48
        private void OnMinionGroupChangedGlobal(MinionOwnership minion)
        {
            int num = EngiArmyAchievement.requirement;

            MinionOwnership.MinionGroup group = minion.group;
            if (num <= ((group != null) ? group.memberCount : 0))
            {
                CharacterMaster master = base.localUser.cachedMasterController.master;
                if (!master)
                {
                    return;
                }
                NetworkInstanceId netId = master.netId;
                if (minion.group.ownerId == netId)
                {
                    base.Grant();
                }
            }
        }