Exemplo n.º 1
0
        private void onDraw(EventArgs args)
        {
            try
            {
                if (FenixMain.Menu.SubMenu("MasterActivator").Item("drawStatus").IsActive())
                {
                    Drawing.DrawText(Drawing.Width - 120, 80, FenixMain.Menu.SubMenu("MasterActivator").Item("enabled").IsActive() ? System.Drawing.Color.Green : System.Drawing.Color.Red, "MActivator");
                }

                ksDrawRange(choR);
                ksDrawRange(nunuQ);
                ksDrawRange(amumuE);
                ksDrawRange(gragasR);
                ksDrawRange(luxR);

                if (FenixMain.Menu.SubMenu("MasterActivator").Item("dSmite").GetValue<bool>())
                {
                    MMinion[] jungleMinions;
                    if (Utility.Map.GetMap().Type.Equals(Utility.Map.MapType.TwistedTreeline))
                    {
                        jungleMinions = new MMinion[] { tVilemaw, tWraith, tWolf, tGolem };
                    }
                    else
                    {
                        jungleMinions = new MMinion[] { blue, red, razor, baron, krug, wolf, dragon, gromp, crab };
                    }

                    var minions = MinionManager.GetMinions(_player.Position, 1500, MinionTypes.All, MinionTeam.Neutral);
                    if (minions.Count() > 0)
                    {
                        foreach (Obj_AI_Base minion in minions)
                        {
                            if (minion.IsHPBarRendered && !minion.IsDead)
                            {
                                foreach (MMinion jMinion in jungleMinions)
                                {
                                    if (minion.Name.StartsWith(jMinion.name) && ((minion.Name.Length - jMinion.name.Length) <= 6) && FenixMain.Menu.SubMenu("MasterActivator").Item(jMinion.name).GetValue<bool>() && FenixMain.Menu.SubMenu("MasterActivator").Item("justAS").GetValue<bool>() ||
                                    minion.Name.StartsWith(jMinion.name) && ((minion.Name.Length - jMinion.name.Length) <= 6) && !FenixMain.Menu.SubMenu("MasterActivator").Item("justAS").GetValue<bool>())
                                    {
                                        Vector2 hpBarPos = minion.HPBarPosition;
                                        hpBarPos.X += jMinion.preX;
                                        hpBarPos.Y += 18;

                                        int smiteDmg = getSmiteDmg();
                                        var damagePercent = smiteDmg / minion.MaxHealth;
                                        float hpXPos = hpBarPos.X + (jMinion.width * damagePercent);
                                        Drawing.DrawLine(hpXPos, hpBarPos.Y, hpXPos, hpBarPos.Y + 5, 2, smiteDmg >= minion.Health ? System.Drawing.Color.Lime : System.Drawing.Color.WhiteSmoke);

                                        // Draw camp
                                        if (FenixMain.Menu.SubMenu("MasterActivator").Item("dCamp").IsActive())
                                        {
                                            Drawing.DrawCircle(minion.Position, minion.BoundingRadius + smite.range + _player.BoundingRadius, _player.Distance(minion, false) <= (smite.range + minion.BoundingRadius + _player.BoundingRadius) ? System.Drawing.Color.Lime : System.Drawing.Color.WhiteSmoke);
                                        }

                                        // Draw for abilitys
                                        ksDrawDmg(choR, minion, jMinion, hpBarPos, hpXPos);
                                        ksDrawDmg(nunuQ, minion, jMinion, hpBarPos, hpXPos);
                                        ksDrawDmg(amumuE, minion, jMinion, hpBarPos, hpXPos);
                                        ksDrawDmg(gragasR, minion, jMinion, hpBarPos, hpXPos);
                                        ksDrawDmg(luxR, minion, jMinion, hpBarPos, hpXPos);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                Game.PrintChat("Problem with MasterActivator(Drawing).");
            }
        }
Exemplo n.º 2
0
        private void ksDrawDmg(MItem item, Obj_AI_Base minion, MMinion jMinion, Vector2 hpBarPos, float hpXPos)
        {
            if (FenixMain.Menu.SubMenu("MasterActivator").Item(item.menuVariable) != null)
            {
                if (FenixMain.Menu.SubMenu("MasterActivator").Item(item.menuVariable).GetValue<bool>() && FenixMain.Menu.SubMenu("MasterActivator").Item(item.menuVariable + "drawBar").GetValue<bool>())
                {
                    float spellDmg = (float)Damage.GetSpellDamage(_player, minion, item.abilitySlot);
                    var spellDmgPercent = spellDmg / minion.MaxHealth;

                    hpXPos = hpBarPos.X + (jMinion.width * spellDmgPercent);
                    Drawing.DrawLine(hpXPos, hpBarPos.Y, hpXPos, hpBarPos.Y + 5, 2, spellDmg >= minion.Health ? System.Drawing.Color.BlueViolet : System.Drawing.Color.Black);
                }
            }
        }