Пример #1
0
        public static Composite CreateShadowInitialize()
        {
            if (SpellManager.HasSpell("Shadow Mend"))
            {
                Logger.Write(LogColor.Init, "Shadow Mend: if all enemies cc'd and health below {0}%", PriestSettings.ShadowHeal);
            }

            if (SpellManager.HasSpell("Psychic Scream"))
            {
                if (!PriestSettings.PsychicScreamAllow)
                {
                    Logger.Write(LogColor.Init, "Psychic Scream: disabled by user setting");
                }
                else
                {
                    Logger.Write(LogColor.Init, "Psychic Scream: cast when health falls below {0}%", PriestSettings.PsychicScreamHealth);
                    if (TalentManager.HasGlyph("Psychic Scream"))
                    {
                        Logger.Write(LogColor.Init, "Psychic Scream: cast when 2 or more mobs attacking (glyphed)");
                    }
                    else
                    {
                        Logger.Write(LogColor.Init, "Psychic Scream: cast when {0} or more mobs attacking", PriestSettings.PsychicScreamAddCount);
                    }
                }
            }

            return(null);
        }
Пример #2
0
        public override void Initialize()
        {
            if (!Styx.StyxWoW.IsInGame)
            {
                return;
            }
            if (Me.Class != WoWClass.Rogue)
            {
                return;
            }

            // Temp Looting Fix
            BotEvents.Player.OnMobKilled += e =>
            {
                WoWMovement.MoveStop();
                StyxWoW.SleepForLagDuration();
            };

            // Temp Skinning Fix
            BotEvents.Player.OnMobLooted += e =>
            {
                WoWMovement.MoveStop();
                StyxWoW.SleepForLagDuration();
            };

            slog("Indexing Talent Trees");
            Talents = new TalentManager();
            slog("Calculating Talent Trees");
            TalentSpec = Talents.GetSpec();
            slog("Determined " + TalentSpec + " as your spec.");
            _specRefresh.Reset();
            slog("v" + wRogueVersion + " By wired420 Loaded");
            slog("Checking for Updates");
            Update();
        }
Пример #3
0
 internal Game()
 {
     ClientManager            = new GameClientManager();
     BanManager               = new ModerationBanManager();
     RoleManager              = new RoleManager();
     Catalog                  = new Catalog();
     CatalogPremium           = new CatalogPremium();
     Navigator                = new Navigator();
     NewNavigatorManager      = new NewNavigatorManager();
     ItemManager              = new ItemManager();
     RoomManager              = new RoomManager();
     GroupManager             = new GroupManager();
     newsManager              = new NewsManager();
     ModerationTool           = new ModerationTool();
     questManager             = new QuestManager();
     youtubeManager           = new YoutubeManager();
     piñataManager            = new PiñataHandler();
     roomRankConfig           = new RoomRankConfig();
     AchievementManager       = new AchievementManager();
     talentManager            = new TalentManager();
     AlfaManager              = new AlfaManager();
     MuteManager              = new MuteManager();
     PromotionalBadgesManager = new PromotionalBadges();
     TargetedOfferManager     = new TargetedOfferManager();
     RoomQueueManager         = new RoomQueueManager();
     CraftableProductsManager = new CraftableProductsManager();
     ClothingManager          = new ClothingManager();
     UserLookManager          = new UserLook();
     PrisaoManager            = new PrisaoManager();
     LandingTopUsersManager   = new LandingTopUsers();
     corManager               = new CorManager();
     giftManager              = new GiftModeloManager();
 }
Пример #4
0
 /// <summary>
 /// Switch to Apect of the fox while moving then back to aspect of the hawk (or Iron Hawk)
 /// </summary>
 public static Composite HandleAspectSwitching(int time)
 {
     return(new PrioritySelector(
                new Decorator(ret => CLUSettings.Instance.Hunter.HandleAspectSwitching,
                              Buff.CastBuff("Aspect of the Hawk", !TalentManager.HasTalent(8) ? "Aspect of the Hawk" : "Aspect of the Iron Hawk", ret => TalentManager.HasTalent(8), "Aspect of the Iron Hawk")
                              )));
 }
Пример #5
0
        private static Composite CreateAoe()
        {
            return(new PrioritySelector(
//        actions.aoe
//F	0.00	unholy_blight,if=talent.unholy_blight.enabled
                       new Throttle(1, 2,
                                    new PrioritySelector(
                                        Spell.Cast("Unholy Blight",
                                                   ret => TalentManager.IsSelected((int)DeathKnightTalents.UnholyBlight) &&
                                                   Me.CurrentTarget.DistanceSqr <= 10 * 10 &&
                                                   !StyxWoW.Me.HasAura("Unholy Blight")))),
//G	14.11	pestilence,if=dot.blood_plague.ticking&talent.plague_leech.enabled,line_cd=28
                       new Throttle(1, 2,
                                    new PrioritySelector(
                                        Spell.Cast("Blood Boil",
                                                   ret => TalentManager.IsSelected((int)DeathKnightTalents.RoillingBlood) &&
                                                   !Me.HasAura("Unholy Blight") &&
                                                   ShouldSpreadDiseases))),
                       new Throttle(1, 2,
                                    new PrioritySelector(
                                        Spell.Cast("Pestilence",
                                                   ret => !TalentManager.IsSelected((int)DeathKnightTalents.RoillingBlood) &&
                                                   !Me.HasAura("Unholy Blight") &&
                                                   ShouldSpreadDiseases))),
//H	0.00	pestilence,if=dot.blood_plague.ticking&talent.unholy_blight.enabled&cooldown.unholy_blight.remains<49,line_cd=28

                       Spell.Cast("Soul Reaper", ret =>
                                  Me.CurrentTarget.HealthPercent <= 35 || Me.HasAura(138347) && Me.CurrentTarget.HealthPercent <= 45),
//I	174.96	howling_blast
                       Spell.Cast("Howling Blast"),
//J	0.00	blood_tap,if=talent.blood_tap.enabled&buff.blood_charge.stack>10
                       Spell.Cast("Blood Tap", ret =>
                                  Me.HasAura("Blood Charge", 10) &&
                                  (BloodRuneSlotsActive == 0 || FrostRuneSlotsActive == 0 || UnholyRuneSlotsActive == 0)),
//K	22.21	frost_strike,if=runic_power>76
                       Spell.Cast("Frost Strike", ret =>
                                  Me.RunicPowerPercent >= 76),
//L	14.13	death_and_decay,if=unholy=1
                       Spell.CastOnGround("Death and Decay", on => Me.CurrentTarget.Location, ret => Me.UnholyRuneCount == 1),
//M	34.90	plague_strike,if=unholy=2
                       Spell.Cast("Plague Strike", ret => Me.UnholyRuneCount == 2),
//N	0.00	blood_tap,if=talent.blood_tap.enabled
                       Spell.Cast("Blood Tap", ret =>
                                  Me.HasAura("Blood Charge", 5) &&
                                  (BloodRuneSlotsActive == 0 || FrostRuneSlotsActive == 0 || UnholyRuneSlotsActive == 0)),
//O	139.66	frost_strike
                       Spell.Cast("Frost Strike"),
//P	11.37	horn_of_winter
                       Spell.Cast("Horn of Winter"),
//Q	7.92	plague_leech,if=talent.plague_leech.enabled&unholy=1
                       Spell.Cast("Plague Leech", ret =>
                                  Me.CurrentTarget.HasAura("Frost Fever") && Me.CurrentTarget.HasAura("Blood Plague") &&
                                  Me.UnholyRuneCount == 1),
//R	9.05	plague_strike,if=unholy=1
                       Spell.Cast("Plague Strike", ret => Me.UnholyRuneCount == 1),
//S	1.17	empower_rune_weapon
                       Spell.Cast("Empower Rune Weapon", ret =>
                                  AdvancedAI.Burst && Me.UnholyRuneCount == 0 && Me.DeathRuneCount == 0 && Me.FrostRuneCount == 0)
                       ));
        }
Пример #6
0
        public static Composite CreateFireMageNormalCombat()
        {
            return(new PrioritySelector(
                       Safers.EnsureTarget(),
                       Common.CreateStayAwayFromFrozenTargetsBehavior(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       Helpers.Common.CreateAutoAttack(true),
                       Spell.WaitForCast(true),

                       // Defensive stuff
                       new Decorator(
                           ret => StyxWoW.Me.ActiveAuras.ContainsKey("Ice Block"),
                           new ActionIdle()),
                       Spell.BuffSelf("Ice Block", ret => StyxWoW.Me.HealthPercent < 20 && !StyxWoW.Me.ActiveAuras.ContainsKey("Hypothermia")),

                       // Cooldowns
                       Spell.BuffSelf("Evocation",
                                      ret => StyxWoW.Me.ManaPercent < 30 || (TalentManager.HasGlyph("Evocation") && StyxWoW.Me.HealthPercent < 50)),
                       Spell.BuffSelf("Mage Ward", ret => StyxWoW.Me.HealthPercent <= 80),
                       Spell.BuffSelf("Mana Shield", ret => StyxWoW.Me.HealthPercent <= 60),

                       new Decorator(
                           ret => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet) >= 3,
                           new PrioritySelector(
                               Spell.BuffSelf("Mirror Image")
                               )),
                       Common.CreateUseManaGemBehavior(ret => StyxWoW.Me.ManaPercent < 80),

                       // Rotation
                       Spell.Cast("Dragon's Breath",
                                  ret => StyxWoW.Me.IsSafelyFacing(StyxWoW.Me.CurrentTarget, 90) &&
                                  StyxWoW.Me.CurrentTarget.DistanceSqr <= 8 * 8),

                       Spell.Cast("Fire Blast",
                                  ret => StyxWoW.Me.ActiveAuras.ContainsKey("Impact")),

                       new Decorator(
                           ret => !Unit.NearbyUnfriendlyUnits.Any(u => u.DistanceSqr < 10 * 10 && u.IsCrowdControlled()),
                           new PrioritySelector(
                               Spell.BuffSelf("Frost Nova",
                                              ret => Unit.NearbyUnfriendlyUnits.Any(u =>
                                                                                    u.DistanceSqr <= 8 * 8 && !u.HasAura("Freeze") &&
                                                                                    !u.HasAura("Frost Nova") && !u.Stunned))
                               )),

                       Common.CreateMagePolymorphOnAddBehavior(),
                       // Rotation
                       Spell.Cast("Combustion",
                                  ret => (StyxWoW.Me.CurrentTarget.HasMyAura("Living Bomb") || !SpellManager.HasSpell("Living Bomb")) &&
                                  (StyxWoW.Me.CurrentTarget.HasMyAura("Ignite") || TalentManager.GetCount(2, 4) == 0) &&
                                  StyxWoW.Me.CurrentTarget.HasMyAura("Pyroblast!")),
                       Spell.Cast("Scorch", ret => StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Critical Mass", true).TotalSeconds < 1 && TalentManager.GetCount(2, 20) != 0),
                       Spell.Cast("Pyroblast", ret => StyxWoW.Me.ActiveAuras.ContainsKey("Hot Streak")),
                       Spell.BuffSelf("Flame Orb"),
                       Spell.Buff("Living Bomb", true),
                       Spell.Cast("Fireball"),
                       Movement.CreateMoveToTargetBehavior(true, 35f)
                       ));
        }
Пример #7
0
 private static Composite AOE()
 {
     return(new PrioritySelector(
                new Decorator(ret => Unit.UnfriendlyUnits(10).Count() > 5 && TalentManager.HasGlyph("Thunderstorm"),
                              Spell.Cast("Thunderstorm")),
                Spell.Cast("Chain Lightning")));
 }
Пример #8
0
        public static Composite ElementalCombat()
        {
            return(new PrioritySelector(
                       Common.CreateInterruptBehavior(),
                       new Decorator(ret => AdvancedAI.Burst && Me.CurrentTarget.IsBoss(),
                                     new PrioritySelector(
                                         Spell.Cast("Elemental Mastery"),
                                         Spell.Cast("Ascendance", ret => Me.CurrentTarget.CachedGetAuraTimeLeft("Flame Shock") > 18 && Me.CachedHasAura("Elemental Mastery")),
                                         Spell.Cast("Fire Elemental Totem", ret => Me.CurrentTarget.TimeToDeath() > (TalentManager.HasGlyph("Fire Elemental Totem") ? 30 : 60)),
                                         Spell.Cast("Earth Elemental Totem", ret => Me.CurrentTarget.TimeToDeath() > 60 && Spell.GetSpellCooldown("Fire Elemental Totem").TotalSeconds > 61),
                                         Spell.Cast("Stormlash Totem", ret => PartyBuff.WeHaveBloodlust))),

                       Spell.WaitForCast(),
                       Spell.Cast("Thunderstorm", ret => Me.ManaPercent < 60 && TalentManager.HasGlyph("Thunderstorm")),

                       new Decorator(ret => Unit.UnfriendlyUnitsNearTargetFacing(10).Count() >= 4,
                                     AOE()),

                       Spell.Cast("Spiritwalker's Grace", ret => Me.IsMoving && !SpellManager.Spells["Lava Burst"].Cooldown),
                       Spell.Cast("Flame Shock", on => FlameShockTar, ret => FlameShockTar.CachedHasAuraDown("Flame Shock", 1, true, 3)),
                       Spell.Cast("Lava Burst"),
                       Spell.Cast("Elemental Blast"),
                       Spell.Cast("Earth Shock", ret => Me.CachedHasAura("Lightning Shield", Unit.UnfriendlyUnitsNearTargetFacing(10).Count() > 2 ? 7 : 6)),
                       Spell.Cast("Searing Totem", ret => !Totems.ExistInRange(Me.CurrentTarget.Location, WoWTotem.Searing)),
                       Spell.Cast(Unit.UnfriendlyUnitsNearTargetFacing(10).Count() > 1 ? "Chain Lightning" : "Lightning Bolt")));
        }
Пример #9
0
        public override void Initialize()
        {
            RegisterHotkeys();
            LuaCore.PopulateSecondryStats();
            TalentManager.Init();
            TalentManager.Update();
            UpdateContext();
            // Do this now, so we ensure we update our context when needed.
            BotEvents.Player.OnMapChanged += e => UpdateContext();

            OnWoWContextChanged += (orig, ne) =>
            {
                Logging.Write("Context changed, re-creating behaviors");
                AssignBehaviors();
                Spell.GcdInitialize();
                Lists.BossList.Init();
            };
            Spell.GcdInitialize();
            Dispelling.Init();
            //testing cached units
            //CachedUnits.Initialize();
            EventHandlers.Init();
            Lists.BossList.Init();
            Instance.AssignBehaviors();
            Logging.Write("Initialization Completed");
        }
Пример #10
0
        public static Composite CreateFireMageInstancePullAndCombat()
        {
            return(new PrioritySelector(
                       Safers.EnsureTarget(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       Helpers.Common.CreateAutoAttack(true),
                       Spell.WaitForCast(true),

                       // Defensive stuff
                       new Decorator(
                           ret => StyxWoW.Me.ActiveAuras.ContainsKey("Ice Block"),
                           new ActionIdle()),
                       Spell.BuffSelf("Ice Block", ret => StyxWoW.Me.HealthPercent < 20 && !StyxWoW.Me.ActiveAuras.ContainsKey("Hypothermia")),

                       // Cooldowns
                       Spell.BuffSelf("Evocation", ret => StyxWoW.Me.ManaPercent < 30),
                       Spell.BuffSelf("Mirror Image"),
                       Spell.BuffSelf("Mage Ward", ret => StyxWoW.Me.HealthPercent <= 75),

                       Common.CreateUseManaGemBehavior(ret => StyxWoW.Me.ManaPercent < 80),
                       // AoE comes first
                       new Decorator(
                           ret => Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 3,
                           new PrioritySelector(
                               Spell.Cast("Fire Blast",
                                          ret => StyxWoW.Me.ActiveAuras.ContainsKey("Impact") &&
                                          (StyxWoW.Me.CurrentTarget.HasMyAura("Combustion") || TalentManager.GetCount(2, 13) == 0)),
                               Spell.CastOnGround("Blast Wave",
                                                  ret => Clusters.GetBestUnitForCluster(Unit.NearbyUnfriendlyUnits, ClusterType.Radius, 8f).Location),
                               Spell.Cast("Dragon's Breath",
                                          ret => Clusters.GetClusterCount(StyxWoW.Me.CurrentTarget,
                                                                          Unit.NearbyUnfriendlyUnits,
                                                                          ClusterType.Cone, 15f) >= 3),
                               Spell.CastOnGround("Flamestrike",
                                                  ret => Clusters.GetBestUnitForCluster(Unit.NearbyUnfriendlyUnits, ClusterType.Radius, 8f).Location,
                                                  ret => !ObjectManager.GetObjectsOfType <WoWDynamicObject>().Any(o =>
                                                                                                                  o.CasterGuid == StyxWoW.Me.Guid && o.Spell.Name == "Flamestrike" &&
                                                                                                                  o.Location.Distance(
                                                                                                                      Clusters.GetBestUnitForCluster(Unit.NearbyUnfriendlyUnits, ClusterType.Radius, 8f).Location) < o.Radius))
                               )),

                       Spell.BuffSelf("Time Warp",
                                      ret => !StyxWoW.Me.IsInRaid && StyxWoW.Me.CurrentTarget.HealthPercent > 20 && StyxWoW.Me.CurrentTarget.IsBoss() &&
                                      !StyxWoW.Me.HasAura("Temporal Displacement")),

                       // Rotation
                       Spell.Cast("Combustion",
                                  ret => (StyxWoW.Me.CurrentTarget.HasMyAura("Living Bomb") || !SpellManager.HasSpell("Living Bomb")) &&
                                  (StyxWoW.Me.CurrentTarget.HasMyAura("Ignite") || TalentManager.GetCount(2, 4) == 0) &&
                                  StyxWoW.Me.CurrentTarget.HasMyAura("Pyroblast!")),
                       Spell.Cast("Scorch", ret => StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Critical Mass", true).TotalSeconds < 1 && TalentManager.GetCount(2, 20) != 0),
                       Spell.Cast("Pyroblast", ret => StyxWoW.Me.ActiveAuras.ContainsKey("Hot Streak")),
                       Spell.BuffSelf("Flame Orb"),
                       Spell.Buff("Living Bomb", true),
                       Spell.Cast("Fireball"),
                       Movement.CreateMoveToTargetBehavior(true, 35f)
                       ));
        }
Пример #11
0
        public static Composite CreateSubtletyRogueInstanceCombat()
        {
            return(new PrioritySelector(
                       Safers.EnsureTarget(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       new Decorator(
                           ret => !StyxWoW.Me.HasAura("Vanish"),
                           Helpers.Common.CreateAutoAttack(true)),
                       Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),

                       // Defensive
                       Spell.BuffSelf("Evasion",
                                      ret => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 6 * 6 && u.IsTargetingMeOrPet) >= 1),

                       Spell.BuffSelf("Cloak of Shadows",
                                      ret => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet && u.IsCasting) >= 1),

                       // Redirect if we have CP left
                       Spell.Cast("Redirect", ret => StyxWoW.Me.RawComboPoints > 0 && StyxWoW.Me.ComboPoints < 1),

                       // Agro management
                       Spell.Cast(
                           "Tricks of the Trade",
                           ret => Common.BestTricksTarget,
                           ret => SingularSettings.Instance.Rogue.UseTricksOfTheTrade),

                       Spell.Cast("Feint", ret => StyxWoW.Me.CurrentTarget.ThreatInfo.RawPercent > 80),

                       Movement.CreateMoveBehindTargetBehavior(),

                       new Decorator(
                           ret => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 8 * 8) >= 3,
                           Spell.BuffSelf("Fan of Knives", ret => Item.RangedIsType(WoWItemWeaponClass.Thrown))),

                       Spell.BuffSelf("Preparation",
                                      ret => SpellManager.HasSpell("Vanish") && SpellManager.Spells["Vanish"].CooldownTimeLeft.TotalSeconds > 10 &&
                                      SpellManager.Spells["Shadowstep"].CooldownTimeLeft.TotalSeconds > 10),
                       Spell.BuffSelf("Shadow Dance", ret => StyxWoW.Me.CurrentTarget.MeIsBehind),
                       Spell.BuffSelf("Slice and Dice",
                                      ret => StyxWoW.Me.RawComboPoints > 0 && StyxWoW.Me.GetAuraTimeLeft("Slice and Dice", true).TotalSeconds < 3),
                       Spell.Buff("Rupture", true, ret => StyxWoW.Me.ComboPoints >= 4),
                       Spell.BuffSelf("Recuperate", ret => TalentManager.GetCount(3, 8) > 0 && StyxWoW.Me.RawComboPoints > 0),
                       Spell.Cast("Eviscerate", ret => StyxWoW.Me.ComboPoints == 5),
                       // Vanish + Shadowstep + Premeditation + Ambush combo
                       new Decorator(
                           ret => StyxWoW.Me.HasAura("Vanish"),
                           new PrioritySelector(
                               Spell.Cast("Shadowstep"),
                               Spell.BuffSelf("Premeditation", ret => StyxWoW.Me.ComboPoints <= 3),
                               Spell.Cast("Ambush", ret => StyxWoW.Me.CurrentTarget.MeIsBehind)
                               )),
                       Spell.Cast("Ambush", ret => StyxWoW.Me.CurrentTarget.MeIsBehind && StyxWoW.Me.HasAura("Shadow Dance")),
                       Spell.Cast("Backstab", ret => StyxWoW.Me.CurrentTarget.MeIsBehind && !StyxWoW.Me.HasAura("Shadow Dance")),
                       Spell.Cast("Hemorrhage", ret => !StyxWoW.Me.CurrentTarget.MeIsBehind),
                       Spell.Cast("Sinister Strike", ret => !SpellManager.HasSpell("Hemorrhage") && !StyxWoW.Me.CurrentTarget.MeIsBehind),
                       Movement.CreateMoveToMeleeBehavior(true)
                       ));
        }
Пример #12
0
 public static Composite CreateDiscInitialize()
 {
     HasReflectiveShield = TalentManager.HasGlyph("Reflective Shield");
     if (HasReflectiveShield)
     {
         Logger.Write(LogColor.Init, "[Glyph of Reflective Shield] will prioritize Power Word: Shield on self if we are being attacked");
     }
     return(null);
 }
Пример #13
0
        public static Composite CreateRestoDruidInitialize()
        {
            glyphRegrowth     = TalentManager.HasGlyph("Regrowth");
            glyphRejuv        = TalentManager.HasGlyph("Rejuvenation");
            talentGermination = Common.HasTalent(DruidTalents.Germination);

            MaxRejuvStacks = talentGermination ? 2u : 1u;
            return(null);
        }
Пример #14
0
        public override void Pulse()
        {
            if (!StyxWoW.IsInGame || !StyxWoW.IsInWorld)
            {
                return;
            }
            if (TalentManager.Pulse())
            {
                return;
            }

            UpdateContext();
            Spell.DoubleCastPreventionDict.RemoveAll(t => DateTime.UtcNow > t);

            switch (StyxWoW.Me.Class)
            {
            case WoWClass.Hunter:
            case WoWClass.DeathKnight:
            case WoWClass.Warlock:
            case WoWClass.Mage:
                PetManager.Pulse();
                break;
            }

            if (HealerManager.NeedHealTargeting)
            {
                HealerManager.Instance.Pulse();
            }

            if (Movement)
            {
                Helpers.Movement.PulseMovement();
                TargetingGeneral.TargetingPulse();
            }

            if (!BotManager.Current.Name.Equals("BGBuddy") && !BotManager.Current.Name.Equals("Bg Bot"))
            {
                return;
            }
            if (StyxWoW.IsInGame == false || StyxWoW.Me.IsValid == false)
            {
                return;
            }
            if (StyxWoW.Me.IsActuallyInCombat && Helpers.Movement.MoveTo(StyxWoW.Me.CurrentTarget))
            {
                Blacklist.Flush();
            }
            if (TargetingPvP.TargetExists())
            {
                TargetingPvP.GetInCombat(); return;
            }
            if (StyxWoW.Me.IsDead || StyxWoW.Me.HasAura("Preparation"))
            {
                Helpers.Movement.StopMovement(true, true, true, true); StyxWoW.Me.ClearTarget(); return;
            }
            TargetingPvP.TargetPulse();
        }
Пример #15
0
        private void RestoreRoleCustomData(GameClient client, RoleCustomData customData)
        {
            RoleCustomDataItem roleCustomData = null;

            if (customData != null && customData.customDataList != null && customData.customDataList.Count > 0)
            {
                roleCustomData = customData.customDataList.Find((RoleCustomDataItem x) => x.Occupation == client.ClientData.Occupation);
            }
            if (null == roleCustomData)
            {
                roleCustomData = new RoleCustomDataItem();
            }
            client.ClientData.MainQuickBarKeys = roleCustomData.Main_quick_keys;
            GameManager.DBCmdMgr.AddDBCmd(10010, string.Format("{0}:{1}:{2}", client.ClientData.RoleID, 0, roleCustomData.Main_quick_keys), null, client.ServerId);
            int[] rolePoint = new int[4];
            for (int i = 0; i < 4; i++)
            {
                if (roleCustomData.RolePointList != null && i < roleCustomData.RolePointList.Count)
                {
                    rolePoint[i] = roleCustomData.RolePointList[i];
                }
            }
            client.ClientData.PropStrength = Global.GetRoleParamsInt32FromDB(client, "PropStrengthChangeless") + rolePoint[0];
            Global.SaveRoleParamsInt32ValueToDB(client, "PropStrength", client.ClientData.PropStrength, true);
            client.ClientData.PropIntelligence = Global.GetRoleParamsInt32FromDB(client, "PropIntelligenceChangeless") + rolePoint[1];
            Global.SaveRoleParamsInt32ValueToDB(client, "PropIntelligence", client.ClientData.PropIntelligence, true);
            client.ClientData.PropDexterity = Global.GetRoleParamsInt32FromDB(client, "PropDexterityChangeless") + rolePoint[2];
            Global.SaveRoleParamsInt32ValueToDB(client, "PropDexterity", client.ClientData.PropDexterity, true);
            client.ClientData.PropConstitution = Global.GetRoleParamsInt32FromDB(client, "PropConstitutionChangeless") + rolePoint[3];
            Global.SaveRoleParamsInt32ValueToDB(client, "PropConstitution", client.ClientData.PropConstitution, true);
            TalentManager.DBTalentEffectClear(client.ClientData.RoleID, client.ClientData.ZoneID, client.ServerId);
            foreach (TalentEffectItem item in roleCustomData.EffectList)
            {
                TalentManager.ModifyEffect(client, item.ID, item.TalentType, item.Level);
            }
            client.ClientData.DefaultSkillLev = roleCustomData.DefaultSkillLev;
            Global.SaveRoleParamsInt32ValueToDB(client, "DefaultSkillLev", client.ClientData.DefaultSkillLev, true);
            client.ClientData.DefaultSkillUseNum = roleCustomData.DefaultSkillUseNum;
            Global.SaveRoleParamsInt32ValueToDB(client, "DefaultSkillUseNum", client.ClientData.DefaultSkillUseNum, true);
            if (client.ClientData.FuWenTabList != null && client.ClientData.FuWenTabList.Count > 0)
            {
                for (int i = 0; i < client.ClientData.FuWenTabList.Count; i++)
                {
                    int        skillID           = 0;
                    List <int> shenShiActiveList = new List <int>();
                    if (roleCustomData.ShenShiEuipSkill != null && i < roleCustomData.ShenShiEuipSkill.Count)
                    {
                        skillID           = roleCustomData.ShenShiEuipSkill[i].SkillEquip;
                        shenShiActiveList = roleCustomData.ShenShiEuipSkill[i].ShenShiActiveList;
                    }
                    client.ClientData.FuWenTabList[i].SkillEquip        = skillID;
                    client.ClientData.FuWenTabList[i].ShenShiActiveList = shenShiActiveList;
                    Global.sendToDB <int, FuWenTabData>(20316, client.ClientData.FuWenTabList[i], 0);
                }
            }
        }
Пример #16
0
        public static Composite CreateWarriorInitialize()
        {
            // removed combatreach because of # of missed Charges
            DistanceChargeBehavior = 25f;

            string spellVictory = "Victory Rush";

            VictoryRushHealth = 90;
            if (SpellManager.HasSpell("Impending Victory"))
            {
                VictoryRushHealth = 80;
                spellVictory      = "Impending Victory";
                Logger.Write(LogColor.Init, "impending victory talent: [{0}] at {1}%", spellVictory, VictoryRushHealth);
            }
            else if (TalentManager.HasGlyph("Victory Rush"))
            {
                VictoryRushHealth = 85;
                Logger.Write(LogColor.Init, "glyph of victory rush: [{0}] at {1}%", spellVictory, VictoryRushHealth);
            }
            else
            {
                Logger.Write(LogColor.Init, "victory rush: [{0}] at {1}%", spellVictory, VictoryRushHealth);
            }


            if (WarriorSettings.VictoryRushOnCooldown)
            {
                Logger.Write(LogColor.Init, "victory rush on cooldown: [{0}] cast on cooldown", spellVictory);
                VictoryRushHealth = 100;
            }

            VictoryRushDistance = 5f;
            if (TalentManager.HasGlyph("Victorious Throw"))
            {
                VictoryRushDistance = 15f;
                Logger.Write(LogColor.Init, "glyph of victorious throw: [{0}] at {1:F1} yds", spellVictory, VictoryRushDistance);
            }

            HeroicLeapDistance = 40f;
            if (TalentManager.HasGlyph("Death From Above"))
            {
                HeroicLeapDistance = 25f;
                Logger.Write(LogColor.Init, "glyph of death from above: [Heroic Leap] at {0:F1} yds", HeroicLeapDistance);
            }

            _DistanceWindAndThunder = 0;
            if (TalentManager.HasGlyph("Wind and Thunder"))
            {
                _DistanceWindAndThunder = 4;
                Logger.Write(LogColor.Init, "glyph of wind and thunder: [Whirlwind] and [Thunder Clap] +4 yds");
            }

            DistanceChargeBehavior -= 0.2f;    // should not be needed, but is  -- based on log files and observations we need this adjustment

            return(null);
        }
Пример #17
0
        public static Composite CreateAssaRogueInstanceCombat()
        {
            return(new PrioritySelector(
                       Safers.EnsureTarget(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       new Decorator(
                           ret => !StyxWoW.Me.HasAura("Vanish"),
                           Helpers.Common.CreateAutoAttack(true)),
                       Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),

                       // Defensive
                       Spell.BuffSelf("Evasion",
                                      ret => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 6 * 6 && u.IsTargetingMeOrPet) >= 1),

                       Spell.BuffSelf("Cloak of Shadows",
                                      ret => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet && u.IsCasting) >= 1),

                       // Redirect if we have CP left
                       Spell.Cast("Redirect", ret => StyxWoW.Me.RawComboPoints > 0 && StyxWoW.Me.ComboPoints < 1),

                       // Agro management
                       Spell.Cast(
                           "Tricks of the Trade",
                           ret => Common.BestTricksTarget,
                           ret => SingularSettings.Instance.Rogue.UseTricksOfTheTrade),

                       Spell.Cast("Feint", ret => StyxWoW.Me.CurrentTarget.ThreatInfo.RawPercent > 80),

                       Movement.CreateMoveBehindTargetBehavior(),

                       Spell.BuffSelf("Vanish",
                                      ret => TalentManager.IsSelected(14) && StyxWoW.Me.CurrentTarget.HasMyAura("Rupture") &&
                                      StyxWoW.Me.HasAura("Slice and Dice")),
                       Spell.Cast("Garrote",
                                  ret => (StyxWoW.Me.HasAura("Vanish") || StyxWoW.Me.IsStealthed) &&
                                  StyxWoW.Me.CurrentTarget.MeIsBehind),
                       Spell.Buff("Vendetta",
                                  ret => StyxWoW.Me.CurrentTarget.IsBoss() &&
                                  (StyxWoW.Me.CurrentTarget.HealthPercent < 35 || TalentManager.IsSelected(13))),

                       new Decorator(
                           ret => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 8 * 8) >= 3,
                           Spell.BuffSelf("Fan of Knives", ret => Item.RangedIsType(WoWItemWeaponClass.Thrown))),

                       Spell.BuffSelf("Slice and Dice", ret => StyxWoW.Me.RawComboPoints > 0 && !StyxWoW.Me.HasAura("Slice and Dice")),
                       Spell.Buff("Rupture", true, ret => (StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Rupture", true).TotalSeconds < 3)),
                       Spell.Buff("Envenom", true, ret => (StyxWoW.Me.GetAuraTimeLeft("Slice and Dice", true).TotalSeconds < 3 && StyxWoW.Me.ComboPoints > 0) || StyxWoW.Me.ComboPoints == 5),
                       Spell.Cast("Dispatch"),
                       Spell.Cast("Mutilate"),

                       Movement.CreateMoveToMeleeBehavior(true)
                       ));
        }
Пример #18
0
        /// <summary>Creates an interrupt spell cast composite. This will attempt to use racials before any class/spec abilities. It will attempt to stun if possible!</summary>
        /// <remarks>Created 9/7/2011.</remarks>
        /// <param name="onUnit">The on unit.</param>
        /// <returns>.</returns>
        public static Composite CreateInterruptSpellCast(UnitSelectionDelegate onUnit)
        {
            return
                (new Decorator(
                     // If the target is casting, and can actually be interrupted, AND we've waited out the double-interrupt timer, then find something to interrupt with.
                     ret => onUnit != null && onUnit(ret) != null && onUnit(ret).IsCasting&& onUnit(ret).CanInterruptCurrentSpellCast
                     /* && PreventDoubleInterrupt*/,
                     new PrioritySelector(
                         Spell.Cast("Rebuke", onUnit),
                         Spell.Cast("Avenger's Shield", onUnit),
                         Spell.Cast("Hammer of Justice", onUnit),
                         Spell.Cast("Repentance", onUnit,
                                    ret => onUnit(ret).IsPlayer || onUnit(ret).IsDemon || onUnit(ret).IsHumanoid ||
                                    onUnit(ret).IsDragon || onUnit(ret).IsGiant || onUnit(ret).IsUndead),

                         Spell.Cast("Kick", onUnit),
                         Spell.Cast("Gouge", onUnit, ret => !onUnit(ret).IsBoss() && !onUnit(ret).MeIsSafelyBehind), // Can't gouge bosses.

                         Spell.Cast("Counterspell", onUnit),

                         Spell.Cast("Wind Shear", onUnit),

                         Spell.Cast("Pummel", onUnit),

                         Spell.Cast("Spear Hand Strike", onUnit),

                         // AOE interrupt
                         Spell.Cast("Disrupting Shout", onUnit),
                         // Gag Order only works on non-bosses due to it being a silence, not an interrupt!
                         Spell.Cast("Heroic Throw", onUnit, ret => TalentManager.IsSelected(7) && !onUnit(ret).IsBoss()),

                         Spell.Cast("Silence", onUnit),

                         Spell.Cast("Silencing Shot", onUnit),

                         // Can't stun most bosses. So use it on trash, etc.
                         Spell.Cast("Bash", onUnit, ret => !onUnit(ret).IsBoss()),
                         Spell.Cast("Skull Bash (Cat)", onUnit, ret => StyxWoW.Me.Shapeshift == ShapeshiftForm.Cat),
                         Spell.Cast("Skull Bash (Bear)", onUnit, ret => StyxWoW.Me.Shapeshift == ShapeshiftForm.Bear),
                         Spell.Cast("Mighty Bash", onUnit, ret => !onUnit(ret).IsBoss() && onUnit(ret).IsWithinMeleeRange),
                         Spell.Cast("Solar Beam", onUnit, ret => StyxWoW.Me.Shapeshift == ShapeshiftForm.Moonkin),

                         Spell.Cast("Strangulate", onUnit),
                         Spell.Cast("Mind Freeze", onUnit),


                         // Racials last.
                         Spell.Cast("Arcane Torrent", onUnit),
                         // Don't waste stomp on bosses. They can't be stunned 99% of the time!
                         Spell.Cast("War Stomp", onUnit, ret => !onUnit(ret).IsBoss() && onUnit(ret).Distance < 8),
                         Spell.Cast("Quaking Palm", onUnit)

                         )));
        }
Пример #19
0
 public static Composite CreateStayAwayFromFrozenTargetsBehavior()
 {
     return(Avoidance.CreateAvoidanceBehavior(
                "Blink",
                TalentManager.HasGlyph("Blink") ? 28 : 20,
                Disengage.Direction.Frontwards,
                crowdControl: CreateSlowMeleeBehavior(),
                needDisengage: nd => Me.GotTarget() && Me.CurrentTarget.IsCrowdControlled() && Me.CurrentTarget.SpellDistance() < SingularSettings.Instance.KiteAvoidDistance,
                needKiting: nk => Me.GotTarget() && (Me.CurrentTarget.IsCrowdControlled() || Me.CurrentTarget.IsSlowed(60)) && Me.CurrentTarget.SpellDistance() < SingularSettings.Instance.KiteAvoidDistance
                ));
 }
Пример #20
0
        public static Composite CreateDeathKnightBloodHeals()
        {
            return
                (new PrioritySelector(
                     Spell.BuffSelf("Death Pact",
                                    ret =>
                                    TalentManager.IsSelected((int)Common.DeathKnightTalents.DeathPact) &&
                                    StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.DeathPactPercent &&
                                    Common.GhoulMinionIsActive),
                     Spell.Cast("Death Siphon",
                                ret =>
                                TalentManager.IsSelected((int)Common.DeathKnightTalents.DeathSiphon) &&
                                StyxWoW.Me.GotTarget &&
                                StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.DeathSiphonPercent),
                     Spell.BuffSelf("Conversion",
                                    ret =>
                                    TalentManager.IsSelected((int)Common.DeathKnightTalents.Conversion) &&
                                    StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.ConversionPercent &&
                                    StyxWoW.Me.RunicPowerPercent >=
                                    SingularSettings.Instance.DeathKnight.MinimumConversionRunicPowerPrecent),

                     Spell.BuffSelf("Rune Tap",
                                    ret => StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.RuneTapPercent ||
                                    StyxWoW.Me.HealthPercent < 90 && StyxWoW.Me.HasAura("Will of the Necropolis")),

                     Spell.BuffSelf("Death Coil",
                                    ret =>
                                    StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.LichbornePercent &&
                                    StyxWoW.Me.HasAura("Lichborne")),

                     Spell.BuffSelf("Lichborne",
                                    ret =>
                                    StyxWoW.Me.HealthPercent <
                                    SingularSettings.Instance.DeathKnight.LichbornePercent &&
                                    StyxWoW.Me.CurrentRunicPower >= 60 &&
                                    (!SingularSettings.Instance.DeathKnight.LichborneExclusive ||
                                     (!StyxWoW.Me.HasAura("Bone Shield") &&
                                      !StyxWoW.Me.HasAura("Vampiric Blood") &&
                                      !StyxWoW.Me.HasAura("Dancing Rune Weapon") &&
                                      !StyxWoW.Me.HasAura("Icebound Fortitude")))),

                     Spell.BuffSelf("Raise Dead",
                                    ret =>
                                    // I need to summon pet for Death Pact
                                    StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.SummonGhoulPercentBlood &&
                                    !Common.GhoulMinionIsActive &&
                                    (!SingularSettings.Instance.DeathKnight.DeathPactExclusive ||
                                     (!StyxWoW.Me.HasAura("Bone Shield") &&
                                      !StyxWoW.Me.HasAura("Vampiric Blood") &&
                                      !StyxWoW.Me.HasAura("Dancing Rune Weapon") &&
                                      !StyxWoW.Me.HasAura("Lichborne") &&
                                      !StyxWoW.Me.HasAura("Icebound Fortitude"))))
                     ));
        }
Пример #21
0
        public static Composite CreateAssaRoguePvPCombat()
        {
            return(new PrioritySelector(
                       Safers.EnsureTarget(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       new Decorator(
                           ret => !StyxWoW.Me.HasAura("Vanish"),
                           Helpers.Common.CreateAutoAttack(true)),
                       Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),

                       // Defensive
                       Spell.BuffSelf("Evasion",
                                      ret => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 6 * 6 && u.IsTargetingMeOrPet) >= 1),

                       Spell.BuffSelf("Cloak of Shadows",
                                      ret => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet && u.IsCasting) >= 1),

                       Spell.BuffSelf("Smoke Bomb", ret => StyxWoW.Me.HealthPercent < 15),

                       // Redirect if we have CP left
                       Spell.Cast("Redirect", ret => StyxWoW.Me.RawComboPoints > 0 && StyxWoW.Me.ComboPoints < 1),

                       Spell.BuffSelf("Vanish",
                                      ret => TalentManager.GetCount(1, 14) > 0 && StyxWoW.Me.CurrentTarget.HasMyAura("Rupture") &&
                                      StyxWoW.Me.HasAura("Slice and Dice")),
                       Spell.Cast("Garrote",
                                  ret => (StyxWoW.Me.HasAura("Vanish") || StyxWoW.Me.IsStealthed) &&
                                  StyxWoW.Me.CurrentTarget.MeIsBehind),
                       Spell.BuffSelf("Vendetta"),
                       Spell.Buff("Rupture", true, ret => StyxWoW.Me.ComboPoints >= 4),
                       Spell.BuffSelf("Slice and Dice",
                                      ret => StyxWoW.Me.RawComboPoints > 0 && StyxWoW.Me.GetAuraTimeLeft("Slice and Dice", true).TotalSeconds < 3),
                       Spell.BuffSelf("Cold Blood",
                                      ret => StyxWoW.Me.ComboPoints >= 4 && StyxWoW.Me.CurrentTarget.HealthPercent >= 35 ||
                                      StyxWoW.Me.ComboPoints == 5 || !SpellManager.HasSpell("Envenom")),
                       Spell.Cast("Eviscerate",
                                  ret => (StyxWoW.Me.CurrentTarget.HealthPercent <= 40 || !SpellManager.HasSpell("Envenom")) && StyxWoW.Me.ComboPoints >= 4),
                       Spell.Cast("Kidney Shot",
                                  ret => StyxWoW.Me.ComboPoints >= 4 && !StyxWoW.Me.CurrentTarget.IsStunned()),
                       Spell.Cast("Envenom",
                                  ret => StyxWoW.Me.CurrentTarget.HealthPercent >= 35 && StyxWoW.Me.ComboPoints >= 4),
                       Spell.Cast("Envenom",
                                  ret => StyxWoW.Me.CurrentTarget.HealthPercent < 35 && StyxWoW.Me.ComboPoints == 5),
                       Spell.Cast("Backstab",
                                  ret => StyxWoW.Me.CurrentTarget.HealthPercent < 35 && TalentManager.GetCount(1, 13) > 0 &&
                                  StyxWoW.Me.CurrentTarget.MeIsBehind && !StyxWoW.Me.HasAura("Cold Blood")),
                       Spell.Cast("Mutilate",
                                  ret => (StyxWoW.Me.CurrentTarget.HealthPercent >= 35 || TalentManager.GetCount(1, 13) == 0 ||
                                          !StyxWoW.Me.CurrentTarget.MeIsBehind) && !StyxWoW.Me.HasAura("Cold Blood")),

                       Movement.CreateMoveToMeleeBehavior(true)
                       ));
        }
Пример #22
0
        public static void startup()
        {
            ZhanMengShiJianManager.getInstance().startup();
            JingJiChangManager.getInstance().startup();
            LiXianBaiTanManager.getInstance().startup();
            LiXianGuaJiManager.getInstance().startup();
            CmdRegisterTriggerManager.getInstance().startup();
            SendCmdManager.getInstance().startup();
            BossAIManager.getInstance().startup();
            SaleManager.getInstance().startup();
            LianZhiManager.GetInstance().startup();
            ChengJiuManager.GetInstance().startup();
            UserReturnManager.getInstance().startup();
            OlympicsManager.getInstance().startup();
            TalentManager.getInstance().startup();
            TodayManager.getInstance().startup();
            FundManager.getInstance().startup();
            WarnManager.getInstance().startup();
            PrestigeMedalManager.getInstance().startup();
            UnionPalaceManager.getInstance().startup();
            UserActivateManager.getInstance().startup();
            PetSkillManager.getInstance().startup();
            BuildingManager.getInstance().startup();
            OnePieceManager.getInstance().startup();
            TenManager.getInstance().startup();
            SingletonTemplate <SevenDayActivityMgr> .Instance().startup();

            SingletonTemplate <SoulStoneManager> .Instance().startup();

            lock (GlobalServiceManager.Scene2ManagerDict)
            {
                foreach (List <IManager> list in GlobalServiceManager.Scene2ManagerDict.Values)
                {
                    foreach (IManager i in list)
                    {
                        try
                        {
                            bool success = i.startup();
                            if (GameManager.ServerStarting && !success)
                            {
                                LogManager.WriteLog(LogTypes.Fatal, string.Format("初始化{0}.startup()失败,按任意键忽略此错误并继续启动服务器!", i.GetType()), null, true);
                                Console.ReadKey();
                            }
                        }
                        catch (Exception ex)
                        {
                            LogManager.WriteException(ex.ToString());
                        }
                    }
                }
            }
            FaceBookManager.getInstance().startup();
        }
Пример #23
0
        public static Composite CreateSubtletyRogueNormalCombat()
        {
            return(new PrioritySelector(
                       Safers.EnsureTarget(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       new Decorator(
                           ret => !StyxWoW.Me.HasAura("Vanish"),
                           Helpers.Common.CreateAutoAttack(true)),
                       Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),

                       // Don't do anything if we casted vanish
                       new Decorator(
                           ret => StyxWoW.Me.HasAura("Vanish"),
                           new ActionAlwaysSucceed()),

                       // Defensive
                       Spell.BuffSelf("Evasion",
                                      ret => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 6 * 6 && u.IsTargetingMeOrPet) >= 2),

                       Spell.BuffSelf("Cloak of Shadows",
                                      ret => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet && u.IsCasting) >= 1),

                       Spell.BuffSelf("Smoke Bomb", ret => StyxWoW.Me.HealthPercent < 15),

                       Common.CreateRogueBlindOnAddBehavior(),

                       // Redirect if we have CP left
                       Spell.Cast("Redirect", ret => StyxWoW.Me.RawComboPoints > 0 && StyxWoW.Me.ComboPoints < 1),

                       Spell.BuffSelf("Vanish",
                                      ret => StyxWoW.Me.HealthPercent < 20),

                       Spell.BuffSelf("Preparation",
                                      ret => SpellManager.HasSpell("Vanish") && SpellManager.Spells["Vanish"].CooldownTimeLeft.TotalSeconds > 10 &&
                                      StyxWoW.Me.HealthPercent < 25),

                       Spell.BuffSelf("Shadow Dance", ret => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet) >= 3),
                       Spell.Cast("Cheap Shot", ret => StyxWoW.Me.HasAura("Shadow Dance")),
                       Spell.BuffSelf("Slice and Dice",
                                      ret => StyxWoW.Me.RawComboPoints > 0 && StyxWoW.Me.GetAuraTimeLeft("Slice and Dice", true).TotalSeconds < 3),
                       Spell.Buff("Rupture", true, ret => StyxWoW.Me.ComboPoints >= 4 && StyxWoW.Me.CurrentTarget.Elite),
                       Spell.BuffSelf("Recuperate", ret => TalentManager.GetCount(3, 8) > 0 && StyxWoW.Me.RawComboPoints > 0),
                       Spell.Cast("Eviscerate", ret => StyxWoW.Me.CurrentTarget.HealthPercent < 40 && StyxWoW.Me.ComboPoints >= 2),
                       Spell.Cast("Eviscerate", ret => StyxWoW.Me.ComboPoints == 5),
                       Spell.Cast("Ambush", ret => StyxWoW.Me.CurrentTarget.MeIsBehind && StyxWoW.Me.HasAura("Shadow Dance")),
                       Spell.Cast("Backstab", ret => StyxWoW.Me.CurrentTarget.MeIsBehind && !StyxWoW.Me.HasAura("Shadow Dance")),
                       Spell.Cast("Hemorrhage", ret => !StyxWoW.Me.CurrentTarget.MeIsBehind),
                       Spell.Cast("Sinister Strike", ret => !SpellManager.HasSpell("Hemorrhage") && !StyxWoW.Me.CurrentTarget.MeIsBehind),

                       Movement.CreateMoveToMeleeBehavior(true)
                       ));
        }
Пример #24
0
 public static Composite CreateMonkLossOfControlBehavior()
 {
     return(new Decorator(
                ret => !Spell.IsGlobalCooldown() && !Spell.IsCastingOrChannelling(),
                new PrioritySelector(
                    Spell.BuffSelf("Nimble Brew", ret => Me.Stunned || Me.Fleeing || Me.HasAuraWithMechanic(WoWSpellMechanic.Horrified)),
                    Spell.BuffSelf("Dampen Harm", ret => Me.Stunned && Unit.NearbyUnitsInCombatWithMeOrMyStuff.Any()),
                    Spell.BuffSelf("Tiger's Lust", ret => Me.Rooted && !Me.HasAuraWithEffect(WoWApplyAuraType.ModIncreaseSpeed)),
                    Spell.BuffSelf("Life Cocoon", req => Me.Stunned && TalentManager.HasGlyph("Life Cocoon") && Unit.NearbyUnitsInCombatWithMeOrMyStuff.Any())
                    )
                ));
 }
Пример #25
0
        public CharacterManager(AmeisenBotConfig config, WowInterface wowInterface)
        {
            WowInterface = wowInterface;
            Config       = config;

            Inventory      = new CharacterInventory(WowInterface);
            Equipment      = new CharacterEquipment(WowInterface);
            SpellBook      = new SpellBook(WowInterface);
            TalentManager  = new TalentManager(WowInterface);
            ItemComparator = new ItemLevelComparator();
            Skills         = new Dictionary <string, (int, int)>();
        }
Пример #26
0
        /// <summary>
        /// creates a Mage specific avoidance behavior based upon settings.  will check for safe landing
        /// zones before using Blink or Rocket Jump.  will additionally do a running away or jump turn
        /// attack while moving away from attacking mob if behaviors provided
        /// </summary>
        /// <param name="nonfacingAttack">behavior while running away (back to target - instants only)</param>
        /// <param name="jumpturnAttack">behavior while facing target during jump turn (instants only)</param>
        /// <returns></returns>
        public static Composite CreateMageAvoidanceBehavior()
        {
            int distBlink = TalentManager.HasGlyph("Blink") ? 28 : 20;

            return(Avoidance.CreateAvoidanceBehavior(
                       "Blink",
                       distBlink,
                       Disengage.Direction.Frontwards,
                       crowdControl: CreateSlowMeleeBehavior(),
                       needDisengage: nd => false,
                       needKiting: nk => Me.GotTarget() && Me.CurrentTarget.IsFrozen() && Me.CurrentTarget.SpellDistance() < 8
                       ));
        }
Пример #27
0
        private static Composite CreateFeralBearInstanceCombat()
        {
            return(new PrioritySelector(
                       Spell.BuffSelf("Bear Form"),
                       Spell.Cast("Feral Charge (Bear)"),
                       // Defensive CDs are hard to 'roll' from this type of logic, so we'll simply use them more as 'oh shit' buttons, than anything.
                       // Barkskin should be kept on CD, regardless of what we're tanking
                       Spell.BuffSelf("Barkskin", ret => StyxWoW.Me.HealthPercent < Settings.FeralBarkskin),
                       // Since Enrage no longer makes us take additional damage, just keep it on CD. Its a rage boost, and coupled with King of the Jungle, a DPS boost for more threat.
                       Spell.BuffSelf("Enrage"),
                       // Only pop SI if we're taking a bunch of damage.
                       Spell.BuffSelf("Survival Instincts", ret => StyxWoW.Me.HealthPercent < Settings.SurvivalInstinctsHealth),
                       // We only want to pop FR < 30%. Users should not be able to change this value, as FR automatically pushes us to 30% hp.
                       Spell.BuffSelf("Frenzied Regeneration", ret => StyxWoW.Me.HealthPercent < Settings.FrenziedRegenerationHealth),
                       // Make sure we deal with interrupts...
                       //Spell.Cast(80964 /*"Skull Bash (Bear)"*/, ret => (WoWUnit)ret, ret => ((WoWUnit)ret).IsCasting),
                       Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),

                       new Decorator(
                           ret => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 8 * 8) >= 3,
                           new PrioritySelector(
                               Spell.Cast("Berserk"),
                               Spell.Cast("Demoralizing Roar",
                                          ret => Unit.NearbyUnfriendlyUnits.Any(u => u.DistanceSqr < 10 * 10 && !u.HasDemoralizing())),
                               Spell.Cast("Maul", ret => TalentManager.HasGlyph("Maul")),
                               Spell.Cast("Thrash"),
                               Spell.Cast("Swipe (Bear)"),
                               Spell.Cast("Mangle (Bear)"),
                               Movement.CreateMoveToMeleeBehavior(true)
                               )),
                       // If we have 3+ units not targeting us, and are within 10yds, then pop our AOE taunt. (These are ones we have 'no' threat on, or don't hold solid threat on)
                       Spell.Cast(
                           "Challenging Roar", ret => TankManager.Instance.NeedToTaunt.FirstOrDefault(),
                           ret => SingularSettings.Instance.EnableTaunting && TankManager.Instance.NeedToTaunt.Count(u => u.Distance <= 10) >= 3),
                       // If there's a unit that needs taunting, do it.
                       Spell.Cast(
                           "Growl", ret => TankManager.Instance.NeedToTaunt.FirstOrDefault(),
                           ret => SingularSettings.Instance.EnableTaunting),
                       Spell.Cast("Pulverize", ret => ((WoWUnit)ret).HasAura("Lacerate", 3) && !StyxWoW.Me.HasAura("Pulverize")),

                       Spell.Buff("Demoralizing Roar", ret => !StyxWoW.Me.CurrentTarget.HasDemoralizing()),

                       Spell.Cast("Faerie Fire (Feral)", ret => !((WoWUnit)ret).HasSunders()),
                       Spell.Cast("Mangle (Bear)"),
                       // Maul is our rage dump... don't pop it unless we have to, or we still have > 2 targets.
                       Spell.Cast("Maul", ret => StyxWoW.Me.RagePercent > 60),
                       Spell.Cast("Lacerate"),
                       Movement.CreateMoveToMeleeBehavior(true)
                       ));
        }
Пример #28
0
        public static Composite CreatePriestMovementBuff()
        {
            if (!SpellManager.HasSpell("Angelic Feather") && !TalentManager.IsSelected((int)PriestTalents.BodyAndSoul))
            {
                return(new ActionAlwaysFail());
            }

            return(new Decorator(
                       ret => MovementManager.IsClassMovementAllowed &&
                       StyxWoW.Me.IsAlive &&
                       Me.IsMoving &&
                       !StyxWoW.Me.Mounted &&
                       !StyxWoW.Me.IsOnTransport &&
                       !StyxWoW.Me.OnTaxi &&
                       !StyxWoW.Me.HasAnyAura("Angelic Feather", "Body and Soul") &&
                       !StyxWoW.Me.IsAboveTheGround(),

                       new PrioritySelector(
                           Spell.WaitForCast(),
                           new Throttle(3,
                                        new Decorator(
                                            ret => !Spell.IsGlobalCooldown(),
                                            new PrioritySelector(

                                                Spell.BuffSelf("Power Word: Shield",
                                                               ret => TalentManager.IsSelected((int)PriestTalents.BodyAndSoul) &&
                                                               !StyxWoW.Me.HasAnyAura("Body and Soul", "Weakened Soul")),

                                                new Decorator(
                                                    ret => SpellManager.HasSpell("Angelic Feather") &&
                                                    !StyxWoW.Me.HasAura("Angelic Feather"),
                                                    new PrioritySelector(
                                                        new Sequence(
                                                            Spell.CastOnGround(
                                                                "Angelic Feather",
                                                                loc => Me.Location.RayCast(Me.RenderFacing, 1.5f),
                                                                req => true,
                                                                waitForSpell: true,
                                                                tgtDescRtrv: desc => string.Format("Speed Boost on {0}", Me.SafeName())
                                                                ),
                                                            new Action(ret => Lua.DoString("SpellStopTargeting()"))
                                                            )
                                                        )
                                                    )
                                                )
                                            )
                                        )
                           )
                       ));
        }
Пример #29
0
        public static void destroy()
        {
            ZhanMengShiJianManager.getInstance().destroy();
            JingJiChangManager.getInstance().destroy();
            LiXianBaiTanManager.getInstance().destroy();
            LiXianGuaJiManager.getInstance().destroy();
            CmdRegisterTriggerManager.getInstance().destroy();
            SendCmdManager.getInstance().destroy();
            BossAIManager.getInstance().destroy();
            SaleManager.getInstance().destroy();
            LianZhiManager.GetInstance().destroy();
            ChengJiuManager.GetInstance().destroy();
            PrestigeMedalManager.getInstance().destroy();
            UnionPalaceManager.getInstance().destroy();
            UserActivateManager.getInstance().destroy();
            PetSkillManager.getInstance().destroy();
            UserReturnManager.getInstance().destroy();
            OlympicsManager.getInstance().destroy();
            TalentManager.getInstance().destroy();
            TodayManager.getInstance().destroy();
            FundManager.getInstance().destroy();
            WarnManager.getInstance().destroy();
            MarryFuBenMgr.getInstance().destroy();
            BuildingManager.getInstance().destroy();
            OnePieceManager.getInstance().destroy();
            TenManager.getInstance().destroy();
            SingletonTemplate <SevenDayActivityMgr> .Instance().destroy();

            SingletonTemplate <SoulStoneManager> .Instance().destroy();

            lock (GlobalServiceManager.Scene2ManagerDict)
            {
                foreach (List <IManager> list in GlobalServiceManager.Scene2ManagerDict.Values)
                {
                    foreach (IManager i in list)
                    {
                        try
                        {
                            i.destroy();
                        }
                        catch (Exception ex)
                        {
                            LogManager.WriteException(ex.ToString());
                        }
                    }
                }
            }
            FaceBookManager.getInstance().destroy();
        }
Пример #30
0
    void Awake()
    {
        mouseOverChest = false;

        gameManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent<GameManager>();

        talentManager = transform.GetComponent<TalentManager>();
        spellBook = new List<Ability>();

        DontDestroyOnLoad(transform.gameObject);

        Instantiate(gameManager.SpawnInParticles, transform.position, Quaternion.identity);
        mouseOverGUI = false;
        _animationController = GetComponent<AnimationController>();
    }
        public DefaultCharacterManager(IWowInterface wowInterface, IMemoryApi memoryApi)
        {
            Wow       = wowInterface;
            MemoryApi = memoryApi;

            Inventory        = new CharacterInventory(Wow);
            Equipment        = new CharacterEquipment(Wow);
            SpellBook        = new SpellBook(Wow);
            TalentManager    = new TalentManager(Wow);
            LastLevelTrained = 0;
            ItemComparator   = new ItemLevelComparator();
            Skills           = new Dictionary <string, (int, int)>();

            ItemSlotsToSkip = new List <WowEquipmentSlot>();
        }
Пример #32
0
 // Use this for initialization
 void Start()
 {
     tManager = (TalentManager)obj8.GetComponent(typeof(TalentManager));
     script4 = (GerenciadorMissao)obj4.GetComponent(typeof(GerenciadorMissao));
     questScript = (Missao)obj4.GetComponent(typeof(Missao));
 }
Пример #33
0
        public override void Initialize()
        {
            if (!Styx.StyxWoW.IsInGame)
                return;
            if (Me.Class != WoWClass.Rogue)
                return;

            // Temp Looting Fix
            BotEvents.Player.OnMobKilled += e =>
            {
                WoWMovement.MoveStop();
                StyxWoW.SleepForLagDuration();
            };

            // Temp Skinning Fix
            BotEvents.Player.OnMobLooted += e =>
            {
                WoWMovement.MoveStop();
                StyxWoW.SleepForLagDuration();
            };

            slog("Indexing Talent Trees");
            Talents = new TalentManager();
            slog("Calculating Talent Trees");
            TalentSpec = Talents.GetSpec();
            slog("Determined " + TalentSpec + " as your spec.");
            _specRefresh.Reset();
            slog("v" + wRogueVersion + " By wired420 Loaded");
            slog("Checking for Updates");
            Update();
        }