fBaseXtensions.Game.Hero.ActiveHero.CheckActiveBounty C# (CSharp) Method

CheckActiveBounty() private method

private CheckActiveBounty ( ) : void
return void
        private void CheckActiveBounty()
        {
            if (FunkyGame.AdventureMode)
            {
                FunkyGame.Game.ResetCombatModifiers();

                if (!FunkyGame.Bounty.IsInRiftWorld)
                {
                    //We could check that active bounty has been completed..
                    if (FunkyGame.Bounty.ActiveBounty != null && FunkyGame.Bounty.BountyQuestStates.ContainsKey(FunkyGame.Bounty.ActiveBounty.QuestSNO) && FunkyGame.Bounty.BountyQuestStates[FunkyGame.Bounty.ActiveBounty.QuestSNO] == QuestState.Completed)
                    {
                        Logger.Write(Helpers.LogLevel.Bounty, "ActiveBounty Quest State is Completed!");
                    }

                    if (FunkyGame.Bounty.CurrentBountyCacheEntry != null)
                    {
                        var CurrentBountyCacheEntry = FunkyGame.Bounty.CurrentBountyCacheEntry;
                        Logger.Write(Helpers.LogLevel.Bounty, "Checking Bounty Type {0}", CurrentBountyCacheEntry.Type);

                        int curLevelID = FunkyGame.Hero.iCurrentLevelID;

                        //Check if We should Modify the Bots Combat Behavior
                        switch (FunkyGame.Bounty.CurrentBountyCacheEntry.Type)
                        {
                            case BountyTypes.Clear:
                                if (CurrentBountyCacheEntry.EndingLevelAreaID == curLevelID)
                                {
                                    Logger.Write(Helpers.LogLevel.Bounty, "Bounty Level ID Match (Clear) -- Disabling Cluster Logic!");
                                    if (FunkyBaseExtension.Settings.AdventureMode.AllowCombatModifications)
                                    {
                                        SettingCluster.ClusterSettingsTag = SettingCluster.DisabledClustering;
                                        SettingLOSMovement.LOSSettingsTag.MiniumRangeObjects = 5;
                                        FunkyGame.Game.AllowAnyUnitForLOSMovement = true;
                                    }

                                }

                                break;
                            case BountyTypes.Kill:

                                if (CurrentBountyCacheEntry.StartingLevelAreaID == curLevelID || CurrentBountyCacheEntry.EndingLevelAreaID == curLevelID ||
                                    CurrentBountyCacheEntry.LevelAreaIDs != null && CurrentBountyCacheEntry.LevelAreaIDs.Any(i => i == curLevelID))
                                {
                                    Logger.Write(Helpers.LogLevel.Bounty, "Bounty Level ID Match (Kill) -- Disabling Cluster Logic and Enabling Navigation of Points!");
                                    if (FunkyBaseExtension.Settings.AdventureMode.AllowCombatModifications)
                                    {
                                        SettingCluster.ClusterSettingsTag = SettingCluster.DisabledClustering;
                                    }

                                    if (FunkyBaseExtension.Settings.AdventureMode.NavigatePointsOfInterest)
                                        FunkyGame.Game.ShouldNavigateMinimapPoints = CurrentBountyCacheEntry.EndingLevelAreaID == curLevelID;
                                }
                                break;
                            case BountyTypes.CursedEvent:
                                if (CurrentBountyCacheEntry.EndingLevelAreaID == curLevelID)
                                {
                                    Logger.Write(Helpers.LogLevel.Bounty, "Bounty Level ID Match (CursedEvent) -- Enabling Navigation of Points!");
                                    if (FunkyBaseExtension.Settings.AdventureMode.NavigatePointsOfInterest)
                                        FunkyGame.Game.ShouldNavigateMinimapPoints = true;

                                    FunkyGame.Game.QuestMode = true;
                                }
                                break;
                            case BountyTypes.Boss:
                                if (CurrentBountyCacheEntry.StartingLevelAreaID == curLevelID)
                                {
                                    Logger.Write(Helpers.LogLevel.Bounty, "Bounty Level ID Match (Boss) -- Enabling Navigation of Points!");
                                    if (FunkyBaseExtension.Settings.AdventureMode.NavigatePointsOfInterest)
                                        FunkyGame.Game.ShouldNavigateMinimapPoints = true;
                                }
                                break;
                            case BountyTypes.Event:
                                if (CurrentBountyCacheEntry.EndingLevelAreaID == curLevelID)
                                {
                                    Logger.Write(Helpers.LogLevel.Bounty, "Bounty Level ID Match (Event) -- Enabling Navigation of Points!");
                                    if (FunkyBaseExtension.Settings.AdventureMode.NavigatePointsOfInterest)
                                        FunkyGame.Game.ShouldNavigateMinimapPoints = true;
                                    FunkyGame.Game.QuestMode = true;
                                }
                                break;
                        }
                    }
                }
                else if (FunkyGame.Bounty.ActiveBounty != null)
                {
                    int curStep = ((BountyCache.QuestInfoCache)FunkyGame.Bounty.ActiveBounty).Step;

                    //Killing..
                    if (curStep == 1 || curStep == 13)
                    {
                        if (curStep == 13) MonitorSettings.MonitorSettingsTag.GoldInactivityTimeoutSeconds = 0;

                        if (FunkyBaseExtension.Settings.AdventureMode.NavigatePointsOfInterest)
                        {
                            FunkyGame.Bounty.RefreshRiftMapMarkers();
                            FunkyGame.Game.ShouldNavigateMinimapPoints = true;
                        }

                        if (FunkyBaseExtension.Settings.AdventureMode.AllowCombatModifications)
                            SettingCluster.ClusterSettingsTag = SettingCluster.DisabledClustering;
                    }
                    else if (curStep == 3 || curStep==16)//Boss Spawned
                    {
                        if (curStep == 16) MonitorSettings.MonitorSettingsTag.GoldInactivityTimeoutSeconds = 0;

                        if (FunkyBaseExtension.Settings.AdventureMode.NavigatePointsOfInterest)
                        {
                            FunkyGame.Bounty.RefreshRiftMapMarkers();
                            FunkyGame.Game.ShouldNavigateMinimapPoints = false;
                        }

                        if (FunkyBaseExtension.Settings.AdventureMode.AllowCombatModifications)
                            SettingCluster.ClusterSettingsTag = FunkyBaseExtension.Settings.Cluster;

                    }
                    else//Boss Killed 10 / 34
                    {
                        if (curStep == 10 || curStep == 34) MonitorSettings.MonitorSettingsTag.GoldInactivityTimeoutSeconds = 0;

                        //SettingCluster.ClusterSettingsTag = FunkyBaseExtension.Settings.Cluster;
                        //FunkyGame.Game.ShouldNavigateMinimapPoints = false;
                    }
                }
            }
        }