// Token: 0x06000003 RID: 3 RVA: 0x000020A4 File Offset: 0x000002A4
        protected override void OnGameStart(Game game, IGameStarter gameStarterObject)
        {
            base.OnGameStart(game, gameStarterObject);
            bool flag = !(game.GameType is Campaign);

            if (!flag)
            {
                try
                {
                    CampaignGameStarter initializer = (CampaignGameStarter)gameStarterObject;
                    bool flag2 = initializer != null;
                    if (flag2)
                    {
                        bool kaosesSpeedModifiersEnabled = ModSettings.Instance.kaosesSpeedModifiersEnabled;
                        if (kaosesSpeedModifiersEnabled)
                        {
                            initializer.AddModel(new KaosPartySpeed());
                        }
                        bool bLogPartySpawns = ModSettings.Instance.bLogPartySpawns;
                        if (bLogPartySpawns)
                        {
                            initializer.AddBehavior(new KaosesPartiesBehaviour());
                        }
                        initializer.AddModel(new KaosesBanditDensityModel());
                    }
                }
                catch (Exception e)
                {
                    Ux.ShowMessageError("Kaoses Parties Exception  : " + e.ToString());
                }
            }
        }
 // Token: 0x0600013B RID: 315 RVA: 0x00004808 File Offset: 0x00002A08
 public override void RegisterEvents()
 {
     try
     {
         CampaignEvents.DailyTickEvent.AddNonSerializedListener(this, new Action(this.OnDailyTick));
     }
     catch (Exception e)
     {
         Ux.ShowMessageError("Kaoses Parties Exception in Register Events : " + e.ToString());
     }
 }
 // Token: 0x06000002 RID: 2 RVA: 0x00002058 File Offset: 0x00000258
 protected override void OnSubModuleLoad()
 {
     base.OnSubModuleLoad();
     try
     {
         Loader.LoadConfig();
     }
     catch (Exception e)
     {
         Ux.ShowMessageError("Kaoses Parties Exception  : " + e.ToString());
     }
 }
        public void processParties(float minMultiplier, float maxMultiplier)
        {
            bool flag = this._partyTemplate != null;

            if (flag)
            {
                for (int i = 0; i < this._partyTemplate.Stacks.Count; i++)
                {
                    this._partyTemplate.Stacks[i] = this.processStacks(this._partyTemplate.Stacks[i], minMultiplier, maxMultiplier);
                }
            }
            else
            {
                Ux.ShowMessageError("Kaoses Parties processParties invalid Party template");
            }
        }
        public void processBanditBoss(float minMultiplier, float maxMultiplier)
        {
            bool flag = this._partyTemplate != null;

            if (flag)
            {
                for (int i = 0; i < this._partyTemplate.Stacks.Count; i++)
                {
                    PartyTemplateStack item = this._partyTemplate.Stacks[i];
                    bool flag2 = !item.Character.StringId.Contains("boss");
                    if (flag2)
                    {
                        this._partyTemplate.Stacks[i] = this.processStacks(this._partyTemplate.Stacks[i], minMultiplier, maxMultiplier);
                    }
                }
            }
            else
            {
                Ux.ShowMessageError("Kaoses Parties processBanditBoss invalid Party template");
            }
        }
        // Token: 0x0600013D RID: 317 RVA: 0x00004860 File Offset: 0x00002A60
        private void OnDailyTick()
        {
            try
            {
                bool flag = MBObjectManager.Instance.GetObjectTypeList <Clan>() != null;
                if (flag)
                {
                    bool bLogPartySpawns = ModSettings.Instance.bLogPartySpawns;
                    if (bLogPartySpawns)
                    {
                        Logging.lm("-------------------------------------------");
                        Logging.lm(" Logging Party Spawns to File");
                        Logging.lm("ToDays : " + CampaignTime.Now.ToDays.ToString());
                        Logging.lm("Now : " + CampaignTime.Now.ToString());
                        Logging.lm("NumberOfMaximumLooterParties :  " + Campaign.Current.Models.BanditDensityModel.NumberOfMaximumLooterParties.ToString());
                        Logging.lm("NumberOfMinimumBanditPartiesInAHideoutToInfestIt :  " + Campaign.Current.Models.BanditDensityModel.NumberOfMinimumBanditPartiesInAHideoutToInfestIt.ToString());
                        Logging.lm("NumberOfMaximumBanditPartiesInEachHideout :  " + Campaign.Current.Models.BanditDensityModel.NumberOfMaximumBanditPartiesInEachHideout.ToString());
                        Logging.lm("NumberOfMaximumBanditPartiesAroundEachHideout :  " + Campaign.Current.Models.BanditDensityModel.NumberOfMaximumBanditPartiesAroundEachHideout.ToString());
                        Logging.lm("NumberOfMaximumHideoutsAtEachBanditFaction :  " + Campaign.Current.Models.BanditDensityModel.NumberOfMaximumHideoutsAtEachBanditFaction.ToString());
                        Logging.lm("NumberOfInitialHideoutsAtEachBanditFaction :  " + Campaign.Current.Models.BanditDensityModel.NumberOfInitialHideoutsAtEachBanditFaction.ToString());
                        MBReadOnlyList <Clan> clanList = MBObjectManager.Instance.GetObjectTypeList <Clan>();
                        foreach (Clan clan in clanList)
                        {
                            bool flag2 = clan.Culture != null;
                            if (flag2)
                            {
                                Logging.lm("------");
                                bool flag3 = this.clanPartyCount.ContainsKey(clan.StringId);
                                if (flag3)
                                {
                                    int oldNumber = this.clanPartyCount[clan.StringId];
                                    Logging.lm(string.Concat(new string[]
                                    {
                                        "Clan Name: ",
                                        clan.Name.ToString(),
                                        "  StringId: ",
                                        clan.StringId.ToString(),
                                        "Culture Name: ",
                                        clan.Culture.Name.ToString(),
                                        "    Parties Count: ",
//										clan.Parties.Count<MobileParty>().ToString(),
                                        clan.AllParties.Count <MobileParty>().ToString(),
                                        "  Last Count: ",
                                        oldNumber.ToString()
                                    }));
                                    this.clanPartyCount[clan.StringId] = clan.AllParties.Count <MobileParty>();
                                }
                                else
                                {
                                    Logging.lm(string.Concat(new string[]
                                    {
                                        "Clan Name: ",
                                        clan.Name.ToString(),
                                        "  StringId: ",
                                        clan.StringId.ToString(),
                                        "Culture Name: ",
                                        clan.Culture.Name.ToString(),
                                        "    Parties Count: ",
                                        clan.AllParties.Count <MobileParty>().ToString()
                                    }));
                                    this.clanPartyCount.Add(clan.StringId, clan.AllParties.Count <MobileParty>());
                                }
                                Logging.lm("");
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Ux.ShowMessageError("Kaoses Parties Exception in OnDailyTick Events : " + e.ToString());
            }
        }