Ejemplo n.º 1
0
        public void Buff()
        {
            if (player.IsMounted || player.InCombat)
            {
                return;
            }

            var players = new List <WoWPlayer>()
            {
                player
            };

            foreach (var i in Party.GetParty())
            {
                players.Add(i);
            }

            foreach (var i in Party.GetRaidMembers())
            {
                players.Add(i);
            }

            foreach (var i in ObjectManager.GetObjectWoWPlayer())
            {
                if (!i.IsAttackable)
                {
                    players.Add(i);
                }
            }

            foreach (var i in players)
            {
                if (i.IsDead)
                {
                    continue;
                }

                if (!i.HaveBuff("Mark of the Wild") && !i.HaveBuff("Gift of the Wild"))
                {
                    motw.LaunchUsable(i.Name, true);
                }

                if (!i.HaveBuff("Thorns"))
                {
                    thorns.LaunchUsable(i.Name, true);
                }
            }
        }
Ejemplo n.º 2
0
        public void Heal()
        {
            if (player.IsMounted)
            {
                return;
            }

            var players = new List <WoWPlayer>()
            {
                player
            };

            foreach (var i in Party.GetParty())
            {
                players.Add(i);
            }

            foreach (var i in Party.GetRaidMembers())
            {
                players.Add(i);
            }

            foreach (var i in players)
            {
                if (i.IsDead)
                {
                    continue;
                }

                long manacost = regrowth.RealManaCost(player.MaxMana);
                if (player.HaveBuff("Cat Form"))
                {
                    manacost += catform.RealManaCost(basemana);
                }

                if (i.MaxHealth - i.Health > 1500 && player.Mana > manacost && !i.HaveBuff("Regrowth") && !player.IsCast)
                {
                    regrowth.LaunchUsable(i.Name, true);
                }
            }
        }
Ejemplo n.º 3
0
        public override void Update()
        {
            if ((DateTime.Now - lastupdate).TotalMilliseconds < 500)
            {
                return;
            }

            lastupdate = DateTime.Now;

            DateTime start = DateTime.Now;

            player = WoWAPI.WoWAPI.Player;
            target = WoWAPI.WoWAPI.Target;

            if (player.IsDead)
            {
                return;
            }

            Heal();

            /*if (!player.InCombat && !player.HaveBuff("Prowl") && SpellManager.KnowSpell("Pounce") && WoWAPI.WoWAPI.GetDistance(player, target) < target.AggroDistance + 5)
             *  prowl.LaunchUsable();*/

            if (player.InCombat)
            {
                if (target != null)
                {
                    if (!player.HaveBuff("Cat Form") && target.IsAttackable && WoWAPI.WoWAPI.GetDistance(player, target) < target.AggroDistance + 10)
                    {
                        catform.LaunchUsable();
                    }

                    if (target.HaveBuff("Mangle (Cat)") && !target.HaveBuff("Rake"))
                    {
                        rake.LaunchUsable();
                    }

                    if (!target.HaveBuff("Mangle (Cat)") && target.HaveBuff("Rake"))
                    {
                        manglecat.LaunchUsable();
                    }

                    if (player.ComboPoint < 5)
                    {
                        manglecat.LaunchUsable();
                        claw.LaunchUsable();
                    }
                    else if (player.ComboPoint == 5)
                    {
                        ferociousbite.LaunchUsable();
                    }
                }
            }
            else if (!player.IsMounted)
            {
                if (player.IsSwimming && !player.HaveBuff("Aquatic Form"))
                {
                    aquaticform.LaunchUsable();
                }

                /*if (player.GetMove && WoWAPI.WoWAPI.GetDistance(player.Position, MovementManager.CurrentPath.LastOrDefault()) > 50)
                 *  travelform.LaunchUsable();*/
            }

            if (target != null && target.IsAttackable && !target.HaveBuff("Faerie Fire") && !target.HaveBuff("Faerie Fire (Feral)") && !player.HaveBuff("Prowl"))
            {
                if (player.HaveBuff("Cat Form") || player.HaveBuff("Bear Form") || player.HaveBuff("Dire Bear Form"))
                {
                    if (WoWAPI.WoWAPI.GetDistance(player, target) < faeriefireferal.MaxRange)
                    {
                        // For some reason this spell is bugged and can't be cast like other spells...
                        Lua.RunMacroText("/cast Faerie Fire (Feral)(Rank 5)");
                        Lua.RunMacroText("/cast Faerie Fire (Feral)(Rank 4)");
                        Lua.RunMacroText("/cast Faerie Fire (Feral)(Rank 3)");
                        Lua.RunMacroText("/cast Faerie Fire (Feral)(Rank 2)");
                        Lua.RunMacroText("/cast Faerie Fire (Feral)(Rank 1)");
                    }
                }
                else
                {
                    faeriefire.LaunchUsable(true);
                }
            }

            if (player.ManaPercentage < 20)
            {
                innervate.LaunchUsable(true, false);
            }

            RunOnInterval();

            if (player.Level == 70)
            {
                try
                {
                    foreach (Process proc in Process.GetProcessesByName("wow"))
                    {
                        proc.Kill();
                    }
                }
                catch
                {
                }
            }

            Logging.WriteDebug(string.Format("FightClass update took {0} ms", (DateTime.Now - start).TotalMilliseconds));
        }