Пример #1
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (!IsActive())
            {
                return;
            }

            int time = Environment.TickCount;

            foreach (PlayerInfo playerInfo in _playerInfo.Where(x => x.Player.IsVisible))
            {
                playerInfo.LastSeen = time;
            }

            Wards.WardItem ward = Wards.GetWardItem();
            if (ward == null)
            {
                return;
            }

            if (Menu.BushRevealer.GetMenuItem("SAwarenessBushRevealerKey").GetValue <KeyBind>().Active)
            {
                foreach (Obj_AI_Hero enemy in _playerInfo.Where(x =>
                                                                x.Player.IsValid &&
                                                                !x.Player.IsVisible &&
                                                                !x.Player.IsDead &&
                                                                x.Player.Distance(ObjectManager.Player.ServerPosition) < 1000 && //check real ward range later
                                                                time - x.LastSeen < 2500).Select(x => x.Player))
                {
                    Vector3 bestWardPos = GetWardPos(enemy.ServerPosition, 165, 2);

                    if (bestWardPos != enemy.ServerPosition && bestWardPos != Vector3.Zero &&
                        bestWardPos.Distance(ObjectManager.Player.ServerPosition) < ward.Range)
                    {
                        if (_lastTimeWarded == 0 || Environment.TickCount - _lastTimeWarded > 500)
                        {
                            InventorySlot wardSlot = Wards.GetWardSlot();

                            if (wardSlot != null && wardSlot.Id != ItemId.Unknown)
                            {
                                wardSlot.UseItem(bestWardPos);
                                _lastTimeWarded = Environment.TickCount;
                            }
                        }
                    }
                }
            }
        }
Пример #2
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (!IsActive() || !Menu.AutoJump.GetMenuItem("SAwarenessAutoJumpKey").GetValue <KeyBind>().Active ||
                !_jumpSpell.IsReady())
            {
                return;
            }

            foreach (GameObject gObject in ObjectManager.Get <GameObject>())
            {
                if ((_useWard && (gObject.Name.Contains("SightWard") || gObject.Name.Contains("VisionWard"))) ||
                    gObject.Type == GameObjectType.obj_AI_Minion)
                {
                    if (!_onlyAlly && !_onlyEnemy || (_onlyAlly && gObject.IsAlly) || (_onlyEnemy && gObject.IsEnemy))
                    {
                        if (!gObject.IsValid || ((Obj_AI_Base)gObject).Health < 1)
                        {
                            continue;
                        }
                        if (Game.CursorPos.Distance(gObject.Position) > 150)
                        {
                            continue;
                        }
                        if (_lastCast + 1 > Game.Time)
                        {
                            continue;
                        }
                        Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(gObject.Position.X, gObject.Position.Y))
                        .Send();
                        _jumpSpell.Cast((Obj_AI_Base)gObject, true);
                        _lastCast = Game.Time;
                        return;
                    }
                }
            }
            if (_jumpSpell.IsReady() && _useWard)
            {
                if (_lastCast + 1 > Game.Time)
                {
                    return;
                }
                InventorySlot slot = Wards.GetWardSlot();
                slot.UseItem(Game.CursorPos);
                _jumpSpell.Cast(Game.CursorPos, true);
                _lastCast = Game.Time;
            }
        }
Пример #3
0
 public ExpandedWardItem(Wards.WardItem ward, int stacks, int charges)
     : base(ward.Id, ward.Name, ward.SpellName, ward.Range, ward.Duration, ward.Type)
 {
     Stacks = stacks;
     Charges = charges;
 }
Пример #4
0
 public ExpandedWardItem(int id, string name, string spellName, int range, int duration, Wards.WardType type, int stacks, int charges)
     : base(id, name, spellName, range, duration, type)
 {
     Stacks = stacks;
     Charges = charges;
 }