Esempio n. 1
0
        public static async Task <bool> CheckCommonCoroutines()
        {
            if (ObjectCacheManager.ShouldUpdateObjectCollection)
            {
                ObjectCacheManager.UpdateCache();
            }

            if (StyxWoW.Me.IsDead || StyxWoW.Me.IsGhost)
            {
                await DeathBehavior.ExecuteCoroutine();

                return(true);
            }


            if (await CombatBehavior.ExecuteBehavior())
            {
                return(true);
            }

            if (await VendoringBehavior())
            {
                return(true);
            }

            if (await LootBehavior.ExecuteBehavior())
            {
                return(true);
            }



            return(false);
        }
Esempio n. 2
0
        private static bool ValidateCombatObject()
        {
            if (ObjectCacheManager.ShouldUpdateObjectCollection)
            {
                ObjectCacheManager.UpdateCache();
            }

            if (!TargetManager.ShouldKill)
            {
                ResetCombat();
                return(false);
            }

            if (TargetManager.CombatObject == null)
            {
                TargetManager.UpdateCombatTarget();
                if (TargetManager.CombatObject == null)
                {
                    ResetCombat();
                    return(false);
                }
            }

            if (!TargetManager.CombatObject.ValidForCombat)
            {
                GarrisonBase.Debug("EngageObject no longer valid for combat!");
                TargetManager.UpdateCombatTarget();


                //Clear and update lootable object
                TargetManager.LootableObject = null;
                LootBehavior.ResetLoot();
                TargetManager.UpdateLootableTarget();

                ResetCombat();
                return(false);
            }

            if (TargetManager.CombatObject.IsEvadeRunningBack)
            {
                GarrisonBase.Debug("EngageObject is evading!");
                TargetManager.CombatObject.IgnoredTimer = WaitTimer.TenSeconds;
                TargetManager.CombatObject.IgnoredTimer.Reset();
                return(false);
            }

            return(true);
        }
Esempio n. 3
0
 internal static void ResetCommonBehaviors()
 {
     ResetVendoring();
     LootBehavior.ResetLoot();
     CombatBehavior.ResetCombat();
 }