Пример #1
0
 public void enforceMissionLegality()
 {
     if (this.MissionType == GameLogic.MissionType.Adventure)
     {
         for (int i = 0; i < this.Instances.Count; i++)
         {
             MissionInstance mission = this.Instances[i];
             if (!string.IsNullOrEmpty(mission.MissionId) && !App.Binder.ConfigMeta.IsMissionIdActive(mission.MissionId))
             {
                 CmdStartMission.ExecuteStatic(this.Player, mission);
             }
         }
     }
 }
Пример #2
0
        protected void FixedUpdate()
        {
            Player player = GameLogic.Binder.GameState.Player;

            if (((player != null) && player.HasUnlockedMissions) && (Service.Binder.ContentService.MasterRemoteContent != null))
            {
                for (int i = 0; i < player.Missions.Instances.Count; i++)
                {
                    MissionInstance mission = player.Missions.Instances[i];
                    if (string.IsNullOrEmpty(mission.MissionId))
                    {
                        CmdStartMission.ExecuteStatic(player, mission);
                    }
                }
                for (int j = 0; j < player.Missions.Instances.Count; j++)
                {
                    MissionInstance instance2 = player.Missions.Instances[j];
                    if (instance2.OnCooldown && (instance2.getRemainingCooldownSeconds() <= 0L))
                    {
                        CmdStartMission.ExecuteStatic(player, instance2);
                    }
                }
                foreach (KeyValuePair <string, PromotionEventInstance> pair in player.PromotionEvents.Instances)
                {
                    PromotionEventInstance instance3 = pair.Value;
                    for (int k = 0; k < instance3.Missions.Instances.Count; k++)
                    {
                        MissionInstance instance4 = instance3.Missions.Instances[k];
                        if (instance4.OnCooldown && (instance4.getRemainingCooldownSeconds() <= 0L))
                        {
                            CmdStartMission.ExecuteStatic(player, instance4);
                        }
                    }
                }
            }
        }